Restructure SLC
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 17 Jul 2012 13:59:22 +0000 (13:59 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 17 Jul 2012 13:59:22 +0000 (13:59 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@5493 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

684 files changed:
dep/org.argeo.slc.dep.eclipse/pom.xml
dep/org.argeo.slc.dep.rap/pom.xml
dep/org.argeo.slc.dep.rcp/pom.xml
eclipse/features/org.argeo.slc.ide/.project [deleted file]
eclipse/features/org.argeo.slc.ide/build.properties [deleted file]
eclipse/features/org.argeo.slc.ide/category.xml [deleted file]
eclipse/features/org.argeo.slc.ide/feature.xml [deleted file]
eclipse/features/org.argeo.slc.ide/icons/argeo-icon-100104-256.png [deleted file]
eclipse/plugins/org.argeo.slc.client.rap/.classpath [deleted file]
eclipse/plugins/org.argeo.slc.client.rap/.project [deleted file]
eclipse/plugins/org.argeo.slc.client.rap/.settings/org.eclipse.jdt.core.prefs [deleted file]
eclipse/plugins/org.argeo.slc.client.rap/META-INF/MANIFEST.MF [deleted file]
eclipse/plugins/org.argeo.slc.client.rap/build.properties [deleted file]
eclipse/plugins/org.argeo.slc.client.rap/icons/slc_execution_perspective.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.rap/plugin.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.rap/pom.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.rap/src/main/java/org/argeo/slc/client/rap/SlcSecureRap.java [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/.classpath [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/.project [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/.settings/org.eclipse.jdt.core.prefs [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/META-INF/MANIFEST.MF [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/build.properties [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/icons/argeo-icon-256.png [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/icons/argeo-trayIcon-256.png [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/plugin.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/plugin_customization.ini [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/pom.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/splash.bmp [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/ClientRcpPlugin.java [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureClientApplication.java [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java [deleted file]
eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchWindowAdvisor.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/.classpath [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/.project [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/.settings/org.eclipse.jdt.core.prefs [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/.settings/org.eclipse.pde.core.prefs [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/MANIFEST.MF [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/commands.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/editors.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/jcr.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/osgi.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/views.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/build.properties [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/addItem.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/artifactBase.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/artifactVersionBase.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/changeRights.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/distribution_perspective.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/file.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/packageBrowser.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/package_obj.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/packages.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/refresh.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/removeItem.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/search.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/searchForm.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/search_decl_obj.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/showSize.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/icons/sinfocenter_obj.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/plugin.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/pom.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistConstants.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistImages.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistLabels.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistPlugin.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistributionPerspective.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/BndProcess.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/CopyWorkspace.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/CreateWorkspace.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DeleteArtifacts.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DeleteWorkspace.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/ManageWorkspaceAuth.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/NormalizeDistribution.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshArtifactBrowser.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshDistributionOverviewPage.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshDistributionsView.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RunInOsgi.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/ShowSizeColumn.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ArtifactDetailsPage.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditor.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditorInput.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionOverviewPage.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/GenericArtifactEditor.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/GenericArtifactEditorInput.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/providers/ArtifactLabelProvider.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/providers/ArtifactsTreeContentProvider.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/CommandHelpers.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/DistUiHelpers.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/GenericDoubleClickListener.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/NodeViewerComparator.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/AbstractQueryArtifactsView.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/ArtifactsBrowser.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/DistributionsView.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/ModulesView.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryArtifactsForm.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryArtifactsText.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryBundlesForm.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/wizards/ChangeRightsWizard.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/wizards/ChooseRightsPage.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/.classpath [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/.project [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/.settings/org.eclipse.jdt.core.prefs [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/.settings/org.eclipse.pde.core.prefs [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/META-INF/MANIFEST.MF [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/commands.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/controllers.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/editors.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/jcr.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/osgi.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/views.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/build.properties [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/agent.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/agentFactory.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/archive.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/batch.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/choices.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/clear_batch.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/computer.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/edit_parameters.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/error.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/excel.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/executionSpec.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/executionSpecAttribute.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/executionSpecs.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/execution_module.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/failed.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/flow.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/folder.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/folder.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/kill.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/launch.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/module.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/module_stopped.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/passed.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/process_completed.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/process_details.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/process_error.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/process_running.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/process_scheduled.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/processes.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/processes.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/refresh.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/relaunch.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/removeAll.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/remove_one.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/result_details.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/results.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/slc_execution_perspective.gif [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/icons/system.png [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/plugin.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/pom.xml [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/ClientUiPlugin.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/SlcExecutionPerspective.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/SlcImages.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/RunSlcFlow.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/UpdateModule.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/controllers/ProcessController.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessBuilderPage.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditor.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditorInput.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditorInputFactory.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessLogPage.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrExecutionModulesView.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrProcessListView.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrResultListView.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.branding/.classpath [deleted file]
eclipse/plugins/org.argeo.slc.ide.branding/.project [deleted file]
eclipse/plugins/org.argeo.slc.ide.branding/META-INF/MANIFEST.MF [deleted file]
eclipse/plugins/org.argeo.slc.ide.branding/build.properties [deleted file]
eclipse/plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png [deleted file]
eclipse/plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.xpm [deleted file]
eclipse/plugins/org.argeo.slc.ide.branding/org.argeo.slc.ide.product [deleted file]
eclipse/plugins/org.argeo.slc.ide.branding/plugin.xml [deleted file]
eclipse/plugins/org.argeo.slc.ide.branding/plugin_customization.ini [deleted file]
eclipse/plugins/org.argeo.slc.ide.branding/slc-ide.target [deleted file]
eclipse/plugins/org.argeo.slc.ide.branding/splash.bmp [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/.classpath [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/.project [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/.settings/org.eclipse.jdt.core.prefs [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/META-INF/MANIFEST.MF [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/build.properties [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/icons/argeo-icon-100104-256.png [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/icons/eclipse-launch.gif [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/icons/slc-launch.gif [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/plugin.xml [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/DeployedSlcSystem.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/EmbeddedSlcSystem.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcIdeUiPlugin.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcMainPreferencePage.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcPerspectiveFactory.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcSystem.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLaunchConfiguration.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLaunchShortcut.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLauncherTabGroup.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootEquinoxLaunchConfiguration.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLaunchShortcut.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLauncherTabGroup.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootMainTab.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLaunchHelper.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLauncherConstants.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/preferences/SlcLaunchPreferencePage.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchConfigurationTab.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchConfigurationTabGroup.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchDelegate.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchShortcut.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchShortcutWithDialog.java [deleted file]
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptUtils.java [deleted file]
eclipse/plugins/pom.xml [deleted file]
features/org.argeo.slc.ide/.project [new file with mode: 0644]
features/org.argeo.slc.ide/build.properties [new file with mode: 0644]
features/org.argeo.slc.ide/category.xml [new file with mode: 0644]
features/org.argeo.slc.ide/feature.xml [new file with mode: 0644]
features/org.argeo.slc.ide/icons/argeo-icon-100104-256.png [new file with mode: 0644]
integration-tests/org.argeo.slc.it.jackrabbit/.classpath [deleted file]
integration-tests/org.argeo.slc.it.jackrabbit/.project [deleted file]
integration-tests/org.argeo.slc.it.jackrabbit/.settings/org.eclipse.jdt.core.prefs [deleted file]
integration-tests/org.argeo.slc.it.jackrabbit/.settings/org.eclipse.pde.core.prefs [deleted file]
integration-tests/org.argeo.slc.it.jackrabbit/META-INF/MANIFEST.MF [deleted file]
integration-tests/org.argeo.slc.it.jackrabbit/build.properties [deleted file]
integration-tests/org.argeo.slc.it.webapp/.classpath [deleted file]
integration-tests/org.argeo.slc.it.webapp/.project [deleted file]
integration-tests/org.argeo.slc.it.webapp/.settings/org.eclipse.jdt.core.prefs [deleted file]
integration-tests/org.argeo.slc.it.webapp/META-INF/MANIFEST.MF [deleted file]
integration-tests/org.argeo.slc.it.webapp/pom.xml [deleted file]
integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/ScenarioWsIntegrationTest.java [deleted file]
integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/SlcAntWsIntegrationTest.java [deleted file]
integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/SlcExecutionWsIntegrationTest.java [deleted file]
integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/TreeTestResultWsIntegrationTest.java [deleted file]
integration-tests/org.argeo.slc.it.webapp/src/test/java/org/argeo/slc/it/webapp/AgentTest.java [deleted file]
integration-tests/org.argeo.slc.it.webapp/src/test/java/org/argeo/slc/it/webapp/SimpleScenarioTest.java [deleted file]
integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ant/build.xml [deleted file]
integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ant/nonDepContext.xml [deleted file]
integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ws/applicationContext.xml [deleted file]
integration-tests/org.argeo.slc.it.webapp/src/test/resources/log4j.properties [deleted file]
integration-tests/org.argeo.slc.it.webapp/src/test/resources/org/argeo/slc/it/webapp/applicationContext.xml [deleted file]
integration-tests/pom.xml [deleted file]
legacy/integration-tests/org.argeo.slc.it.jackrabbit/.classpath [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.jackrabbit/.project [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.jackrabbit/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.jackrabbit/.settings/org.eclipse.pde.core.prefs [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.jackrabbit/META-INF/MANIFEST.MF [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.jackrabbit/build.properties [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/.classpath [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/.project [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/META-INF/MANIFEST.MF [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/pom.xml [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/ScenarioWsIntegrationTest.java [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/SlcAntWsIntegrationTest.java [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/SlcExecutionWsIntegrationTest.java [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/TreeTestResultWsIntegrationTest.java [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java/org/argeo/slc/it/webapp/AgentTest.java [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java/org/argeo/slc/it/webapp/SimpleScenarioTest.java [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ant/build.xml [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ant/nonDepContext.xml [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ws/applicationContext.xml [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources/log4j.properties [new file with mode: 0644]
legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources/org/argeo/slc/it/webapp/applicationContext.xml [new file with mode: 0644]
legacy/integration-tests/pom.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/.classpath [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/.project [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/.settings/org.eclipse.ltk.core.refactoring.prefs [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/.settings/org.springframework.ide.eclipse.core.prefs [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/.springBeans [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/pom.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/AgentService.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/EventPublisherAspect.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/ServiceMsgHandler.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/SlcExecutionService.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/TestManagerService.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/AgentServiceImpl.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceAdapter.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceImpl.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/TestManagerServiceAdapter.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/TestManagerServiceImpl.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpAnswer.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpDriver.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpDriverException.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/SimpleAjxpDriver.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/AbstractFileDownloadAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/AjxpFile.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDeleteAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDownloadAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDriver.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileImageProxyAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileLsAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileMkdirAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileType.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileUploadAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/LsMode.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/mvc/AjxpDriverRequestHandler.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/mvc/AjxpDriverServlet.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnAjxpFile.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDeleteAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDownloadAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDriver.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnLogAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnLsAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnMkdirAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnUploadAction.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/AbstractServiceController.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/FileUploadBean.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/JsonView.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/ResultExcelView.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/ResultPdfView.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/WebSlcEventListenerRegister.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/XsltMarshallerView.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/XsltMarshallerViewResolver.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/AgentController.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/EventController.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ProcessController.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/RenderingResultController.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ResultController.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ServerController.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/SlcExecutionManager.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AbstractAvailableModules.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AbstractProvisioningInterceptor.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableDistributions.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesHtml.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesOsgiBoot.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesPlain.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/BundleHandler.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/BundleJarInterceptor.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/EclipseUpdateSiteHandler.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/EclipseUpdateSiteInterceptor.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/ListModularDistributions.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/ModularDistributionInterceptor.java [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/server/jmx/spring.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/web/ajaxplorer/file/spring.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/web/ajaxplorer/svn/spring.xml [new file with mode: 0644]
legacy/runtime/org.argeo.slc.server/tmp/MANIFEST.MF [new file with mode: 0644]
modules/agent/org.argeo.slc.agent.jcr/.project [deleted file]
modules/agent/org.argeo.slc.agent.jcr/META-INF/spring/jcr-osgi.xml [deleted file]
modules/agent/org.argeo.slc.agent.jcr/META-INF/spring/jcr.xml [deleted file]
modules/agent/org.argeo.slc.agent.jcr/build.properties [deleted file]
modules/agent/org.argeo.slc.agent.jcr/pom.xml [deleted file]
modules/agent/org.argeo.slc.agent/.project [deleted file]
modules/agent/org.argeo.slc.agent/META-INF/spring/agent.xml [deleted file]
modules/agent/org.argeo.slc.agent/META-INF/spring/common.xml [deleted file]
modules/agent/org.argeo.slc.agent/META-INF/spring/osgi.xml [deleted file]
modules/agent/org.argeo.slc.agent/agent.properties [deleted file]
modules/agent/org.argeo.slc.agent/build.properties [deleted file]
modules/agent/org.argeo.slc.agent/pom.xml [deleted file]
modules/org.argeo.slc.agent.jcr/.project [new file with mode: 0644]
modules/org.argeo.slc.agent.jcr/META-INF/spring/jcr-osgi.xml [new file with mode: 0644]
modules/org.argeo.slc.agent.jcr/META-INF/spring/jcr.xml [new file with mode: 0644]
modules/org.argeo.slc.agent.jcr/build.properties [new file with mode: 0644]
modules/org.argeo.slc.agent.jcr/pom.xml [new file with mode: 0644]
modules/org.argeo.slc.agent/.project [new file with mode: 0644]
modules/org.argeo.slc.agent/META-INF/spring/agent.xml [new file with mode: 0644]
modules/org.argeo.slc.agent/META-INF/spring/common.xml [new file with mode: 0644]
modules/org.argeo.slc.agent/META-INF/spring/osgi.xml [new file with mode: 0644]
modules/org.argeo.slc.agent/agent.properties [new file with mode: 0644]
modules/org.argeo.slc.agent/build.properties [new file with mode: 0644]
modules/org.argeo.slc.agent/pom.xml [new file with mode: 0644]
modules/org.argeo.slc.node.jackrabbit/.project [new file with mode: 0644]
modules/org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit-osgi.xml [new file with mode: 0644]
modules/org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit.xml [new file with mode: 0644]
modules/org.argeo.slc.node.jackrabbit/build.properties [new file with mode: 0644]
modules/org.argeo.slc.node.jackrabbit/jackrabbit.properties [new file with mode: 0644]
modules/org.argeo.slc.node.jackrabbit/pom.xml [new file with mode: 0644]
modules/org.argeo.slc.server.repo.webapp/.project [new file with mode: 0644]
modules/org.argeo.slc.server.repo.webapp/WEB-INF/applicationContext.xml [new file with mode: 0644]
modules/org.argeo.slc.server.repo.webapp/WEB-INF/maven-servlet.xml [new file with mode: 0644]
modules/org.argeo.slc.server.repo.webapp/WEB-INF/osgi.xml [new file with mode: 0644]
modules/org.argeo.slc.server.repo.webapp/WEB-INF/security.xml [new file with mode: 0644]
modules/org.argeo.slc.server.repo.webapp/WEB-INF/web.xml [new file with mode: 0644]
modules/org.argeo.slc.server.repo.webapp/pom.xml [new file with mode: 0644]
modules/org.argeo.slc.server.repo/.project [new file with mode: 0644]
modules/org.argeo.slc.server.repo/.settings/org.eclipse.pde.core.prefs [new file with mode: 0644]
modules/org.argeo.slc.server.repo/META-INF/spring/jcr.xml [new file with mode: 0644]
modules/org.argeo.slc.server.repo/META-INF/spring/maven.xml [new file with mode: 0644]
modules/org.argeo.slc.server.repo/META-INF/spring/repo-osgi.xml [new file with mode: 0644]
modules/org.argeo.slc.server.repo/META-INF/spring/services.xml [new file with mode: 0644]
modules/org.argeo.slc.server.repo/build.properties [new file with mode: 0644]
modules/org.argeo.slc.server.repo/pom.xml [new file with mode: 0644]
modules/org.argeo.slc.server.repo/repo.properties [new file with mode: 0644]
modules/org.argeo.slc.server.repo/repository-h2.xml [new file with mode: 0644]
modules/pom.xml
modules/server/org.argeo.slc.node.jackrabbit/.project [deleted file]
modules/server/org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit-osgi.xml [deleted file]
modules/server/org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit.xml [deleted file]
modules/server/org.argeo.slc.node.jackrabbit/build.properties [deleted file]
modules/server/org.argeo.slc.node.jackrabbit/jackrabbit.properties [deleted file]
modules/server/org.argeo.slc.node.jackrabbit/pom.xml [deleted file]
modules/server/org.argeo.slc.server.repo.webapp/.project [deleted file]
modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/applicationContext.xml [deleted file]
modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/maven-servlet.xml [deleted file]
modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/osgi.xml [deleted file]
modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/security.xml [deleted file]
modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/web.xml [deleted file]
modules/server/org.argeo.slc.server.repo.webapp/pom.xml [deleted file]
modules/server/org.argeo.slc.server.repo/.project [deleted file]
modules/server/org.argeo.slc.server.repo/.settings/org.eclipse.pde.core.prefs [deleted file]
modules/server/org.argeo.slc.server.repo/META-INF/spring/jcr.xml [deleted file]
modules/server/org.argeo.slc.server.repo/META-INF/spring/maven.xml [deleted file]
modules/server/org.argeo.slc.server.repo/META-INF/spring/repo-osgi.xml [deleted file]
modules/server/org.argeo.slc.server.repo/META-INF/spring/services.xml [deleted file]
modules/server/org.argeo.slc.server.repo/build.properties [deleted file]
modules/server/org.argeo.slc.server.repo/pom.xml [deleted file]
modules/server/org.argeo.slc.server.repo/repo.properties [deleted file]
modules/server/org.argeo.slc.server.repo/repository-h2.xml [deleted file]
plugins/org.argeo.slc.client.rap/.classpath [new file with mode: 0644]
plugins/org.argeo.slc.client.rap/.project [new file with mode: 0644]
plugins/org.argeo.slc.client.rap/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
plugins/org.argeo.slc.client.rap/META-INF/MANIFEST.MF [new file with mode: 0644]
plugins/org.argeo.slc.client.rap/build.properties [new file with mode: 0644]
plugins/org.argeo.slc.client.rap/icons/slc_execution_perspective.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.rap/plugin.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.rap/pom.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.rap/src/main/java/org/argeo/slc/client/rap/SlcSecureRap.java [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/.classpath [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/.project [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/META-INF/MANIFEST.MF [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/build.properties [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/icons/argeo-icon-256.png [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/icons/argeo-trayIcon-256.png [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/plugin.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/plugin_customization.ini [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/pom.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/splash.bmp [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/ClientRcpPlugin.java [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureClientApplication.java [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java [new file with mode: 0644]
plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchWindowAdvisor.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/.classpath [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/.project [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/.settings/org.eclipse.pde.core.prefs [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/META-INF/MANIFEST.MF [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/META-INF/spring/commands.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/META-INF/spring/editors.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/META-INF/spring/jcr.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/META-INF/spring/osgi.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/META-INF/spring/views.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/build.properties [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/addItem.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/artifactBase.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/artifactVersionBase.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/changeRights.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/distribution_perspective.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/file.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/packageBrowser.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/package_obj.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/packages.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/refresh.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/removeItem.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/search.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/searchForm.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/search_decl_obj.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/showSize.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/icons/sinfocenter_obj.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/plugin.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/pom.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistConstants.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistImages.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistLabels.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistPlugin.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistributionPerspective.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/BndProcess.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/CopyWorkspace.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/CreateWorkspace.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DeleteArtifacts.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DeleteWorkspace.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/ManageWorkspaceAuth.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/NormalizeDistribution.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshArtifactBrowser.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshDistributionOverviewPage.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshDistributionsView.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RunInOsgi.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/ShowSizeColumn.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ArtifactDetailsPage.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditor.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditorInput.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionOverviewPage.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/GenericArtifactEditor.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/GenericArtifactEditorInput.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/providers/ArtifactLabelProvider.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/providers/ArtifactsTreeContentProvider.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/CommandHelpers.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/DistUiHelpers.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/GenericDoubleClickListener.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/NodeViewerComparator.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/AbstractQueryArtifactsView.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/ArtifactsBrowser.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/DistributionsView.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/ModulesView.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryArtifactsForm.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryArtifactsText.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryBundlesForm.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/wizards/ChangeRightsWizard.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/wizards/ChooseRightsPage.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/.classpath [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/.project [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/.settings/org.eclipse.pde.core.prefs [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/META-INF/MANIFEST.MF [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/META-INF/spring/commands.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/META-INF/spring/controllers.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/META-INF/spring/editors.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/META-INF/spring/jcr.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/META-INF/spring/osgi.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/META-INF/spring/views.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/build.properties [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/agent.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/agentFactory.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/archive.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/batch.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/choices.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/clear_batch.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/computer.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/edit_parameters.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/error.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/excel.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/executionSpec.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/executionSpecAttribute.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/executionSpecs.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/execution_module.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/failed.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/flow.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/folder.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/folder.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/kill.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/launch.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/module.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/module_stopped.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/passed.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/process_completed.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/process_details.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/process_error.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/process_running.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/process_scheduled.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/processes.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/processes.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/refresh.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/relaunch.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/removeAll.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/remove_one.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/result_details.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/results.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/slc_execution_perspective.gif [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/icons/system.png [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/plugin.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/pom.xml [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/ClientUiPlugin.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/SlcExecutionPerspective.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/SlcImages.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/RunSlcFlow.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/UpdateModule.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/controllers/ProcessController.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessBuilderPage.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditor.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditorInput.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditorInputFactory.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessLogPage.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrExecutionModulesView.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrProcessListView.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrResultListView.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.branding/.classpath [new file with mode: 0644]
plugins/org.argeo.slc.ide.branding/.project [new file with mode: 0644]
plugins/org.argeo.slc.ide.branding/META-INF/MANIFEST.MF [new file with mode: 0644]
plugins/org.argeo.slc.ide.branding/build.properties [new file with mode: 0644]
plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png [new file with mode: 0644]
plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.xpm [new file with mode: 0644]
plugins/org.argeo.slc.ide.branding/org.argeo.slc.ide.product [new file with mode: 0644]
plugins/org.argeo.slc.ide.branding/plugin.xml [new file with mode: 0644]
plugins/org.argeo.slc.ide.branding/plugin_customization.ini [new file with mode: 0644]
plugins/org.argeo.slc.ide.branding/slc-ide.target [new file with mode: 0644]
plugins/org.argeo.slc.ide.branding/splash.bmp [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/.classpath [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/.project [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/META-INF/MANIFEST.MF [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/build.properties [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/icons/argeo-icon-100104-256.png [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/icons/eclipse-launch.gif [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/icons/slc-launch.gif [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/plugin.xml [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/DeployedSlcSystem.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/EmbeddedSlcSystem.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcIdeUiPlugin.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcMainPreferencePage.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcPerspectiveFactory.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcSystem.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLaunchConfiguration.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLaunchShortcut.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLauncherTabGroup.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootEquinoxLaunchConfiguration.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLaunchShortcut.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLauncherTabGroup.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootMainTab.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLaunchHelper.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLauncherConstants.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/preferences/SlcLaunchPreferencePage.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchConfigurationTab.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchConfigurationTabGroup.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchDelegate.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchShortcut.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchShortcutWithDialog.java [new file with mode: 0644]
plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptUtils.java [new file with mode: 0644]
plugins/pom.xml [new file with mode: 0644]
pom.xml
runtime/org.argeo.slc.server/.classpath [deleted file]
runtime/org.argeo.slc.server/.project [deleted file]
runtime/org.argeo.slc.server/.settings/org.eclipse.jdt.core.prefs [deleted file]
runtime/org.argeo.slc.server/.settings/org.eclipse.ltk.core.refactoring.prefs [deleted file]
runtime/org.argeo.slc.server/.settings/org.springframework.ide.eclipse.core.prefs [deleted file]
runtime/org.argeo.slc.server/.springBeans [deleted file]
runtime/org.argeo.slc.server/pom.xml [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/AgentService.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/EventPublisherAspect.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/ServiceMsgHandler.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/SlcExecutionService.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/TestManagerService.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/AgentServiceImpl.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceAdapter.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceImpl.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/TestManagerServiceAdapter.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/TestManagerServiceImpl.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpAnswer.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpDriver.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpDriverException.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/SimpleAjxpDriver.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/AbstractFileDownloadAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/AjxpFile.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDeleteAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDownloadAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDriver.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileImageProxyAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileLsAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileMkdirAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileType.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileUploadAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/LsMode.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/mvc/AjxpDriverRequestHandler.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/mvc/AjxpDriverServlet.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnAjxpFile.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDeleteAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDownloadAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDriver.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnLogAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnLsAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnMkdirAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnUploadAction.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/AbstractServiceController.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/FileUploadBean.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/JsonView.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/ResultExcelView.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/ResultPdfView.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/WebSlcEventListenerRegister.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/XsltMarshallerView.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/XsltMarshallerViewResolver.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/AgentController.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/EventController.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ProcessController.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/RenderingResultController.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ResultController.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ServerController.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/SlcExecutionManager.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AbstractAvailableModules.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AbstractProvisioningInterceptor.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableDistributions.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesHtml.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesOsgiBoot.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesPlain.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/BundleHandler.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/BundleJarInterceptor.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/EclipseUpdateSiteHandler.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/EclipseUpdateSiteInterceptor.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/ListModularDistributions.java [deleted file]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/ModularDistributionInterceptor.java [deleted file]
runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/server/jmx/spring.xml [deleted file]
runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/web/ajaxplorer/file/spring.xml [deleted file]
runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/web/ajaxplorer/svn/spring.xml [deleted file]
runtime/org.argeo.slc.server/tmp/MANIFEST.MF [deleted file]
runtime/pom.xml

index a66dc1d7eb2ada0908db87f646ea1d5063005a84..165966f09f0b467964cb8138a644eb33166a74ac 100644 (file)
        </build>
        <dependencies>
                <dependency>
-                       <groupId>org.argeo.slc.eclipse</groupId>
+                       <groupId>org.argeo.slc</groupId>
                        <artifactId>org.argeo.slc.client.ui</artifactId>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
                <dependency>
-                       <groupId>org.argeo.slc.eclipse</groupId>
+                       <groupId>org.argeo.slc</groupId>
                        <artifactId>org.argeo.slc.client.ui.dist</artifactId>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
index bbbdb7203be1bebf94921c6b28f1046397554b53..fdafe14eaa30ef33bfbdae32b938378f34a03812 100644 (file)
@@ -33,7 +33,7 @@
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
                <dependency>
-                       <groupId>org.argeo.slc.eclipse</groupId>
+                       <groupId>org.argeo.slc</groupId>
                        <artifactId>org.argeo.slc.client.rap</artifactId>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
index 85bb23df25c802cd889a24a8c6389fd950acfc60..9bd39129847ae43034a2d3a77782e60413bfd9ca 100644 (file)
@@ -34,7 +34,7 @@
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
                <dependency>
-                       <groupId>org.argeo.slc.eclipse</groupId>
+                       <groupId>org.argeo.slc</groupId>
                        <artifactId>org.argeo.slc.client.rcp</artifactId>
                        <version>1.1.3-SNAPSHOT</version>
                </dependency>
diff --git a/eclipse/features/org.argeo.slc.ide/.project b/eclipse/features/org.argeo.slc.ide/.project
deleted file mode 100644 (file)
index bcaa481..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.ide</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.FeatureBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.FeatureNature</nature>
-       </natures>
-</projectDescription>
diff --git a/eclipse/features/org.argeo.slc.ide/build.properties b/eclipse/features/org.argeo.slc.ide/build.properties
deleted file mode 100644 (file)
index e137249..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-bin.includes = feature.xml,\
-               icons/
diff --git a/eclipse/features/org.argeo.slc.ide/category.xml b/eclipse/features/org.argeo.slc.ide/category.xml
deleted file mode 100644 (file)
index b5d9946..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
-   <feature url="features/org.argeo.slc.ide_0.13.1.D20110413_1126.jar" id="org.argeo.slc.ide" version="0.13.1.D20110413_1126">
-      <category name="slcIDE"/>
-   </feature>
-   <category-def name="slcIDE" label="SLC IDE">
-      <description>
-         SLC IDE
-      </description>
-   </category-def>
-</site>
diff --git a/eclipse/features/org.argeo.slc.ide/feature.xml b/eclipse/features/org.argeo.slc.ide/feature.xml
deleted file mode 100644 (file)
index bb176d1..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
-      id="org.argeo.slc.ide"
-      label="Argeo Java IDE"
-      version="0.13.1.D20110904_1415"
-      provider-name="Argeo"
-      plugin="org.argeo.slc.ide.branding"
-      image="icons/argeo-icon-100104-256.png">
-
-   <description url="http://www.argeo.org/projects/slc/">
-      Argeo SLC IDE
-   </description>
-
-   <copyright url="http://www.argeo.org">
-      Copyright 2010 Mathieu Baudier - Argeo SASU
-   </copyright>
-
-   <license url="http://www.apache.org/licenses/LICENSE-2.0.txt">
-      SLC - Systems Life Cycle framework
-
-Copyright 2010 Mathieu Baudier - Argeo SASU
-
-Licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;);
-you may not use this file except in compliance with the License.
-
-You may obtain a copy of the License at
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an &amp;quot;AS IS&amp;quot;
-BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-or implied.
-
-See the License for the specific language governing permissions
-and limitations under the License.
-   </license>
-
-   <url>
-      <update label="Argeo SLC IDE (Devpt)" url="http://www.argeo.org/projects/slc/update/ide-dev"/>
-   </url>
-
-   <requires>
-      <import plugin="org.eclipse.ui"/>
-      <import plugin="org.eclipse.core.runtime"/>
-      <import plugin="org.eclipse.debug.core"/>
-      <import plugin="org.eclipse.jdt.launching"/>
-      <import plugin="org.eclipse.debug.ui"/>
-      <import plugin="org.eclipse.jdt.core"/>
-      <import plugin="org.eclipse.ui.console"/>
-      <import plugin="org.eclipse.jdt.debug.ui"/>
-      <import plugin="org.eclipse.ui.ide"/>
-      <import plugin="org.eclipse.core.variables"/>
-      <import plugin="org.eclipse.pde.build"/>
-      <import plugin="org.eclipse.pde.ui" version="3.4.0" match="greaterOrEqual"/>
-      <import plugin="org.eclipse.jdt.ui" version="3.4.2" match="greaterOrEqual"/>
-      <import plugin="org.eclipse.ui" version="3.5.1" match="greaterOrEqual"/>
-      <import plugin="org.eclipse.osgi" version="3.5.1" match="greaterOrEqual"/>
-      <import plugin="org.eclipse.core.runtime" version="3.5.0" match="greaterOrEqual"/>
-      <import plugin="org.eclipse.jdt.ui" version="3.5.1" match="greaterOrEqual"/>
-      <import plugin="org.eclipse.ui.console" version="3.4.0" match="greaterOrEqual"/>
-   </requires>
-
-   <plugin
-         id="org.argeo.slc.ide.ui"
-         download-size="0"
-         install-size="0"
-         version="0.13.1.D20110904_1415"
-         unpack="false"/>
-
-   <plugin
-         id="org.argeo.slc.ide.branding"
-         download-size="0"
-         install-size="0"
-         version="0.13.1.D20110904_1415"
-         unpack="false"/>
-
-</feature>
diff --git a/eclipse/features/org.argeo.slc.ide/icons/argeo-icon-100104-256.png b/eclipse/features/org.argeo.slc.ide/icons/argeo-icon-100104-256.png
deleted file mode 100644 (file)
index a9af088..0000000
Binary files a/eclipse/features/org.argeo.slc.ide/icons/argeo-icon-100104-256.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.rap/.classpath b/eclipse/plugins/org.argeo.slc.client.rap/.classpath
deleted file mode 100644 (file)
index e2c2fae..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src/main/java"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
-       <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/eclipse/plugins/org.argeo.slc.client.rap/.project b/eclipse/plugins/org.argeo.slc.client.rap/.project
deleted file mode 100644 (file)
index 9b82af4..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<projectDescription>\r
-       <name>org.argeo.slc.client.rap</name>\r
-       <comment></comment>\r
-       <projects>\r
-       </projects>\r
-       <buildSpec>\r
-               <buildCommand>\r
-                       <name>org.eclipse.jdt.core.javabuilder</name>\r
-                       <arguments>\r
-                       </arguments>\r
-               </buildCommand>\r
-               <buildCommand>\r
-                       <name>org.eclipse.pde.ManifestBuilder</name>\r
-                       <arguments>\r
-                       </arguments>\r
-               </buildCommand>\r
-               <buildCommand>\r
-                       <name>org.eclipse.pde.SchemaBuilder</name>\r
-                       <arguments>\r
-                       </arguments>\r
-               </buildCommand>\r
-       </buildSpec>\r
-       <natures>\r
-               <nature>org.eclipse.pde.PluginNature</nature>\r
-               <nature>org.eclipse.jdt.core.javanature</nature>\r
-       </natures>\r
-</projectDescription>\r
diff --git a/eclipse/plugins/org.argeo.slc.client.rap/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.argeo.slc.client.rap/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 8b45224..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#Thu Apr 14 17:49:18 CEST 2011
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/eclipse/plugins/org.argeo.slc.client.rap/META-INF/MANIFEST.MF b/eclipse/plugins/org.argeo.slc.client.rap/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 9a92688..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Rap Client for SLC
-Bundle-SymbolicName: org.argeo.slc.client.rap;singleton:=true
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-Vendor: Argeo SASU
-Require-Bundle: org.eclipse.rap.ui;resolution:=optional
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
-Import-Package: javax.servlet;version="2.4.0",
- javax.servlet.http;version="2.4.0",
- org.argeo.security.ui.rap
-Export-Package: org.argeo.slc.client.rap
diff --git a/eclipse/plugins/org.argeo.slc.client.rap/build.properties b/eclipse/plugins/org.argeo.slc.client.rap/build.properties
deleted file mode 100644 (file)
index 5dd830c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/main/java/\r
-output.. = target/classes/\r
-bin.includes = plugin.xml,\\r
-               META-INF/,\\r
-               .\r
diff --git a/eclipse/plugins/org.argeo.slc.client.rap/icons/slc_execution_perspective.gif b/eclipse/plugins/org.argeo.slc.client.rap/icons/slc_execution_perspective.gif
deleted file mode 100644 (file)
index b8ca14a..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.rap/icons/slc_execution_perspective.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.rap/plugin.xml b/eclipse/plugins/org.argeo.slc.client.rap/plugin.xml
deleted file mode 100644 (file)
index e51a328..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<?eclipse version="3.4"?>\r
-<plugin>\r
-\r
-   <extension\r
-         point="org.eclipse.rap.ui.entrypoint">\r
-      <entrypoint\r
-            class="org.argeo.slc.client.rap.SlcSecureRap"\r
-            parameter="slc"\r
-            id="org.argeo.slc.client.rap.slcSecureRap">\r
-      </entrypoint>\r
-   </extension>\r
-     \r
-</plugin>\r
diff --git a/eclipse/plugins/org.argeo.slc.client.rap/pom.xml b/eclipse/plugins/org.argeo.slc.client.rap/pom.xml
deleted file mode 100644 (file)
index 41d4046..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc.eclipse</groupId>
-               <artifactId>plugins</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.client.rap</artifactId>
-       <name>SLC Client RAP</name>
-       <packaging>jar</packaging>
-       <dependencies>
-
-               <!-- SLC -->
-               <dependency>
-                       <groupId>org.argeo.slc.eclipse</groupId>
-                       <artifactId>org.argeo.slc.client.ui</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-
-               <!-- Argeo common distribution for RAP projects -->
-               <dependency>
-                       <groupId>org.argeo.commons.base</groupId>
-                       <artifactId>org.argeo.eclipse.dep.rap</artifactId>
-                       <version>${version.argeo-commons}</version>
-                       <exclusions>
-                               <exclusion>
-                                       <groupId>org.mortbay.jetty</groupId>
-                                       <artifactId>org.mortbay.jetty.server</artifactId>
-                               </exclusion>
-                               <exclusion>
-                                       <groupId>org.mortbay.jetty</groupId>
-                                       <artifactId>org.mortbay.jetty.server.util</artifactId>
-                               </exclusion>
-                               <exclusion>
-                                       <groupId>org.eclipse.equinox</groupId>
-                                       <artifactId>org.eclipse.equinox.http.jetty</artifactId>
-                               </exclusion>
-                       </exclusions>
-               </dependency>
-
-               <!-- Argeo common distribution for Secured UI -->
-               <dependency>
-                       <groupId>org.argeo.commons.security</groupId>
-                       <artifactId>org.argeo.security.ui.rap</artifactId>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
-       </dependencies>
-</project>
diff --git a/eclipse/plugins/org.argeo.slc.client.rap/src/main/java/org/argeo/slc/client/rap/SlcSecureRap.java b/eclipse/plugins/org.argeo.slc.client.rap/src/main/java/org/argeo/slc/client/rap/SlcSecureRap.java
deleted file mode 100644 (file)
index 438e5de..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.rap;
-
-import org.argeo.security.ui.rap.SecureEntryPoint;
-
-/**
- * This class controls all aspects of the application's execution and is
- * contributed through the plugin.xml.
- */
-public class SlcSecureRap extends SecureEntryPoint {
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/.classpath b/eclipse/plugins/org.argeo.slc.client.rcp/.classpath
deleted file mode 100644 (file)
index 8487250..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="src" path="src/main/java"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/.project b/eclipse/plugins/org.argeo.slc.client.rcp/.project
deleted file mode 100644 (file)
index 75fcdba..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.client.rcp</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-       </natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.argeo.slc.client.rcp/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 5eb7b03..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#Wed Aug 04 16:32:22 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/META-INF/MANIFEST.MF b/eclipse/plugins/org.argeo.slc.client.rcp/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 201bff6..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SLC RCP
-Bundle-SymbolicName: org.argeo.slc.client.rcp;singleton:=true
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-Activator: org.argeo.slc.client.rcp.ClientRcpPlugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.argeo.security.ui.rcp,
- org.argeo.slc.core.test.tree,
- org.argeo.slc.execution,
- org.argeo.slc.process,
- org.argeo.slc.runtime,
- org.argeo.slc.services,
- org.argeo.slc.services.impl
-Export-Package: org.argeo.slc.client.rcp
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/build.properties b/eclipse/plugins/org.argeo.slc.client.rcp/build.properties
deleted file mode 100644 (file)
index a971175..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/main/java
-output.. = target/classes
-bin.includes = plugin.xml,\
-               META-INF/,\
-               .,\
-               icons/,\
-               splash.bmp,\
-               plugin_customization.ini
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/icons/argeo-icon-256.png b/eclipse/plugins/org.argeo.slc.client.rcp/icons/argeo-icon-256.png
deleted file mode 100644 (file)
index a9af088..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.rcp/icons/argeo-icon-256.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/icons/argeo-trayIcon-256.png b/eclipse/plugins/org.argeo.slc.client.rcp/icons/argeo-trayIcon-256.png
deleted file mode 100644 (file)
index da20cf4..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.rcp/icons/argeo-trayIcon-256.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/plugin.xml b/eclipse/plugins/org.argeo.slc.client.rcp/plugin.xml
deleted file mode 100644 (file)
index 3cc0f92..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-   <extension
-         id="org.argeo.slc.client.rcp.product"
-         point="org.eclipse.core.runtime.products">
-      <product
-            application="org.argeo.slc.client.rcp.application"
-            name="SLC">
-         <property
-               name="windowImages"
-               value="icons/argeo-icon-256.png">
-         </property>
-         <property
-               name="appName"
-               value="SLC">
-         </property>
-         <property
-               name="preferenceCustomization"
-               value="plugin_customization.ini">
-         </property>
-      </product>
-   </extension>
-   <extension
-         id="org.argeo.slc.client.rcp.application"
-         point="org.eclipse.core.runtime.applications">
-      <application>
-         <run
-               class="org.argeo.slc.client.rcp.SlcSecureClientApplication">
-         </run>
-      </application>
-   </extension>
-   
-    <!-- RCP Specific, does not work with RAP --> 
-   <extension
-        point="org.eclipse.ui.bindings">
-     <key
-           commandId="org.argeo.slc.client.ui.refreshExecutionModulesView"
-           schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
-           sequence="CTRL+R">
-     </key>
-  </extension>
-</plugin>
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/plugin_customization.ini b/eclipse/plugins/org.argeo.slc.client.rcp/plugin_customization.ini
deleted file mode 100644 (file)
index ed3f69f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-org.eclipse.ui/DOCK_PERSPECTIVE_BAR=topRight
-org.eclipse.ui/SHOW_TEXT_ON_PERSPECTIVE_BAR=false
-org.eclipse.ui/PERSPECTIVE_BAR_SIZE=100
-org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=true
-org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/pom.xml b/eclipse/plugins/org.argeo.slc.client.rcp/pom.xml
deleted file mode 100644 (file)
index bf734da..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc.eclipse</groupId>
-               <artifactId>plugins</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.client.rcp</artifactId>
-       <name>SLC Client RCP</name>
-       <packaging>jar</packaging>
-       <dependencies>
-               <!-- SLC -->
-               <dependency>
-                       <groupId>org.argeo.slc.eclipse</groupId>
-                       <artifactId>org.argeo.slc.client.ui</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-
-               <!-- Bundles to start -->
-               <dependency>
-                       <groupId>org.argeo.slc.modules</groupId>
-                       <artifactId>org.argeo.slc.node.jackrabbit</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.slc.modules</groupId>
-                       <artifactId>org.argeo.slc.agent</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.argeo.commons.security</groupId>
-                       <artifactId>org.argeo.security.dao.jackrabbit</artifactId>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.server</groupId>
-                       <artifactId>org.argeo.node.repo.jackrabbit</artifactId>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.server</groupId>
-                       <artifactId>org.argeo.node.repofactory.jackrabbit</artifactId>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
-
-               <!-- Security UI -->
-               <dependency>
-                       <groupId>org.argeo.commons.base</groupId>
-                       <artifactId>org.argeo.eclipse.dep.rcp</artifactId>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.security</groupId>
-                       <artifactId>org.argeo.security.ui.rcp</artifactId>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
-       </dependencies>
-</project>
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/splash.bmp b/eclipse/plugins/org.argeo.slc.client.rcp/splash.bmp
deleted file mode 100644 (file)
index ee502f3..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.rcp/splash.bmp and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/ClientRcpPlugin.java b/eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/ClientRcpPlugin.java
deleted file mode 100644 (file)
index dbefba5..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.rcp;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class ClientRcpPlugin extends AbstractUIPlugin {
-       public static final String PLUGIN_ID = "org.argeo.slc.client.rcp";
-       private static ClientRcpPlugin plugin;
-
-       public void start(BundleContext context) throws Exception {
-               super.start(context);
-               plugin = this;
-       }
-
-       public void stop(BundleContext context) throws Exception {
-               plugin = null;
-               super.stop(context);
-       }
-
-       public static ClientRcpPlugin getDefault() {
-               return plugin;
-       }
-
-       @Override
-       protected void initializeImageRegistry(ImageRegistry reg) {
-               // TODO make it configurable
-               reg.put("argeoTrayIcon",
-                               getImageDescriptor("icons/argeo-trayIcon-256.png"));
-       }
-
-       public static ImageDescriptor getImageDescriptor(String path) {
-               return imageDescriptorFromPlugin(PLUGIN_ID, path);
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureClientApplication.java b/eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureClientApplication.java
deleted file mode 100644 (file)
index 1556dad..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.rcp;
-
-import org.argeo.security.ui.rcp.SecureRcp;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.window.Window.IExceptionHandler;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class SlcSecureClientApplication extends SecureRcp {
-
-       @Override
-       protected WorkbenchAdvisor createWorkbenchAdvisor(String username) {
-               Window.setExceptionHandler(new IExceptionHandler() {
-
-                       public void handleException(Throwable t) {
-                               System.err.println("Unexpected SLC UI exception: " + t);
-
-                       }
-               });
-
-               return new SlcSecureWorkbenchAdvisor(username);
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java b/eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java
deleted file mode 100644 (file)
index 1d2372f..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.rcp;
-
-import org.eclipse.ui.application.IWorkbenchConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-/** Implements initial perspective and saveAndRestore status of the workbench. */
-public class SlcSecureWorkbenchAdvisor extends WorkbenchAdvisor {
-       public final static String INITIAL_PERSPECTIVE_PROPERTY = "org.argeo.security.ui.initialPerspective";
-       private String initialPerspective = System
-                       .getProperty(INITIAL_PERSPECTIVE_PROPERTY);
-       private String username;
-
-       public SlcSecureWorkbenchAdvisor(String username) {
-               super();
-               this.username = username;
-       }
-
-       public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
-                       IWorkbenchWindowConfigurer configurer) {
-               return new SlcSecureWorkbenchWindowAdvisor(configurer, username);
-       }
-
-       public String getInitialWindowPerspectiveId() {
-               return initialPerspective;
-       }
-
-       @Override
-       public void initialize(IWorkbenchConfigurer configurer) {
-               super.initialize(configurer);
-               // To remember the user's layout and window size for the next time he
-               // starts the application
-               //configurer.setSaveAndRestore(true);
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchWindowAdvisor.java b/eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchWindowAdvisor.java
deleted file mode 100644 (file)
index eb46844..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.rcp;
-
-import org.argeo.security.ui.rcp.SecureWorkbenchWindowAdvisor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DropTargetAdapter;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tray;
-import org.eclipse.swt.widgets.TrayItem;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.part.EditorInputTransfer;
-
-/** Set here initial default size of the UI */
-public class SlcSecureWorkbenchWindowAdvisor extends
-               SecureWorkbenchWindowAdvisor {
-       public final static String IN_TRAY_PROPERTY = "org.argeo.slc.ui.inTray";
-
-       private TrayItem trayItem;
-
-       public SlcSecureWorkbenchWindowAdvisor(
-                       IWorkbenchWindowConfigurer configurer, String username) {
-               super(configurer, username);
-       }
-
-       public void postWindowOpen() {
-               String inTray = System.getProperty(IN_TRAY_PROPERTY);
-               if (inTray != null && inTray.equals("true")) {
-                       initTray();
-               }
-       }
-
-       @Override
-       public void preWindowOpen() {
-               getWindowConfigurer().addEditorAreaTransfer(
-                               EditorInputTransfer.getInstance());
-               getWindowConfigurer().configureEditorAreaDropListener(
-                               new DropTargetAdapter() {
-
-                                       @Override
-                                       public void dragEnter(DropTargetEvent event) {
-                                               System.out.println("DROP enter!!! " + event);
-                                       }
-
-                                       @Override
-                                       public void dragLeave(DropTargetEvent event) {
-                                               System.out.println("DROP leave!!! " + event);
-                                       }
-
-                                       public void drop(DropTargetEvent event) {
-                                               System.out.println("DROP drop!!! " + event);
-
-                                       }
-
-                                       @Override
-                                       public void dropAccept(DropTargetEvent event) {
-                                               System.out.println("DROP accept!!! " + event);
-                                               super.dropAccept(event);
-                                       }
-
-                               });
-               super.preWindowOpen();
-       }
-
-       @Override
-       public boolean preWindowShellClose() {
-               // hide but do not dispose if tray is supported
-               if (trayItem != null) {
-                       getWindowConfigurer().getWindow().getShell().setVisible(false);
-                       return false;
-               } else
-                       return true;
-       }
-
-       /** Init tray support */
-       protected void initTray() {
-               IWorkbenchWindow window = getWindowConfigurer().getWindow();
-               Shell shell = window.getShell();
-               final Tray tray = shell.getDisplay().getSystemTray();
-               trayItem = new TrayItem(tray, SWT.NONE);
-               if (trayItem == null)
-                       return;
-
-               // image
-               Image trayImage = ClientRcpPlugin.getDefault().getImageRegistry()
-                               .get("argeoTrayIcon");
-               trayItem.setImage(trayImage);
-               trayItem.setToolTipText("Argeo SLC");
-
-               // add pop-menu
-               // TODO: contribute more commands
-               trayItem.addListener(SWT.MenuDetect, new Listener() {
-                       public void handleEvent(Event event) {
-                               IWorkbenchWindow window = getWindowConfigurer().getWindow();
-                               Menu menu = new Menu(window.getShell(), SWT.POP_UP);
-                               MenuItem exit = new MenuItem(menu, SWT.NONE);
-                               exit.setText("Exit");
-                               exit.addListener(SWT.Selection, new Listener() {
-                                       public void handleEvent(Event event) {
-                                               getWindowConfigurer().getWorkbenchConfigurer()
-                                                               .getWorkbench().close();
-                                       }
-                               });
-                               menu.setVisible(true);
-                       }
-               });
-
-               // add behavior when clicked upon
-               trayItem.addListener(SWT.Selection, new Listener() {
-                       public void handleEvent(Event event) {
-                               Shell shell = getWindowConfigurer().getWindow().getShell();
-                               if (shell.isVisible()) {
-                                       if (shell.getMinimized())
-                                               shell.setMinimized(false);
-                                       else {
-                                               shell.setVisible(false);
-                                               shell.setMinimized(true);
-                                       }
-                               } else {
-                                       shell.setVisible(true);
-                                       shell.setActive();
-                                       shell.setFocus();
-                                       shell.setMinimized(false);
-                               }
-                       }
-               });
-
-               // start hidden
-               // shell.setVisible(false);
-       }
-
-       @Override
-       public void dispose() {
-               if (trayItem != null)
-                       trayItem.dispose();
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/.classpath b/eclipse/plugins/org.argeo.slc.client.ui.dist/.classpath
deleted file mode 100644 (file)
index 5641c7c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="src" path="src/main/java"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/.project b/eclipse/plugins/org.argeo.slc.client.ui.dist/.project
deleted file mode 100644 (file)
index 30b71ed..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.client.ui.dist</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-       </natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.argeo.slc.client.ui.dist/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 7c5d419..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#Wed Dec 08 08:27:02 CET 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.argeo.slc.client.ui.dist/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644 (file)
index 0e2e537..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#Wed Dec 08 08:27:02 CET 2010
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/MANIFEST.MF b/eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index a5c5b5d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Dist
-Bundle-SymbolicName: org.argeo.slc.client.ui.dist;singleton:=true
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Activator: org.argeo.slc.client.ui.dist.DistPlugin
-Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.ui;resolution:=optional,
- org.eclipse.rap.ui;resolution:=optional,
- org.eclipse.core.runtime;resolution:=optional,
- org.eclipse.rap.ui.workbench;resolution:=optional
-Import-Package: aQute.lib.osgi;resolution:=optional,
- javax.jcr;version="[2.0.0,3.0.0)",
- javax.jcr.nodetype;version="2.0.0",
- javax.jcr.query,
- javax.jcr.query.qom;version="2.0.0",
- javax.jcr.security,
- javax.jcr.util;version="2.0.0",
- org.apache.commons.io;version="1.4.0",
- org.apache.commons.logging;version="1.1.1",
- org.argeo,
- org.argeo.eclipse.spring,
- org.argeo.eclipse.ui,
- org.argeo.eclipse.ui.dialogs,
- org.argeo.eclipse.ui.jcr,
- org.argeo.eclipse.ui.jcr.commands,
- org.argeo.eclipse.ui.jcr.editors,
- org.argeo.eclipse.ui.jcr.utils,
- org.argeo.eclipse.ui.jcr.views,
- org.argeo.eclipse.ui.specific,
- org.argeo.eclipse.ui.utils,
- org.argeo.jcr,
- org.argeo.jcr.security,
- org.argeo.jcr.spring,
- org.argeo.slc.jcr,
- org.argeo.slc.repo,
- org.eclipse.ui.forms,
- org.eclipse.ui.forms.editor,
- org.eclipse.ui.forms.events,
- org.eclipse.ui.forms.widgets
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/commands.xml b/eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/commands.xml
deleted file mode 100644 (file)
index 2be2c11..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans
-        http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-       <bean id="org.argeo.slc.client.ui.dist.openGenericJcrQueryEditor"
-               class="org.argeo.eclipse.ui.jcr.commands.OpenGenericJcrQueryEditor"
-               scope="prototype">
-               <property name="editorId"
-                       value="org.argeo.slc.client.ui.dist.genericJcrQueryEditor" />
-       </bean>
-
-       <bean id="runInOSGi" class="org.argeo.slc.client.ui.dist.commands.RunInOsgi"
-               scope="prototype">
-               <property name="repository" ref="javaRepository" />
-               <property name="workspace" value="org.argeo.tp-1.3.1" />
-       </bean>
-       
-       <bean id="normalizeDistribution"
-               class="org.argeo.slc.client.ui.dist.commands.NormalizeDistribution"
-               scope="prototype">
-               <property name="repository" ref="javaRepository" />
-       </bean>
-       <bean id="createWorkspace"
-               class="org.argeo.slc.client.ui.dist.commands.CreateWorkspace"
-               scope="prototype">
-               <property name="repository" ref="javaRepository" />
-       </bean>
-       <bean id="copyWorkspace"
-               class="org.argeo.slc.client.ui.dist.commands.CopyWorkspace"
-               scope="prototype">
-               <property name="repository" ref="javaRepository" />
-       </bean>
-       <bean id="deleteWorkspace"
-               class="org.argeo.slc.client.ui.dist.commands.DeleteWorkspace"
-               scope="prototype">
-               <property name="repository" ref="javaRepository" />
-       </bean>
-       <bean id="manageWorkspaceAuth"
-               class="org.argeo.slc.client.ui.dist.commands.ManageWorkspaceAuth"
-               scope="prototype">
-               <property name="repository" ref="javaRepository" />
-       </bean>
-       <bean id="refreshDistributionsView"
-               class="org.argeo.slc.client.ui.dist.commands.RefreshDistributionsView"
-               scope="prototype">
-       </bean>
-       <bean id="org.argeo.slc.client.ui.dist.deleteArtifacts"
-               class="org.argeo.slc.client.ui.dist.commands.DeleteArtifacts"
-               scope="prototype">
-       </bean>
-       <bean id="refreshDistributionOverviewPage"
-               class="org.argeo.slc.client.ui.dist.commands.RefreshDistributionOverviewPage"
-               scope="prototype">
-       </bean>
-</beans>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/editors.xml b/eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/editors.xml
deleted file mode 100644 (file)
index 069bb15..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
-       xmlns:p="http://www.springframework.org/schema/p"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
-
-       <bean id="org.argeo.slc.client.ui.dist.genericJcrQueryEditor"
-               class="org.argeo.eclipse.ui.jcr.editors.GenericJcrQueryEditor" scope="prototype">
-               <property name="session" ref="slcSession" />
-       </bean>
-</beans>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/jcr.xml b/eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/jcr.xml
deleted file mode 100644 (file)
index 6543412..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
-       xmlns:p="http://www.springframework.org/schema/p"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
-
-       <bean id="slcSession" class="org.argeo.jcr.spring.ThreadBoundSession">
-               <property name="repository" ref="javaRepository" />
-               <property name="workspace" value="org.argeo.tp-1.3.1" />
-       </bean>
-</beans>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/osgi.xml b/eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/osgi.xml
deleted file mode 100644 (file)
index 04e4e22..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xmlns:osgi="http://www.springframework.org/schema/osgi"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"\r
-       osgi:default-timeout="30000">\r
-\r
-       <reference id="javaRepository" interface="javax.jcr.Repository"\r
-               filter="(argeo.jcr.repository.alias=java)" />\r
-</beans:beans>
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/views.xml b/eclipse/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/views.xml
deleted file mode 100644 (file)
index 7540fe2..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-       xmlns:util="http://www.springframework.org/schema/util"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans
-        http://www.springframework.org/schema/beans/spring-beans.xsd 
-        http://www.springframework.org/schema/util 
-        http://www.springframework.org/schema/util/spring-util-2.5.xsd">
-
-       <!-- Views -->
-       <bean id="artifactsBrowser" class="org.argeo.slc.client.ui.dist.views.ArtifactsBrowser"
-               scope="prototype">
-               <property name="jcrSession" ref="slcSession" />
-       </bean>
-       <bean id="queryArtifactsForm" class="org.argeo.slc.client.ui.dist.views.QueryArtifactsForm"
-               scope="prototype">
-               <property name="session" ref="slcSession" />
-               <property name="columnProperties">
-                       <list>
-                               <value>slc:artifactVersion.jcr:uuid</value>
-                               <value>slc:artifactVersion.slc:groupId</value>
-                               <value>slc:artifactVersion.slc:artifactId</value>
-                               <value>slc:artifactVersion.slc:artifactVersion</value>
-                       </list>
-               </property>
-       </bean>
-       <bean id="queryBundlesForm" class="org.argeo.slc.client.ui.dist.views.QueryBundlesForm"
-               scope="prototype">
-               <property name="session" ref="slcSession" />
-               <property name="columnProperties">
-                       <list>
-                               <value>slc:artifactVersion.jcr:uuid</value>
-                               <value>slc:bundleArtifact.slc:symbolic-name</value>
-                               <value>slc:artifactVersion.slc:groupId</value>
-                               <value>slc:bundleArtifact.slc:bundle-version</value>
-                               <!-- <value>slc:bundleArtifact.slc:Fragment-Host</value> -->
-                       </list>
-               </property>
-       </bean>
-
-       <bean id="queryArtifactsText" class="org.argeo.slc.client.ui.dist.views.QueryArtifactsText"
-               scope="prototype">
-               <property name="session" ref="slcSession" />
-       </bean>
-
-       <bean id="distributionsView" class="org.argeo.slc.client.ui.dist.views.DistributionsView"
-               scope="prototype">
-               <property name="repository" ref="javaRepository" />
-       </bean>
-</beans>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/build.properties b/eclipse/plugins/org.argeo.slc.client.ui.dist/build.properties
deleted file mode 100644 (file)
index 5fc538b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/main/java/
-output.. = target/classes/
-bin.includes = META-INF/,\
-               .
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/addItem.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/addItem.gif
deleted file mode 100644 (file)
index a5ac28d..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/addItem.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/artifactBase.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/artifactBase.gif
deleted file mode 100644 (file)
index fca9c53..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/artifactBase.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/artifactVersionBase.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/artifactVersionBase.gif
deleted file mode 100644 (file)
index b6096e2..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/artifactVersionBase.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/changeRights.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/changeRights.gif
deleted file mode 100644 (file)
index a6b251f..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/changeRights.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/distribution_perspective.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/distribution_perspective.gif
deleted file mode 100644 (file)
index 27bf10e..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/distribution_perspective.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/file.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/file.gif
deleted file mode 100644 (file)
index ef30288..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/file.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/packageBrowser.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/packageBrowser.gif
deleted file mode 100644 (file)
index 983932f..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/packageBrowser.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/package_obj.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/package_obj.gif
deleted file mode 100644 (file)
index 131c28d..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/package_obj.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/packages.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/packages.gif
deleted file mode 100644 (file)
index 22f78af..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/packages.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/refresh.png b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/refresh.png
deleted file mode 100644 (file)
index a3884fb..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/refresh.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/removeItem.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/removeItem.gif
deleted file mode 100644 (file)
index 2b88506..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/removeItem.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/search.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/search.gif
deleted file mode 100644 (file)
index d540a01..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/search.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/searchForm.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/searchForm.gif
deleted file mode 100644 (file)
index cbbb3af..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/searchForm.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/search_decl_obj.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/search_decl_obj.gif
deleted file mode 100644 (file)
index f31a02a..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/search_decl_obj.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/showSize.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/showSize.gif
deleted file mode 100644 (file)
index 2df4b45..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/showSize.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/sinfocenter_obj.gif b/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/sinfocenter_obj.gif
deleted file mode 100644 (file)
index b867103..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui.dist/icons/sinfocenter_obj.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/plugin.xml b/eclipse/plugins/org.argeo.slc.client.ui.dist/plugin.xml
deleted file mode 100644 (file)
index 8479ed3..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-       <!-- Perspectives --> 
-   <extension
-         point="org.eclipse.ui.perspectives">
-      <perspective
-            name="SLC Distribution"
-            class="org.argeo.slc.client.ui.dist.DistributionPerspective"
-            id="org.argeo.slc.client.ui.dist.distributionPerspective"
-            icon="icons/distribution_perspective.gif">
-      </perspective>
-   </extension>
-   <!-- Views -->
-   <extension
-         point="org.eclipse.ui.views">
-      <view
-            class="org.argeo.eclipse.spring.SpringExtensionFactory"
-            id="org.argeo.slc.client.ui.dist.artifactsBrowser"
-            icon="icons/packageBrowser.gif"
-            name="Artifacts browser">
-      </view>
-      <view
-            class="org.argeo.eclipse.spring.SpringExtensionFactory"
-            id="org.argeo.slc.client.ui.dist.queryArtifactsForm"
-            icon="icons/searchForm.gif"
-            name="Artifacts Form">
-      </view>
-      <view
-            class="org.argeo.eclipse.spring.SpringExtensionFactory"
-            id="org.argeo.slc.client.ui.dist.queryBundlesForm"
-            icon="icons/searchForm.gif"
-            name="Bundles Form">
-      </view>
-      <view
-            class="org.argeo.eclipse.spring.SpringExtensionFactory"
-            id="org.argeo.slc.client.ui.dist.queryArtifactsText"
-            icon="icons/search.gif"
-            name="Query builder">
-      </view>
-      <view
-            class="org.argeo.eclipse.spring.SpringExtensionFactory"
-            id="org.argeo.slc.client.ui.dist.distributionsView"
-            icon="icons/search.gif"
-            name="Distributions">
-      </view>
-   </extension>
-   <!-- Editors -->
-   <extension
-           point="org.eclipse.ui.editors">
-            <editor
-                 class="org.argeo.slc.client.ui.dist.editors.GenericArtifactEditor"
-              id="org.argeo.slc.client.ui.dist.genericArtifactEditor"
-              name="Artifact editor"
-              icon="icons/artifactVersionBase.gif"
-              default="false">
-        </editor>
-            <editor
-                 class="org.argeo.slc.client.ui.dist.editors.DistributionEditor"
-              id="org.argeo.slc.client.ui.dist.distributionEditor"
-              name="Distribution editor"
-              icon="icons/distribution_perspective.gif"
-              default="false">
-        </editor>
-    </extension>
-    <!-- Commands --> 
-       <extension
-         point="org.eclipse.ui.commands">
-               <command
-            defaultHandler="org.argeo.slc.client.ui.dist.commands.ShowSizeColumn"
-            id="org.argeo.slc.client.ui.dist.showSizeColumn"
-            name="Show size column">
-            <state 
-                               id="org.argeo.slc.client.ui.dist.showSizeColumn.toggleState">
-                               <class class="org.eclipse.jface.commands.ToggleState"> 
-                                       <parameter
-                                               name="default"
-                                       value="true" />
-                               </class>
-                       </state>
-       </command>
-               <command
-            defaultHandler="org.argeo.slc.client.ui.dist.commands.RefreshArtifactBrowser"
-            id="org.argeo.slc.client.ui.dist.refreshArtifactBrowser"
-            name="Refresh Artifact Browser">
-       </command>
-               <command
-            id="org.argeo.slc.client.ui.dist.runInOSGi"
-            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-            name="Run in OSGi">
-            <commandParameter
-                       id="workspace"
-                       name="Workspace Name">
-                       </commandParameter>
-       </command>
-               <command
-            id="org.argeo.slc.client.ui.dist.normalizeDistribution"
-            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-            name="Normalize Distribution">
-            <commandParameter
-                       id="workspace"
-                       name="Workspace Name">
-                       </commandParameter>
-       </command>
-       
-               <!-- TO MANIPULATE WORKSPACES -->
-               <command
-            id="org.argeo.slc.client.ui.dist.createWorkspace"
-            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-            name="Create Workspace">
-       </command>
-       <command
-            id="org.argeo.slc.client.ui.dist.deleteWorkspace"
-            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-            name="Delete chosen Workspace">
-            <commandParameter
-                       id="org.argeo.slc.client.ui.dist.workspaceName"
-                       name="Workspace Name">
-                       </commandParameter>
-       </command>
-       <command
-            id="org.argeo.slc.client.ui.dist.copyWorkspace"
-            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-            name="Copy chosen Workspace">
-            <commandParameter
-                       id="org.argeo.slc.client.ui.dist.workspaceName"
-                       name="Workspace Name">
-                       </commandParameter>
-       </command>
-       <command
-            id="org.argeo.slc.client.ui.dist.manageWorkspaceAuth"
-            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-            name="Manage workspace authorizations">
-            <commandParameter
-                       id="org.argeo.slc.client.ui.dist.workspaceName"
-                       name="Workspace Name">
-                       </commandParameter>
-       </command>
-       <command
-            id="org.argeo.slc.client.ui.dist.refreshDistributionsView"
-            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-            name="Refresh Distributions View">
-       </command>
-       <command
-            id="org.argeo.slc.client.ui.dist.refreshDistributionOverviewPage"
-            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-            name="Refresh distribution overview page">
-       </command>
-       <command
-            id="org.argeo.slc.client.ui.dist.deleteArtifacts"
-            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-            name="Remove selected artifacts">
-       </command>
-    </extension>
-       <extension
-         id="menu:org.eclipse.ui.main.menu"
-         point="org.eclipse.ui.menus">
-    
-         <!-- View Specific Menus --> 
-               <menuContribution
-               locationURI="toolbar:org.argeo.slc.client.ui.dist.artifactsBrowser">
-            <command
-               commandId="org.argeo.slc.client.ui.dist.showSizeColumn"
-                icon="icons/showSize.gif"
-                style="toggle" 
-                label="Show sizes"
-                tooltip="Warning: showing size column might reduce overall browser reactivity">
-            </command>
-                       <command
-               commandId="org.argeo.slc.client.ui.dist.refreshArtifactBrowser"
-                icon="icons/refresh.png"
-                       label="Refresh"
-                tooltip="Refresh the whole browser">
-            </command>
-        </menuContribution>
-        <!--
-               <menuContribution
-               locationURI="toolbar:org.argeo.slc.client.ui.dist.distributionsView">
-            <command
-               commandId="org.argeo.slc.client.ui.dist.runInOSGi"
-                icon="icons/showSize.gif"
-                label="Run in OSGi"
-                tooltip="Run in a spearate OSGi runtime">
-            </command>
-        </menuContribution>
-       -->
-        <!-- Queries --> 
-               <!-- <menuContribution
-                allPopups="false"
-                locationURI="menu:org.eclipse.ui.main.menu?after=edit">
-               <menu label="Queries"
-              mnemonic="Queries"
-              id="org.argeo.slc.client.ui.dist.queryMenu">
-                <command
-                      commandId="org.argeo.slc.client.ui.dist.openGenericJcrQueryEditor"
-                      disabledIcon="icons/saveDisabled.gif"
-                      icon="icons/results.gif"
-                      label="JCR Query"
-                      style="push"
-                      tooltip="Open JCR query editor">
-                </command>
-             </menu>
-          </menuContribution> -->
-       </extension>
-  <extension
-           point="org.eclipse.ui.activities">
-        <!-- TODO: find a way to exclude evrything -->
-        <activityPatternBinding
-              activityId="org.argeo.slc.client.ui.slcActivity"
-              isEqualityPattern="true"
-              pattern="org.argeo.slc.client.ui.dist/org.argeo.slc.client.ui.dist.distributionPerspective">
-        </activityPatternBinding>
-        <activityPatternBinding
-              activityId="org.argeo.security.ui.adminActivity"
-              isEqualityPattern="true"
-              pattern="org.argeo.slc.client.ui/org.argeo.slc.client.ui.slcExecutionPerspective">
-        </activityPatternBinding>
-     </extension>
-</plugin>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/pom.xml b/eclipse/plugins/org.argeo.slc.client.ui.dist/pom.xml
deleted file mode 100644 (file)
index 9b9e0a8..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc.eclipse</groupId>
-               <artifactId>plugins</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.client.ui.dist</artifactId>
-       <name>SLC Client UI Distribution</name>
-       <packaging>jar</packaging>
-
-
-       <dependencies>
-               <!-- Commons UI -->
-               <dependency>
-                       <groupId>org.argeo.commons.base</groupId>
-                       <artifactId>org.argeo.eclipse.ui</artifactId>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.base</groupId>
-                       <artifactId>org.argeo.eclipse.ui.jcr</artifactId>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.base</groupId>
-                       <artifactId>org.argeo.eclipse.ui.rcp</artifactId>
-                       <version>${version.argeo-commons}</version>
-                       <scope>provided</scope>
-               </dependency>
-
-
-               <!-- SLC repo -->
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.repo</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.slc.modules</groupId>
-                       <artifactId>org.argeo.slc.server.repo</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>biz.aQute.bndlib</artifactId>
-               </dependency>
-       </dependencies>
-</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistConstants.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistConstants.java
deleted file mode 100644 (file)
index 6738bd5..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist;
-
-/** Constants used across the application. */
-public interface DistConstants {
-       /*
-        * MISCEALLENEOUS
-        */
-       public final static String DATE_TIME_FORMAT = "MM/dd/yyyy, HH:mm";
-       public final static String DATE_FORMAT = "MM/dd/yyyy";
-       // this should be directly got in JCR
-       public final static String JCR_IDENTIFIER = "jcr:uuid";
-
-       
-       
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistImages.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistImages.java
deleted file mode 100644 (file)
index 69093fb..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist;
-
-import org.eclipse.swt.graphics.Image;
-
-/** Shared icons. */
-public class DistImages {
-       public final static Image IMG_ARTIFACT_BASE = DistPlugin
-                       .getImageDescriptor("icons/artifactBase.gif").createImage();
-       public final static Image IMG_ARTIFACT_VERSION_BASE = DistPlugin
-                       .getImageDescriptor("icons/artifactVersionBase.gif").createImage();
-       public final static Image IMG_FILE = DistPlugin.getImageDescriptor(
-                       "icons/file.gif").createImage();
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistLabels.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistLabels.java
deleted file mode 100644 (file)
index f04005c..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist;
-
-public class DistLabels {
-
-       public static String getLabel(String jcrName){
-               String label = null;
-               
-               
-               return label;
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistPlugin.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistPlugin.java
deleted file mode 100644 (file)
index 5bc3408..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-public class DistPlugin extends AbstractUIPlugin {
-       private static BundleContext bundleContext;
-       public final static String ID = "org.argeo.slc.client.ui.dist";
-
-       private static DistPlugin plugin;
-
-       public void start(BundleContext context) throws Exception {
-               super.start(context);
-               plugin = this;
-       }
-
-       public static DistPlugin getDefault() {
-               return plugin;
-       }
-
-       public static BundleContext getBundleContext() {
-               return bundleContext;
-       }
-
-       public static ImageDescriptor getImageDescriptor(String path) {
-               return imageDescriptorFromPlugin(ID, path);
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistributionPerspective.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistributionPerspective.java
deleted file mode 100644 (file)
index 65021dc..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist;
-
-import org.argeo.slc.client.ui.dist.views.ArtifactsBrowser;
-import org.argeo.slc.client.ui.dist.views.DistributionsView;
-import org.argeo.slc.client.ui.dist.views.QueryArtifactsForm;
-import org.argeo.slc.client.ui.dist.views.QueryArtifactsText;
-import org.argeo.slc.client.ui.dist.views.QueryBundlesForm;
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class DistributionPerspective implements IPerspectiveFactory {
-
-       public final static String ID = DistPlugin.ID + ".distributionPerspective";
-
-       public void createInitialLayout(IPageLayout layout) {
-               String editorArea = layout.getEditorArea();
-               layout.setEditorAreaVisible(true);
-               layout.setFixed(false);
-
-               IFolderLayout main = layout.createFolder("main", IPageLayout.LEFT,
-                               0.5f, editorArea);
-               main.addView(DistributionsView.ID);
-               main.addView(ArtifactsBrowser.ID);
-               main.addView(QueryArtifactsForm.ID);
-               main.addView(QueryBundlesForm.ID);
-               main.addView(QueryArtifactsText.ID);
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/BndProcess.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/BndProcess.java
deleted file mode 100644 (file)
index 72d6ad8..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.commands;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.jar.Manifest;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-
-import aQute.lib.osgi.Builder;
-import aQute.lib.osgi.Constants;
-import aQute.lib.osgi.Jar;
-
-public class BndProcess extends AbstractHandler implements Constants {
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               try {
-                       Builder b = new Builder();
-                       b.setProperty(EXPORT_PACKAGE, "org.osgi.framework");
-                       b.setProperty(PRIVATE_PACKAGE, "*");
-                       b.addClasspath(new File(
-                                       "/home/mbaudier/.m2/repository/org/eclipse/osgi/org.eclipse.osgi/3.6.1/org.eclipse.osgi-3.6.1.jar"));
-
-                       Jar jar = b.build();
-                       Manifest m = jar.getManifest();
-                       jar.write(new File(b.getBsn() + ".jar"));
-               } catch (IOException e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-               } catch (Exception e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-               }
-
-               return null;
-       }
-
-       public static void main(String[] args) {
-               try {
-                       new BndProcess().execute(null);
-               } catch (ExecutionException e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-               }
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/CopyWorkspace.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/CopyWorkspace.java
deleted file mode 100644 (file)
index adf339e..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-package org.argeo.slc.client.ui.dist.commands;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.Property;
-import javax.jcr.PropertyIterator;
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.nodetype.NodeType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.argeo.jcr.JcrUtils;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Create a copy of the chosen workspace in the current repository.
- */
-
-public class CopyWorkspace extends AbstractHandler {
-       private static final Log log = LogFactory.getLog(CopyWorkspace.class);
-       public final static String ID = DistPlugin.ID + ".copyWorkspace";
-       public final static String PARAM_WORKSPACE_NAME = DistPlugin.ID
-                       + ".workspaceName";
-       public final static String DEFAULT_LABEL = "Duplicate";
-       public final static String DEFAULT_ICON_PATH = "icons/addItem.gif";
-
-       /* DEPENDENCY INJECTION */
-       private Repository repository;
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               String srcWorkspaceName = event.getParameter(PARAM_WORKSPACE_NAME);
-
-               if (log.isTraceEnabled())
-                       log.debug("WORKSPACE " + srcWorkspaceName + " About to be copied");
-
-               // MessageDialog.openWarning(DistPlugin.getDefault()
-               // .getWorkbench().getDisplay().getActiveShell(),
-               // "WARNING", "Not yet implemented");
-               // return null;
-
-               IWorkbenchWindow iww = DistPlugin.getDefault().getWorkbench()
-                               .getActiveWorkbenchWindow();
-               InputDialog inputDialog = new InputDialog(iww.getShell(),
-                               "New copy of the current workspace",
-                               "Choose a name for the workspace to create", "", null);
-               inputDialog.open();
-               String newWorkspaceName = inputDialog.getValue();
-               Session srcSession = null;
-               Session newSession = null;
-               try {
-                       srcSession = repository.login(srcWorkspaceName);
-
-                       // Create the workspace
-                       srcSession.getWorkspace().createWorkspace(newWorkspaceName);
-                       Node srcRootNode = srcSession.getRootNode();
-                       // log in the newly created workspace
-                       newSession = repository.login(newWorkspaceName);
-                       //newSession.save();
-                       Node newRootNode = newSession.getRootNode();
-                       copy(srcRootNode, newRootNode);
-                       newSession.save();
-
-                       CommandHelpers.callCommand(RefreshDistributionsView.ID);
-               } catch (RepositoryException re) {
-                       throw new ArgeoException(
-                                       "Unexpected error while creating the new workspace.", re);
-               } finally {
-                       if (srcSession != null)
-                               srcSession.logout();
-                       if (newSession != null)
-                               newSession.logout();
-               }
-               return null;
-       }
-
-       // FIXME : commons is frozen, cannot fix the problem directly there.
-       // test and report corresponding patch
-       private void copy(Node fromNode, Node toNode) {
-               try {
-                       if (log.isDebugEnabled())
-                               log.debug("copy node :" + fromNode.getPath());
-
-                       // FIXME : small hack to enable specific workspace copy
-                       if (fromNode.isNodeType("rep:ACL")
-                                       || fromNode.isNodeType("rep:system")) {
-                               if (log.isTraceEnabled())
-                                       log.trace("node skipped");
-                               return;
-                       }
-
-                       // add mixins
-                       for (NodeType mixinType : fromNode.getMixinNodeTypes()) {
-                               toNode.addMixin(mixinType.getName());
-                       }
-
-                       // Double check
-                       for (NodeType mixinType : toNode.getMixinNodeTypes()) {
-                               if (log.isDebugEnabled())
-                                       log.debug(mixinType.getName());
-                       }
-
-                       // process properties
-                       PropertyIterator pit = fromNode.getProperties();
-                       properties: while (pit.hasNext()) {
-                               Property fromProperty = pit.nextProperty();
-                               String propName = fromProperty.getName();
-                               try {
-                                       String propertyName = fromProperty.getName();
-                                       if (toNode.hasProperty(propertyName)
-                                                       && toNode.getProperty(propertyName).getDefinition()
-                                                                       .isProtected())
-                                               continue properties;
-
-                                       if (fromProperty.getDefinition().isProtected())
-                                               continue properties;
-
-                                       if (propertyName.equals("jcr:created")
-                                                       || propertyName.equals("jcr:createdBy")
-                                                       || propertyName.equals("jcr:lastModified")
-                                                       || propertyName.equals("jcr:lastModifiedBy"))
-                                               continue properties;
-
-                                       if (fromProperty.isMultiple()) {
-                                               toNode.setProperty(propertyName,
-                                                               fromProperty.getValues());
-                                       } else {
-                                               toNode.setProperty(propertyName,
-                                                               fromProperty.getValue());
-                                       }
-                               } catch (RepositoryException e) {
-                                       throw new ArgeoException("Cannot property " + propName, e);
-                               }
-                       }
-
-                       // recursively process children nodes
-                       NodeIterator nit = fromNode.getNodes();
-                       while (nit.hasNext()) {
-                               Node fromChild = nit.nextNode();
-                               Integer index = fromChild.getIndex();
-                               String nodeRelPath = fromChild.getName() + "[" + index + "]";
-                               Node toChild;
-                               if (toNode.hasNode(nodeRelPath))
-                                       toChild = toNode.getNode(nodeRelPath);
-                               else
-                                       toChild = toNode.addNode(fromChild.getName(), fromChild
-                                                       .getPrimaryNodeType().getName());
-                               copy(fromChild, toChild);
-                       }
-
-                       // update jcr:lastModified and jcr:lastModifiedBy in toNode in case
-                       // they existed
-                       if (!toNode.getDefinition().isProtected()
-                                       && toNode.isNodeType(NodeType.MIX_LAST_MODIFIED))
-                               JcrUtils.updateLastModified(toNode);
-
-                       // Workaround to reduce session size: artifact is a saveable unity
-                       if (toNode.isNodeType(SlcTypes.SLC_ARTIFACT))
-                               toNode.getSession().save();
-
-               } catch (RepositoryException e) {
-                       throw new ArgeoException("Cannot copy " + fromNode + " to "
-                                       + toNode, e);
-               }
-       }
-
-       /* DEPENDENCY INJECTION */
-       public void setRepository(Repository repository) {
-               this.repository = repository;
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/CreateWorkspace.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/CreateWorkspace.java
deleted file mode 100644 (file)
index ccdc807..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.argeo.slc.client.ui.dist.commands;
-
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Create a new empty workspace in the current repository.
- */
-
-public class CreateWorkspace extends AbstractHandler {
-       private static final Log log = LogFactory.getLog(CreateWorkspace.class);
-       public final static String ID = DistPlugin.ID + ".createWorkspace";
-       public final static String DEFAULT_LABEL = "Create new workspace";
-       public final static String DEFAULT_ICON_PATH = "icons/addItem.gif";
-
-       /* DEPENDENCY INJECTION */
-       private Repository repository;
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               IWorkbenchWindow iww = DistPlugin.getDefault().getWorkbench()
-                               .getActiveWorkbenchWindow();
-               // TODO : add an input validator
-               InputDialog inputDialog = new InputDialog(iww.getShell(),
-                               "New workspace", "Choose a name for the workspace to create",
-                               "", null);
-               inputDialog.open();
-               String workspaceName = inputDialog.getValue();
-               Session session = null;
-               try {
-                       session = repository.login();
-                       session.getWorkspace().createWorkspace(workspaceName);
-                       CommandHelpers.callCommand(RefreshDistributionsView.ID);
-               } catch (RepositoryException re) {
-                       throw new ArgeoException(
-                                       "Unexpected error while creating the new workspace.", re);
-               } finally {
-                       if (session != null)
-                               session.logout();
-               }
-               if (log.isTraceEnabled())
-                       log.debug("WORKSPACE " + workspaceName + " CREATED");
-               return null;
-       }
-
-       /* DEPENDENCY INJECTION */
-       public void setRepository(Repository repository) {
-               this.repository = repository;
-       }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DeleteArtifacts.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DeleteArtifacts.java
deleted file mode 100644 (file)
index 88e9bda..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.argeo.slc.client.ui.dist.commands;
-
-import java.util.Iterator;
-
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-
-import org.argeo.ArgeoException;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Delete chosen artifacts from the current workspace.
- */
-
-public class DeleteArtifacts extends AbstractHandler {
-       // private static final Log log = LogFactory.getLog(DeleteWorkspace.class);
-       public final static String ID = DistPlugin.ID + ".deleteArtifacts";
-       public final static String DEFAULT_LABEL = "Delete selected items";
-       public final static String DEFAULT_ICON_PATH = "icons/removeItem.gif";
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               try {
-                       IWorkbenchPart activePart = DistPlugin.getDefault().getWorkbench()
-                                       .getActiveWorkbenchWindow().getActivePage().getActivePart();
-
-                       if (activePart instanceof IEditorPart) {
-                               ISelection selector = ((IEditorPart) activePart)
-                                               .getEditorSite().getSelectionProvider().getSelection();
-                               if (selector != null
-                                               && selector instanceof IStructuredSelection) {
-                                       Iterator<?> it = ((IStructuredSelection) selector)
-                                                       .iterator();
-
-                                       String msg = "Your are about to definitively remove the "
-                                                       + ((IStructuredSelection) selector).size()
-                                                       + " selected artifacts.\n"
-                                                       + "Are you sure you want to proceed ?";
-
-                                       boolean result = MessageDialog.openConfirm(DistPlugin
-                                                       .getDefault().getWorkbench().getDisplay()
-                                                       .getActiveShell(), "Confirm Delete", msg);
-
-                                       if (result) {
-                                               while (it.hasNext()) {
-                                                       Node node = (Node) it.next();
-                                                       // we remove the artifactVersion, that is the parent
-                                                       node.getParent().remove();
-                                                       node.getSession().save();
-                                               }
-                                       }
-                               }
-                       }
-                       CommandHelpers.callCommand(RefreshDistributionOverviewPage.ID);
-               } catch (RepositoryException re) {
-                       throw new ArgeoException(
-                                       "Unexpected error while deleting artifacts.", re);
-               }
-               return null;
-       }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DeleteWorkspace.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DeleteWorkspace.java
deleted file mode 100644 (file)
index 4c77c80..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.argeo.slc.client.ui.dist.commands;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.nodetype.NodeType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-/**
- * Delete chosen workspace in the current repository.
- */
-
-public class DeleteWorkspace extends AbstractHandler {
-       private static final Log log = LogFactory.getLog(DeleteWorkspace.class);
-
-       public final static String ID = DistPlugin.ID + ".deleteWorkspace";
-       public final static String PARAM_WORKSPACE_NAME = DistPlugin.ID
-                       + ".workspaceName";
-       public final static String DEFAULT_LABEL = "Delete";
-       public final static String DEFAULT_ICON_PATH = "icons/removeItem.gif";
-
-       /* DEPENDENCY INJECTION */
-       private Repository repository;
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-
-               // MessageDialog.openWarning(DistPlugin.getDefault()
-               // .getWorkbench().getDisplay().getActiveShell(),
-               // "WARNING", "Not yet implemented");
-               // return null;
-
-               String workspaceName = event.getParameter(PARAM_WORKSPACE_NAME);
-               String msg = "Your are about to clear workspace [" + workspaceName
-                               + "].\n Do you really want to proceed ?";
-
-               boolean result = MessageDialog.openConfirm(DistPlugin.getDefault()
-                               .getWorkbench().getDisplay().getActiveShell(),
-                               "Confirm workspace clear", msg);
-               if (result) {
-                       Session session = null;
-                       try {
-                               session = repository.login(workspaceName);
-                               NodeIterator nit = session.getRootNode().getNodes();
-                               while (nit.hasNext()) {
-                                       Node node = nit.nextNode();
-                                       if (node.isNodeType(NodeType.NT_FOLDER)
-                                                       || node.isNodeType(NodeType.NT_UNSTRUCTURED)) {
-                                               String path = node.getPath();
-                                               node.remove();
-                                               session.save();
-                                               if (log.isDebugEnabled())
-                                                       log.debug("Cleared " + path + " in "
-                                                                       + workspaceName);
-                                       }
-                               }
-                               CommandHelpers.callCommand(RefreshDistributionsView.ID);
-                       } catch (RepositoryException re) {
-                               throw new ArgeoException(
-                                               "Unexpected error while deleting workspace ["
-                                                               + workspaceName + "].", re);
-                       } finally {
-                               if (session != null)
-                                       session.logout();
-                       }
-               }
-               return null;
-       }
-
-       /* DEPENDENCY INJECTION */
-       public void setRepository(Repository repository) {
-               this.repository = repository;
-       }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/ManageWorkspaceAuth.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/ManageWorkspaceAuth.java
deleted file mode 100644 (file)
index 717e86b..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.argeo.slc.client.ui.dist.commands;
-
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-
-import org.argeo.ArgeoException;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.wizards.ChangeRightsWizard;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * Open a dialog to change rights on the root node of the current workspace.
- */
-
-public class ManageWorkspaceAuth extends AbstractHandler {
-       // private static final Log log =
-       // LogFactory.getLog(ManageWorkspaceAuth.class);
-       public final static String ID = DistPlugin.ID + ".manageWorkspaceAuth";
-       public final static String PARAM_WORKSPACE_NAME = DistPlugin.ID
-                       + ".workspaceName";
-       public final static String DEFAULT_LABEL = "Manage Rights";
-       public final static String DEFAULT_ICON_PATH = "icons/changeRights.gif";
-
-       /* DEPENDENCY INJECTION */
-       private Repository repository;
-
-       private Session session;
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               String workspaceName = event.getParameter(PARAM_WORKSPACE_NAME);
-               try {
-                       session = repository.login(workspaceName);
-                       ChangeRightsWizard wizard = new ChangeRightsWizard(session);
-                       WizardDialog dialog = new WizardDialog(
-                                       HandlerUtil.getActiveShell(event), wizard);
-                       dialog.open();
-                       return null;
-               } catch (RepositoryException re) {
-                       throw new ArgeoException(
-                                       "Unexpected error while creating the new workspace.", re);
-               } finally {
-                       if (session != null)
-                               session.logout();
-               }
-       }
-
-       /* DEPENDENCY INJECTION */
-       public void setRepository(Repository repository) {
-               this.repository = repository;
-       }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/NormalizeDistribution.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/NormalizeDistribution.java
deleted file mode 100644 (file)
index e10e75f..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.commands;
-
-import javax.jcr.Node;
-import javax.jcr.Property;
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.nodetype.NodeType;
-import javax.jcr.util.TraversingItemVisitor;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.jcr.JcrUtils;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.repo.ArtifactIndexer;
-import org.argeo.slc.repo.JarFileIndexer;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-
-/** Make sure than Maven and OSGi metadata are consistent */
-public class NormalizeDistribution extends AbstractHandler implements SlcNames {
-       public final static String ID = DistPlugin.ID + ".normalizeDistribution";
-       public final static String PARAM_WORKSPACE = "workspace";
-       public final static String DEFAULT_LABEL = "Normalize";
-       public final static String DEFAULT_ICON_PATH = "icons/addItem.gif";
-
-       private final static Log log = LogFactory
-                       .getLog(NormalizeDistribution.class);
-
-       private Repository repository;
-       private String artifactBasePath = "/";
-
-       private ArtifactIndexer artifactIndexer = new ArtifactIndexer();
-       private JarFileIndexer jarFileIndexer = new JarFileIndexer();
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               String workspace = event.getParameter(PARAM_WORKSPACE);
-               NormalizeJob job = new NormalizeJob(workspace);
-               job.setUser(true);
-               job.schedule();
-               return null;
-       }
-
-       public void setRepository(Repository repository) {
-               this.repository = repository;
-       }
-
-       private class NormalizeJob extends Job {
-               private String workspace;
-
-               public NormalizeJob(String workspace) {
-                       super("Normalize Distribution");
-                       this.workspace = workspace;
-               }
-
-               @Override
-               protected IStatus run(IProgressMonitor monitor) {
-                       Session session = null;
-                       try {
-                               session = repository.login(workspace);
-                               // QueryManager qm = session.getWorkspace().getQueryManager();
-                               // Query query = qm
-                               // .createQuery(
-                               // "select * from [nt:file] where NAME([nt:file]) like '%.jar'",
-                               // Query.JCR_SQL2);
-                               // // Query query = qm.createQuery("//*jar", Query.XPATH);
-                               // long count = query.execute().getRows().getSize();
-                               // if (log.isDebugEnabled())
-                               // log.debug("Count: " + count);
-                               // long count = query.execute().getRows().nextRow()
-                               // .getValue("count").getLong();
-                               monitor.beginTask("Normalize " + workspace, -1);
-                               NormalizingTraverser tiv = new NormalizingTraverser(monitor);
-                               session.getNode(artifactBasePath).accept(tiv);
-                       } catch (Exception e) {
-                               return new Status(IStatus.ERROR, DistPlugin.ID,
-                                               "Cannot normalize distribution " + workspace, e);
-                       } finally {
-                               JcrUtils.logoutQuietly(session);
-                       }
-                       return Status.OK_STATUS;
-               }
-
-       }
-
-       private class NormalizingTraverser extends TraversingItemVisitor {
-               IProgressMonitor monitor;
-
-               public NormalizingTraverser(IProgressMonitor monitor) {
-                       super();
-                       this.monitor = monitor;
-               }
-
-               @Override
-               protected void entering(Property property, int level)
-                               throws RepositoryException {
-               }
-
-               @Override
-               protected void entering(Node node, int level)
-                               throws RepositoryException {
-                       if (node.isNodeType(NodeType.NT_FILE)) {
-                               if (jarFileIndexer.support(node.getPath()))
-                                       if (artifactIndexer.support(node.getPath())) {
-                                               monitor.subTask(node.getName());
-                                               artifactIndexer.index(node);
-                                               jarFileIndexer.index(node);
-                                               node.getSession().save();
-                                               monitor.worked(1);
-                                               if (log.isDebugEnabled())
-                                                       log.debug("Processed " + node);
-                                       }
-                       }
-               }
-
-               @Override
-               protected void leaving(Property property, int level)
-                               throws RepositoryException {
-               }
-
-               @Override
-               protected void leaving(Node node, int level) throws RepositoryException {
-               }
-
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshArtifactBrowser.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshArtifactBrowser.java
deleted file mode 100644 (file)
index addaf12..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.commands;
-
-import org.argeo.slc.client.ui.dist.views.ArtifactsBrowser;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * Change visible state of the ArtifactBrower size column
- */
-public class RefreshArtifactBrowser extends AbstractHandler {
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               ArtifactsBrowser view = (ArtifactsBrowser) HandlerUtil
-                               .getActiveWorkbenchWindow(event).getActivePage()
-                               .findView(ArtifactsBrowser.ID);
-               view.refresh(null);
-               return null;
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshDistributionOverviewPage.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshDistributionOverviewPage.java
deleted file mode 100644 (file)
index 243d12b..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.argeo.slc.client.ui.dist.commands;
-
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.editors.DistributionEditor;
-import org.argeo.slc.client.ui.dist.editors.DistributionOverviewPage;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.forms.editor.IFormPage;
-
-/**
- * Force refresh of the Distribution overview page of the corresponding editor
- */
-
-public class RefreshDistributionOverviewPage extends AbstractHandler {
-       // private static final Log log = LogFactory
-       // .getLog(RefreshDistributionOverviewPage.class);
-       public final static String ID = DistPlugin.ID
-                       + ".refreshDistributionOverviewPage";
-       public final static String DEFAULT_LABEL = "Refresh the distribution overview";
-       public final static String DEFAULT_ICON_PATH = "icons/refresh.png";
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               IWorkbenchPart activePart = DistPlugin.getDefault().getWorkbench()
-                               .getActiveWorkbenchWindow().getActivePage().getActivePart();
-               if (activePart instanceof DistributionEditor) {
-                       IFormPage ifp = ((DistributionEditor) activePart)
-                                       .getActivePageInstance();
-                       if (ifp instanceof DistributionOverviewPage)
-                               ((DistributionOverviewPage) ifp).refresh();
-               }
-               return null;
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshDistributionsView.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshDistributionsView.java
deleted file mode 100644 (file)
index a9ba0a9..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.argeo.slc.client.ui.dist.commands;
-
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.views.DistributionsView;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Force refresh of the DistributionsView
- */
-
-public class RefreshDistributionsView extends AbstractHandler {
-       // private static final Log log = LogFactory
-       // .getLog(RefreshDistributionsView.class);
-       public final static String ID = DistPlugin.ID + ".refreshDistributionsView";
-       public final static String DEFAULT_LABEL = "Refresh the distribution view";
-       public final static String DEFAULT_ICON_PATH = "icons/refresh.png";
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               IWorkbenchPart activePart = DistPlugin.getDefault().getWorkbench()
-                               .getActiveWorkbenchWindow().getActivePage().getActivePart();
-               if (activePart instanceof DistributionsView)
-                       ((DistributionsView) activePart).refresh();
-               return null;
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RunInOsgi.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RunInOsgi.java
deleted file mode 100644 (file)
index f274b4b..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.commands;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileWriter;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.Property;
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.query.QueryManager;
-import javax.jcr.query.QueryResult;
-import javax.jcr.query.qom.Ordering;
-import javax.jcr.query.qom.QueryObjectModel;
-import javax.jcr.query.qom.QueryObjectModelFactory;
-import javax.jcr.query.qom.Selector;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.jcr.JcrUtils;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-
-public class RunInOsgi extends AbstractHandler implements SlcNames {
-       private final static Log log = LogFactory.getLog(RunInOsgi.class);
-
-       private Repository repository;
-       private String workspace;
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               File targetDirectory = new File(
-                               "/home/mbaudier/dev/work/120517-ArgeoTP/" + workspace);
-
-               InputStream jarStream = null;
-               OutputStream out = null;
-               Writer writer = null;
-               Session session = null;
-               try {
-                       FileUtils.deleteDirectory(targetDirectory);
-                       targetDirectory.mkdirs();
-
-                       session = repository.login(workspace);
-                       NodeIterator bundles = listBundleArtifacts(session);
-
-                       List<File> files = new ArrayList<File>();
-                       bundles: while (bundles.hasNext()) {
-                               Node bundleNode = bundles.nextNode();
-                               String symbolicName = JcrUtils.get(bundleNode,
-                                               SLC_SYMBOLIC_NAME);
-
-                               // skip sources
-                               if (symbolicName.endsWith(".source"))
-                                       continue bundles;
-                               // skip eclipse
-                               if (symbolicName.startsWith("org.eclipse")
-                                               && !symbolicName.equals("org.eclipse.osgi"))
-                                       continue bundles;
-                               if (symbolicName.equals("org.polymap.openlayers.rap.widget"))
-                                       continue bundles;
-
-                               File targetFile = new File(targetDirectory,
-                                               bundleNode.getName());
-                               out = new FileOutputStream(targetFile);
-                               jarStream = bundleNode.getNode(Node.JCR_CONTENT)
-                                               .getProperty(Property.JCR_DATA).getBinary().getStream();
-                               IOUtils.copy(jarStream, out);
-                               if (!symbolicName.equals("org.eclipse.osgi"))
-                                       files.add(targetFile);
-                               if (log.isDebugEnabled())
-                                       log.debug("Copied " + targetFile.getName());
-
-                               IOUtils.closeQuietly(out);
-                               IOUtils.closeQuietly(jarStream);
-                       }
-
-                       StringBuffer osgiBundles = new StringBuffer("osgi.bundles=");
-                       for (int i = 0; i < files.size(); i++) {
-                               if (i != 0)
-                                       osgiBundles.append(',');
-                               osgiBundles.append(files.get(i).getName());
-                       }
-
-                       File confDir = new File(targetDirectory, "configuration");
-                       confDir.mkdirs();
-                       File confIni = new File(confDir, "config.ini");
-                       writer = new FileWriter(confIni);
-                       writer.write(osgiBundles.toString());
-                       IOUtils.closeQuietly(writer);
-               } catch (Exception e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-               } finally {
-                       IOUtils.closeQuietly(jarStream);
-                       IOUtils.closeQuietly(out);
-                       IOUtils.closeQuietly(writer);
-                       JcrUtils.logoutQuietly(session);
-               }
-
-               return null;
-       }
-
-       static NodeIterator listBundleArtifacts(Session session)
-                       throws RepositoryException {
-               QueryManager queryManager = session.getWorkspace().getQueryManager();
-               QueryObjectModelFactory factory = queryManager.getQOMFactory();
-
-               final String bundleArtifactsSelector = "bundleArtifacts";
-               Selector source = factory.selector(SlcTypes.SLC_BUNDLE_ARTIFACT,
-                               bundleArtifactsSelector);
-
-               Ordering order = factory.ascending(factory.propertyValue(
-                               bundleArtifactsSelector, SlcNames.SLC_SYMBOLIC_NAME));
-               Ordering[] orderings = { order };
-
-               QueryObjectModel query = factory.createQuery(source, null, orderings,
-                               null);
-
-               QueryResult result = query.execute();
-               return result.getNodes();
-       }
-
-       public void setRepository(Repository repository) {
-               this.repository = repository;
-       }
-
-       public void setWorkspace(String workspace) {
-               this.workspace = workspace;
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/ShowSizeColumn.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/ShowSizeColumn.java
deleted file mode 100644 (file)
index 10ba035..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.commands;
-
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.views.ArtifactsBrowser;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.Command;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.State;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * Change visible state of the ArtifactBrower size column
- */
-public class ShowSizeColumn extends AbstractHandler {
-       public final static String ID = DistPlugin.ID + ".showSizeColumn";
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               ArtifactsBrowser view = (ArtifactsBrowser) HandlerUtil
-                               .getActiveWorkbenchWindow(event).getActivePage()
-                               .findView(ArtifactsBrowser.ID);
-
-               ICommandService service = (ICommandService) PlatformUI.getWorkbench()
-                               .getService(ICommandService.class);
-               Command command = service.getCommand(ID);
-               State state = command.getState(ID + ".toggleState");
-       
-               boolean wasVisible = (Boolean) state.getValue();
-               view.setSizeVisible(!wasVisible);
-               state.setValue(!wasVisible);
-               return null;
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ArtifactDetailsPage.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ArtifactDetailsPage.java
deleted file mode 100644 (file)
index 23d0eb6..0000000
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.editors;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.Property;
-import javax.jcr.PropertyIterator;
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-import javax.jcr.nodetype.NodeType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.argeo.slc.client.ui.dist.DistImages;
-import org.argeo.slc.client.ui.dist.utils.DistUiHelpers;
-import org.argeo.slc.client.ui.dist.utils.GenericDoubleClickListener;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerCell;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.editor.FormPage;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-
-/**
- * Generic editor property page. Lists all properties of current node as a
- * complex tree. TODO: enable editing
- */
-
-public class ArtifactDetailsPage extends FormPage implements SlcNames, SlcTypes {
-       private final static Log log = LogFactory.getLog(ArtifactDetailsPage.class);
-
-       // Main business Objects
-       private Node currentNode;
-
-       // This page widgets
-       private FormToolkit tk;
-       private TreeViewer complexTree;
-       private Text mavenSnippet;
-
-       public ArtifactDetailsPage(FormEditor editor, String title, Node currentNode) {
-               super(editor, "id", title);
-               this.currentNode = currentNode;
-       }
-
-       protected void createFormContent(IManagedForm managedForm) {
-               tk = managedForm.getToolkit();
-               ScrolledForm form = managedForm.getForm();
-               GridLayout layout = new GridLayout(1, false);
-               layout.marginWidth = 5;
-               form.getBody().setLayout(layout);
-
-               complexTree = createComplexTree(form.getBody());
-               createMavenSnipet(form.getBody());
-       }
-
-       private TreeViewer createComplexTree(Composite parent) {
-               int style = SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION;
-               Tree tree = new Tree(parent, style);
-               GridData gd = new GridData(GridData.FILL_BOTH);
-               gd.grabExcessHorizontalSpace = true;
-               gd.grabExcessVerticalSpace = true;
-               tree.setLayoutData(gd);
-               createColumn(tree, "Attribute", SWT.LEFT, 200);
-               createColumn(tree, "Value", SWT.LEFT, 200);
-               tree.setLinesVisible(true);
-               tree.setHeaderVisible(true);
-
-               TreeViewer result = new TreeViewer(tree);
-               result.setContentProvider(new TreeContentProvider());
-               result.setLabelProvider(new TreeLabelProvider());
-
-               result.setInput(currentNode);
-               result.expandToLevel(2);
-
-               result.addDoubleClickListener(new GenericDoubleClickListener(result));
-               // result.expandAll();
-               return result;
-       }
-
-       private void createMavenSnipet(Composite parent) {
-               mavenSnippet = new Text(parent, SWT.MULTI | SWT.WRAP | SWT.BORDER);
-               GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-               gd.grabExcessHorizontalSpace = true;
-               gd.heightHint = 75;
-               mavenSnippet.setLayoutData(gd);
-               mavenSnippet.setText(generateXmlSnippet());
-       }
-
-       // Helpers
-       private String generateXmlSnippet() {
-               try {
-                       StringBuffer sb = new StringBuffer();
-                       sb.append("<dependency>\n");
-                       sb.append("\t<groupeId>");
-                       sb.append(currentNode.getProperty(SLC_GROUP_ID).getString());
-                       sb.append("</groupeId>\n");
-                       sb.append("\t<artifactId>");
-                       sb.append(currentNode.getProperty(SLC_ARTIFACT_ID).getString());
-                       sb.append("</artifactId>\n");
-                       sb.append("\t<version>");
-                       sb.append(currentNode.getProperty(SLC_ARTIFACT_VERSION).getString());
-                       sb.append("</version>\n");
-                       sb.append("</dependency>");
-                       return sb.toString();
-               } catch (RepositoryException re) {
-                       throw new ArgeoException(
-                                       "unexpected error while generating maven snippet");
-               }
-       }
-
-       private static TreeColumn createColumn(Tree parent, String name, int style,
-                       int width) {
-               TreeColumn result = new TreeColumn(parent, style);
-               result.setText(name);
-               result.setWidth(width);
-               result.setMoveable(true);
-               result.setResizable(true);
-               return result;
-       }
-
-       // View specific object
-       private class ViewSpecificItems {
-               private String key;
-               private Object value;
-               private boolean isFolder;
-               private Node curNode;
-
-               public ViewSpecificItems(String key, Object value, boolean isFolder) {
-                       this.key = key;
-                       this.value = value;
-                       this.isFolder = isFolder;
-               }
-
-               public String getKey() {
-                       return key;
-               }
-
-               public void setNode(Node node) {
-                       this.curNode = node;
-               }
-
-               public Node getNode() {
-                       return curNode;
-               }
-
-               public Object getValue() {
-                       return value;
-               }
-
-               public boolean isFolder() {
-                       return isFolder;
-               }
-
-       }
-
-       // providers
-       private class TreeLabelProvider extends ColumnLabelProvider implements
-                       SlcTypes, SlcNames {
-
-               public void update(ViewerCell cell) {
-                       try {
-
-                               int colIndex = cell.getColumnIndex();
-                               Object element = cell.getElement();
-                               if (element instanceof Property) {
-                                       Property prop = (Property) element;
-                                       if (colIndex == 0)
-                                               cell.setText(DistUiHelpers.getLabelJcrName(prop
-                                                               .getName()));
-                                       else if (colIndex == 1)
-                                               cell.setText(DistUiHelpers.formatValueAsString(prop
-                                                               .getValue()));
-
-                               } else if (element instanceof ViewSpecificItems) {
-                                       if (colIndex == 0)
-                                               cell.setText(((ViewSpecificItems) element).getKey());
-                                       else if (colIndex == 1)
-                                               cell.setText(DistUiHelpers
-                                                               .formatAsString(((ViewSpecificItems) element)
-                                                                               .getValue()));
-
-                               } else if (element instanceof Node) {
-                                       Node node = (Node) element;
-                                       if (colIndex == 0) {
-                                               if (node.isNodeType(NodeType.NT_FILE)) {
-                                                       cell.setImage(DistImages.IMG_FILE);
-                                                       cell.setText(node.getName());
-                                               } else if (node.isNodeType(SLC_IMPORTED_PACKAGE))
-                                                       cell.setText("Import package");
-                                               else if (node.isNodeType(SLC_EXPORTED_PACKAGE))
-                                                       cell.setText("Export package");
-
-                                       } else if (colIndex == 1) {
-                                               if (node.isNodeType(SLC_ARTIFACT)) {
-                                                       StringBuffer sb = new StringBuffer("");
-                                                       if (node.hasProperty(SLC_ARTIFACT_CLASSIFIER)) {
-                                                               sb.append(node.getProperty(
-                                                                               SLC_ARTIFACT_CLASSIFIER).getString());
-                                                               sb.append(" ");
-                                                       }
-                                                       if (node.hasProperty(SLC_ARTIFACT_EXTENSION))
-                                                               sb.append(node.getProperty(
-                                                                               SLC_ARTIFACT_EXTENSION).getString());
-                                                       cell.setText(sb.toString());
-                                               } else if (node.isNodeType(SLC_IMPORTED_PACKAGE)
-                                                               || node.isNodeType(SLC_EXPORTED_PACKAGE))
-                                                       cell.setText(node.getProperty(SLC_NAME).getString());
-                                       }
-                               }
-                       } catch (RepositoryException e) {
-                               throw new ArgeoException(
-                                               "unexpected error while getting artifact information",
-                                               e);
-                       }
-               }
-       }
-
-       private class TreeContentProvider implements ITreeContentProvider {
-               public Object[] getElements(Object parent) {
-                       List<Object> elements = new ArrayList<Object>();
-
-                       try {
-                               Node node = (Node) parent;
-                               elements = new ArrayList<Object>();
-
-                               // Maven coordinates
-                               elements.add(node.getProperty(SLC_GROUP_ID));
-                               elements.add(node.getProperty(SLC_ARTIFACT_ID));
-                               elements.add(node.getProperty(SLC_ARTIFACT_VERSION));
-
-                               // Meta information
-                               // boolean gotSource = false;
-                               // // TODO: implement this check
-                               // elements.add(new ViewSpecificItems("Sources available",
-                               // gotSource));
-
-                               // Jars
-                               NodeIterator ni = node.getNodes();
-                               while (ni.hasNext()) {
-                                       Node child = ni.nextNode();
-                                       if (child.isNodeType(SLC_ARTIFACT)) {
-                                               // we skip sha1 files for the time being.
-                                               elements.add(child);
-                                       }
-                               }
-                       } catch (RepositoryException e) {
-                               throw new ArgeoException(
-                                               "Unexpected exception while listing node properties", e);
-                       }
-                       return elements.toArray();
-               }
-
-               public Object getParent(Object child) {
-                       return null;
-               }
-
-               public Object[] getChildren(Object parent) {
-                       Object[] result = null;
-                       try {
-                               if (parent instanceof Property) {
-                                       Property prop = (Property) parent;
-                                       if (prop.isMultiple()) {
-                                               Value[] values = prop.getValues();
-                                               return values;
-                                       }
-                               } else if (parent instanceof Node) {
-                                       Node node = (Node) parent;
-                                       if (node.hasNodes()) {
-                                               List<Object> elements = new ArrayList<Object>();
-                                               PropertyIterator pi = node.getProperties();
-                                               while (pi.hasNext()) {
-                                                       Property curProp = pi.nextProperty();
-                                                       if (!curProp.getName().startsWith("jcr:")
-                                                                       && !curProp.isMultiple())
-                                                               elements.add(curProp);
-                                               }
-
-                                               NodeIterator ni = node.getNodes();
-                                               while (ni.hasNext()) {
-                                                       Node curNode = ni.nextNode();
-                                                       if (curNode.isNodeType(SLC_IMPORTED_PACKAGE)
-                                                                       || curNode.isNodeType(SLC_EXPORTED_PACKAGE)) {
-                                                               ViewSpecificItems vsi = new ViewSpecificItems(
-                                                                               "Bundle dependencies", "", true);
-                                                               vsi.setNode(node);
-                                                               elements.add(vsi);
-                                                               break;
-                                                       }
-                                               }
-                                               return elements.toArray();
-                                       }
-                               } else if (parent instanceof ViewSpecificItems
-                                               && ((ViewSpecificItems) parent).isFolder()) {
-                                       NodeIterator ni = ((ViewSpecificItems) parent).getNode()
-                                                       .getNodes();
-                                       List<Node> elements = new ArrayList<Node>();
-                                       while (ni.hasNext()) {
-                                               Node curNode = ni.nextNode();
-                                               if (curNode.isNodeType(SLC_IMPORTED_PACKAGE)
-                                                               || curNode.isNodeType(SLC_EXPORTED_PACKAGE)) {
-                                                       elements.add(curNode);
-                                               }
-                                       }
-                                       return elements.toArray();
-                               }
-                       } catch (RepositoryException e) {
-                               throw new ArgeoException(
-                                               "Unexpected error getting multiple values property.", e);
-                       }
-                       return result;
-               }
-
-               public boolean hasChildren(Object parent) {
-                       try {
-                               if (parent instanceof Property
-                                               && ((Property) parent).isMultiple()) {
-                                       return true;
-                               } else if (parent instanceof Node && ((Node) parent).hasNodes()
-                                               && ((Node) parent).isNodeType(SLC_BUNDLE_ARTIFACT)) {
-                                       return true;
-                               } else if (parent instanceof ViewSpecificItems
-                                               && ((ViewSpecificItems) parent).isFolder()) {
-                                       return true;
-                               }
-                       } catch (RepositoryException e) {
-                               throw new ArgeoException(
-                                               "Unexpected exception while checking if property is multiple",
-                                               e);
-                       }
-                       return false;
-               }
-
-               public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-               }
-
-               public void dispose() {
-               }
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditor.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditor.java
deleted file mode 100644 (file)
index 4482504..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.editors;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-
-import org.argeo.ArgeoException;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.jcr.SlcNames;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.forms.editor.FormEditor;
-
-/**
- * Editor to browse, analyze and modify an OSGi distribution
- */
-public class DistributionEditor extends FormEditor implements SlcNames {
-       // private final static Log log =
-       // LogFactory.getLog(DistributionEditor.class);
-       public final static String ID = DistPlugin.ID + ".distributionEditor";
-
-       private Session session;
-
-       @Override
-       public void init(IEditorSite site, IEditorInput input)
-                       throws PartInitException {
-               DistributionEditorInput dei = (DistributionEditorInput) input;
-               try {
-                       session = dei.getRepository().login(dei.getWorkspaceName());
-               } catch (RepositoryException e) {
-                       throw new PartInitException("Cannot log to workspace "
-                                       + dei.getWorkspaceName(), e);
-               }
-               setPartName(dei.getWorkspaceName());
-               super.init(site, input);
-       }
-
-       @Override
-       protected void addPages() {
-               try {
-                       addPage(new DistributionOverviewPage(this, "Overview", session));
-               } catch (PartInitException e) {
-                       throw new ArgeoException("Cannot add distribution editor pages", e);
-               }
-       }
-
-       @Override
-       public void doSave(IProgressMonitor arg0) {
-       }
-
-       @Override
-       public void dispose() {
-               if (session != null)
-                       session.logout();
-               super.dispose();
-       }
-
-       @Override
-       public void doSaveAs() {
-       }
-
-       @Override
-       public boolean isSaveAsAllowed() {
-               return false;
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditorInput.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditorInput.java
deleted file mode 100644 (file)
index 38d9254..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.editors;
-
-import javax.jcr.Repository;
-
-import org.argeo.slc.jcr.SlcNames;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-
-/**
- * An editor input pointing to a distribution
- * */
-public class DistributionEditorInput implements IEditorInput, SlcNames {
-
-       private Repository repository;
-       private String workspaceName;
-       private String artifactsBase = "/";
-
-       public DistributionEditorInput(Repository repository, String workspaceName,
-                       String artifactsBase) {
-               super();
-               this.repository = repository;
-               this.workspaceName = workspaceName;
-               this.artifactsBase = artifactsBase;
-       }
-
-       public DistributionEditorInput(Repository repository, String workspaceName) {
-               this(repository, workspaceName, "/");
-       }
-
-       public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
-               return null;
-       }
-
-       public boolean exists() {
-               return true;
-       }
-
-       public ImageDescriptor getImageDescriptor() {
-               return null;
-       }
-
-       // Dummy compulsory methods
-       public String getToolTipText() {
-               return workspaceName;
-       }
-
-       public String getName() {
-               return workspaceName;
-       }
-
-       public IPersistableElement getPersistable() {
-               return null;
-       }
-
-       public boolean equals(Object obj) {
-               if (this == obj)
-                       return true;
-               if (obj == null)
-                       return false;
-               if (!(obj instanceof DistributionEditorInput))
-                       return false;
-
-               DistributionEditorInput other = (DistributionEditorInput) obj;
-               return getRepository().equals(other.getRepository())
-                               && getWorkspaceName().equals(other.getWorkspaceName());
-       }
-
-       public Repository getRepository() {
-               return repository;
-       }
-
-       public String getWorkspaceName() {
-               return workspaceName;
-       }
-
-       public String getArtifactsBase() {
-               return artifactsBase;
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionOverviewPage.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionOverviewPage.java
deleted file mode 100644 (file)
index 54d2c3c..0000000
+++ /dev/null
@@ -1,308 +0,0 @@
-package org.argeo.slc.client.ui.dist.editors;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.query.QueryManager;
-import javax.jcr.query.QueryResult;
-import javax.jcr.query.qom.Ordering;
-import javax.jcr.query.qom.QueryObjectModel;
-import javax.jcr.query.qom.QueryObjectModelFactory;
-import javax.jcr.query.qom.Selector;
-
-import org.argeo.eclipse.ui.ErrorFeedback;
-import org.argeo.jcr.JcrUtils;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.commands.DeleteArtifacts;
-import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
-import org.argeo.slc.client.ui.dist.utils.NodeViewerComparator;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.editor.FormPage;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.osgi.framework.Constants;
-
-/** Table giving an overview of an OSGi distribution */
-public class DistributionOverviewPage extends FormPage implements SlcNames {
-       private TableViewer viewer;
-       private Session session;
-
-       private NodeViewerComparator comparator;
-
-       public DistributionOverviewPage(FormEditor formEditor, String title,
-                       Session session) {
-               super(formEditor, "distributionPage", title);
-               this.session = session;
-       }
-
-       @Override
-       protected void createFormContent(IManagedForm managedForm) {
-               ScrolledForm form = managedForm.getForm();
-               GridLayout layout = new GridLayout(1, false);
-               form.getBody().setLayout(layout);
-
-               // helpers to enable sorting by column
-               List<String> propertiesList = new ArrayList<String>();
-               List<Integer> propertyTypesList = new ArrayList<Integer>();
-
-               // Define the TableViewer
-               viewer = new TableViewer(form.getBody(), SWT.MULTI | SWT.H_SCROLL
-                               | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);
-
-               TableViewerColumn col = new TableViewerColumn(viewer,  SWT.V_SCROLL);
-               col.getColumn().setWidth(300);
-               col.getColumn().setText("Symbolic name");
-               col.setLabelProvider(new ColumnLabelProvider() {
-                       @Override
-                       public String getText(Object element) {
-                               return JcrUtils.get((Node) element, SLC_SYMBOLIC_NAME);
-                       }
-               });
-               col.getColumn().addSelectionListener(getSelectionAdapter(0));
-               propertiesList.add(SLC_SYMBOLIC_NAME);
-               propertyTypesList.add(PropertyType.STRING);
-
-               col = new TableViewerColumn(viewer, SWT.NONE);
-               col.getColumn().setWidth(100);
-               col.getColumn().setText("Version");
-               col.setLabelProvider(new ColumnLabelProvider() {
-                       @Override
-                       public String getText(Object element) {
-                               return JcrUtils.get((Node) element, SLC_BUNDLE_VERSION);
-                       }
-               });
-               col.getColumn().addSelectionListener(getSelectionAdapter(1));
-               propertiesList.add(SLC_BUNDLE_VERSION);
-               propertyTypesList.add(PropertyType.STRING);
-
-               col = new TableViewerColumn(viewer, SWT.NONE);
-               col.getColumn().setWidth(150);
-               col.getColumn().setText("Group ID");
-               col.setLabelProvider(new ColumnLabelProvider() {
-                       @Override
-                       public String getText(Object element) {
-                               return JcrUtils.get((Node) element, SLC_GROUP_ID);
-                       }
-               });
-               col.getColumn().addSelectionListener(getSelectionAdapter(2));
-               propertiesList.add(SLC_GROUP_ID);
-               propertyTypesList.add(PropertyType.STRING);
-
-               col = new TableViewerColumn(viewer, SWT.NONE);
-               col.getColumn().setWidth(300);
-               col.getColumn().setText("Name");
-               col.setLabelProvider(new ColumnLabelProvider() {
-                       @Override
-                       public String getText(Object element) {
-                               return JcrUtils.get((Node) element, SLC_
-                                               + Constants.BUNDLE_NAME);
-                       }
-               });
-               col.getColumn().addSelectionListener(getSelectionAdapter(3));
-               propertiesList.add(SLC_ + Constants.BUNDLE_NAME);
-               propertyTypesList.add(PropertyType.STRING);
-
-               final Table table = viewer.getTable();
-               table.setHeaderVisible(true);
-               table.setLinesVisible(true);
-               table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
-               viewer.setContentProvider(new DistributionsContentProvider());
-               getSite().setSelectionProvider(viewer);
-
-               viewer.setInput(session);
-               comparator = new NodeViewerComparator(1,
-                               NodeViewerComparator.DESCENDING, propertiesList,
-                               propertyTypesList);
-               viewer.setComparator(comparator);
-
-               MenuManager menuManager = new MenuManager();
-               Menu menu = menuManager.createContextMenu(viewer.getTable());
-               menuManager.addMenuListener(new IMenuListener() {
-                       public void menuAboutToShow(IMenuManager manager) {
-                               contextMenuAboutToShow(manager);
-                       }
-               });
-               viewer.getTable().setMenu(menu);
-               getSite().registerContextMenu(menuManager, viewer);
-
-       }
-
-       @Override
-       public void setFocus() {
-               viewer.getTable().setFocus();
-       }
-
-       /** force refresh of the artifact list */
-       public void refresh() {
-               viewer.refresh();
-       }
-
-       /** Programatically configure the context menu */
-       protected void contextMenuAboutToShow(IMenuManager menuManager) {
-               IWorkbenchWindow window = DistPlugin.getDefault().getWorkbench()
-                               .getActiveWorkbenchWindow();
-
-               // Build conditions depending on element type (repo or workspace)
-
-               // Delete selected artifacts
-               CommandHelpers.refreshCommand(menuManager, window, DeleteArtifacts.ID,
-                               DeleteArtifacts.DEFAULT_LABEL,
-                               DeleteArtifacts.DEFAULT_ICON_PATH, true);
-
-       }
-
-       static NodeIterator listBundleArtifacts(Session session)
-                       throws RepositoryException {
-               QueryManager queryManager = session.getWorkspace().getQueryManager();
-               QueryObjectModelFactory factory = queryManager.getQOMFactory();
-
-               final String bundleArtifactsSelector = "bundleArtifacts";
-               Selector source = factory.selector(SlcTypes.SLC_BUNDLE_ARTIFACT,
-                               bundleArtifactsSelector);
-
-               Ordering order = factory.ascending(factory.propertyValue(
-                               bundleArtifactsSelector, SlcNames.SLC_SYMBOLIC_NAME));
-               Ordering[] orderings = { order };
-
-               QueryObjectModel query = factory.createQuery(source, null, orderings,
-                               null);
-
-               QueryResult result = query.execute();
-               return result.getNodes();
-       }
-
-       private SelectionAdapter getSelectionAdapter(final int index) {
-               SelectionAdapter selectionAdapter = new SelectionAdapter() {
-                       @Override
-                       public void widgetSelected(SelectionEvent e) {
-                               Table table = viewer.getTable();
-                               comparator.setColumn(index);
-                               int dir = table.getSortDirection();
-                               if (table.getSortColumn() == table.getColumn(index)) {
-                                       dir = dir == SWT.UP ? SWT.DOWN : SWT.UP;
-                               } else {
-                                       dir = SWT.DOWN;
-                               }
-                               table.setSortDirection(dir);
-                               table.setSortColumn(table.getColumn(index));
-                               viewer.refresh();
-                       }
-               };
-               return selectionAdapter;
-       }
-
-       private static class DistributionsContentProvider implements
-                       IStructuredContentProvider {
-               private Session session;
-
-               public void dispose() {
-               }
-
-               public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-                       session = (Session) newInput;
-               }
-
-               public Object[] getElements(Object arg0) {
-                       try {
-                               List<Node> nodes = JcrUtils
-                                               .nodeIteratorToList(listBundleArtifacts(session));
-                               return nodes.toArray();
-                       } catch (RepositoryException e) {
-                               ErrorFeedback.show("Cannot list bundles", e);
-                               return null;
-                       }
-               }
-       }
-       //
-       // private class BoundedLayout extends Layout {
-       // protected Layout delegateLayout;
-       //
-       // protected Method computeSizeMethod;
-       // protected Method layoutMethod;
-       //
-       // protected boolean widthBound;
-       //
-       // public BoundedLayout(Layout delegateLayout, boolean widthBound) {
-       // setDelegateLayout(delegateLayout);
-       // this.widthBound = widthBound;
-       // }
-       //
-       // public Layout getDelegateLayout() {
-       // return delegateLayout;
-       // }
-       //
-       // public void setDelegateLayout(Layout delegateLayout) {
-       // this.delegateLayout = delegateLayout;
-       //
-       // try {
-       // computeSizeMethod = delegateLayout.getClass()
-       // .getDeclaredMethod("computeSize", Composite.class,
-       // int.class, int.class, boolean.class);
-       // computeSizeMethod.setAccessible(true);
-       //
-       // layoutMethod = delegateLayout.getClass().getDeclaredMethod(
-       // "layout", Composite.class, boolean.class);
-       // layoutMethod.setAccessible(true);
-       // } catch (Exception e) {
-       // throw new RuntimeException(e);
-       // }
-       // }
-       //
-       // @Override
-       // protected Point computeSize(Composite composite, int wHint, int hHint,
-       // boolean flushCache) {
-       // // get comp size to make sure we don't let any children exceed it
-       // Point compSize = composite.getSize();
-       //
-       // try {
-       // Point layoutComputedSize = (Point) computeSizeMethod.invoke(
-       // delegateLayout, composite, wHint, hHint, flushCache);
-       //
-       // if (widthBound) {
-       // layoutComputedSize.x = Math.min(compSize.x,
-       // layoutComputedSize.x);
-       // } else {
-       // layoutComputedSize.y = Math.min(compSize.y,
-       // layoutComputedSize.y);
-       // }
-       //
-       // return layoutComputedSize;
-       // } catch (Exception e) {
-       // throw new RuntimeException(e);
-       // }
-       // }
-       //
-       // @Override
-       // protected void layout(Composite composite, boolean flushCache) {
-       // try {
-       // layoutMethod.invoke(delegateLayout, composite, flushCache);
-       // } catch (Exception e) {
-       // throw new RuntimeException(e);
-       // }
-       // }
-       // }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/GenericArtifactEditor.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/GenericArtifactEditor.java
deleted file mode 100644 (file)
index 137cef1..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.editors;
-
-import javax.jcr.Node;
-
-import org.argeo.ArgeoException;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.forms.editor.FormEditor;
-
-/**
- * 
- * Container for the node editor page. At creation time, it takes a JCR Node
- * that cannot be changed afterwards.
- * 
- */
-public class GenericArtifactEditor extends FormEditor {
-
-       // private final static Log log =
-       // LogFactory.getLog(GenericNodeEditor.class);
-       public final static String ID = DistPlugin.ID + ".genericArtifactEditor";
-
-       // business objects
-       private Node artifactNode;
-
-       // This Editor widgets
-       private ArtifactDetailsPage artifactDetailsPage;
-
-       public void init(IEditorSite site, IEditorInput input)
-                       throws PartInitException {
-               super.init(site, input);
-               GenericArtifactEditorInput gaei = (GenericArtifactEditorInput) getEditorInput();
-               artifactNode = gaei.getArtifactNode();
-               this.setPartName(gaei.getArtifactId());
-       }
-
-       @Override
-       protected void addPages() {
-               try {
-
-                       artifactDetailsPage = new ArtifactDetailsPage(this, "Main",
-                                       artifactNode);
-                       addPage(artifactDetailsPage);
-               } catch (PartInitException e) {
-                       throw new ArgeoException("Not able to add an empty page ", e);
-               }
-       }
-
-       @Override
-       public void doSaveAs() {
-               // unused compulsory method
-       }
-
-       @Override
-       public void doSave(IProgressMonitor monitor) {
-               try {
-                       // Automatically commit all pages of the editor
-                       commitPages(true);
-                       firePropertyChange(PROP_DIRTY);
-               } catch (Exception e) {
-                       throw new ArgeoException("Error while saving node", e);
-               }
-
-       }
-
-       @Override
-       public boolean isSaveAsAllowed() {
-               return true;
-       }
-
-       Node getArtifactNode() {
-               return artifactNode;
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/GenericArtifactEditorInput.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/GenericArtifactEditorInput.java
deleted file mode 100644 (file)
index 18e4cd9..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.editors;
-
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-
-import org.argeo.ArgeoException;
-import org.argeo.slc.jcr.SlcNames;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-
-/**
- * An editor input based the JCR node object.
- * */
-
-public class GenericArtifactEditorInput implements IEditorInput, SlcNames {
-
-       private final Node artifactNode;
-       // cache key properties at creation time to avoid Exception at recoring time
-       // when the session has been closed
-       private String artifactId;
-       private String groupId;
-       private String version;
-
-       public GenericArtifactEditorInput(Node artifactNode) {
-               this.artifactNode = artifactNode;
-               try {
-                       artifactId = artifactNode.getProperty(SLC_ARTIFACT_ID).getString();
-                       groupId = artifactNode.getProperty(SLC_GROUP_ID).getString();
-                       version = artifactNode.getProperty(SLC_ARTIFACT_VERSION)
-                                       .getString();
-               } catch (RepositoryException re) {
-                       throw new ArgeoException(
-                                       "unexpected error while getting node key values at creation time",
-                                       re);
-               }
-       }
-
-       public Node getArtifactNode() {
-               return artifactNode;
-       }
-
-       public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
-               return null;
-       }
-
-       public boolean exists() {
-               return true;
-       }
-
-       public ImageDescriptor getImageDescriptor() {
-               return null;
-       }
-
-       public String getArtifactId() {
-               return artifactId;
-       }
-
-       public String getGroupId() {
-               return groupId;
-       }
-
-       public String getVersion() {
-               return version;
-       }
-
-       // Dummy compulsory methods
-       public String getToolTipText() {
-               return artifactId + ":" + groupId + ":" + version;
-       }
-
-       public String getName() {
-               return artifactId + ":" + groupId + ":" + version;
-       }
-
-       public IPersistableElement getPersistable() {
-               return null;
-       }
-
-       /**
-        * equals method based on coordinates
-        */
-       public boolean equals(Object obj) {
-               if (this == obj)
-                       return true;
-               if (obj == null)
-                       return false;
-               if (getClass() != obj.getClass())
-                       return false;
-
-               GenericArtifactEditorInput other = (GenericArtifactEditorInput) obj;
-               if (!getGroupId().equals(other.getGroupId()))
-                       return false;
-               if (!getArtifactId().equals(other.getArtifactId()))
-                       return false;
-               if (!getVersion().equals(other.getVersion()))
-                       return false;
-               return true;
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/providers/ArtifactLabelProvider.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/providers/ArtifactLabelProvider.java
deleted file mode 100644 (file)
index a8edf5a..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.providers;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-
-import javax.jcr.Node;
-import javax.jcr.Property;
-import javax.jcr.RepositoryException;
-
-import org.argeo.ArgeoException;
-import org.argeo.jcr.JcrUtils;
-import org.argeo.slc.client.ui.dist.DistConstants;
-import org.argeo.slc.client.ui.dist.DistImages;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.ViewerCell;
-import org.eclipse.swt.graphics.Image;
-
-public class ArtifactLabelProvider extends ColumnLabelProvider implements
-               DistConstants, SlcTypes {
-
-       // To be able to change column order easily
-       public static final int COLUMN_TREE = 0;
-       public static final int COLUMN_DATE = 1;
-       public static final int COLUMN_SIZE = 2;
-
-       // Utils
-       protected static DateFormat timeFormatter = new SimpleDateFormat(
-                       DATE_TIME_FORMAT);
-
-       public void update(ViewerCell cell) {
-               int colIndex = cell.getColumnIndex();
-               Object element = cell.getElement();
-               cell.setText(getColumnText(element, colIndex));
-               if (element instanceof Node && colIndex == 0) {
-                       Node node = (Node) element;
-                       try {
-                               if (node.isNodeType(SLC_ARTIFACT_BASE))
-                                       cell.setImage(DistImages.IMG_ARTIFACT_BASE);
-                               else if (node.isNodeType(SLC_ARTIFACT_VERSION_BASE))
-                                       cell.setImage(DistImages.IMG_ARTIFACT_VERSION_BASE);
-                       } catch (RepositoryException e) {
-                               // Silent
-                       }
-               }
-       }
-
-       @Override
-       public Image getImage(Object element) {
-
-               if (element instanceof Node) {
-                       Node node = (Node) element;
-                       try {
-                               if (node.isNodeType(SLC_ARTIFACT_BASE)) {
-                                       return DistImages.IMG_ARTIFACT_BASE;
-                               } else if (node.isNodeType(SLC_ARTIFACT_VERSION_BASE)) {
-                                       return DistImages.IMG_ARTIFACT_VERSION_BASE;
-                               }
-                       } catch (RepositoryException e) {
-                               // Silent
-                       }
-               }
-               return null;
-       }
-
-       public String getColumnText(Object element, int columnIndex) {
-               try {
-                       if (element instanceof Node) {
-                               Node node = (Node) element;
-                               switch (columnIndex) {
-                               case COLUMN_TREE:
-                                       return node.getName();
-                               case COLUMN_SIZE:
-                                       long size = JcrUtils.getNodeApproxSize(node) / 1024;
-                                       if (size > 1024)
-                                               return size / 1024 + " MB";
-                                       else
-                                               return size + " KB";
-                               case COLUMN_DATE:
-                                       if (node.hasProperty(Property.JCR_LAST_MODIFIED))
-                                               return timeFormatter.format(node
-                                                               .getProperty(Property.JCR_LAST_MODIFIED)
-                                                               .getDate().getTime());
-                                       else
-                                               return null;
-                               }
-                       }
-               } catch (RepositoryException re) {
-                       throw new ArgeoException(
-                                       "Unexepected error while getting property values", re);
-               }
-               return null;
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/providers/ArtifactsTreeContentProvider.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/providers/ArtifactsTreeContentProvider.java
deleted file mode 100644 (file)
index 937290c..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.providers;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.RepositoryException;
-
-import org.argeo.ArgeoException;
-import org.argeo.eclipse.ui.jcr.utils.JcrItemsComparator;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-public class ArtifactsTreeContentProvider implements ITreeContentProvider,
-               SlcTypes {
-
-       // Utils
-       private boolean sortChildren = true;
-       private JcrItemsComparator itemComparator = new JcrItemsComparator();
-
-       public Object[] getElements(Object parent) {
-               return getChildren(parent);
-       }
-
-       public Object getParent(Object child) {
-               return null;
-       }
-
-       public Object[] getChildren(Object parent) {
-               Object[] elements = null;
-               try {
-                       if (parent instanceof Node) {
-                               Node node = (Node) parent;
-                               NodeIterator ni = node.getNodes();
-                               List<Node> nodesList = new ArrayList<Node>();
-                               while (ni.hasNext()) {
-                                       nodesList.add(ni.nextNode());
-                               }
-                               if (sortChildren) {
-                                       Node[] arr = (Node[]) nodesList.toArray(new Node[nodesList
-                                                       .size()]);
-                                       Arrays.sort(arr, itemComparator);
-                                       return arr;
-                               } else
-                                       return nodesList.toArray();
-
-                       }
-               } catch (RepositoryException e) {
-                       throw new ArgeoException(
-                                       "Unexpected exception while listing node properties", e);
-               }
-               return elements;
-       }
-
-       public boolean hasChildren(Object parent) {
-               try {
-                       if (parent instanceof Node) {
-                               Node curNode = (Node) parent;
-                               // We manually stop digging at this level
-                               if (curNode.isNodeType(SLC_ARTIFACT_VERSION_BASE))
-                                       return false;
-                               else if (curNode.hasNodes())
-                                       return true;
-                       }
-               } catch (RepositoryException e) {
-                       throw new ArgeoException(
-                                       "Unexpected exception while checking if property is multiple",
-                                       e);
-               }
-               return false;
-       }
-
-       public void setSortChildren(boolean sortChildren) {
-               this.sortChildren = sortChildren;
-       }
-
-       public boolean getSortChildren() {
-               return sortChildren;
-       }
-
-       public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-       }
-
-       public void dispose() {
-       }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java
deleted file mode 100644 (file)
index 0d40a62..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.utils;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-import javax.jcr.query.Row;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.argeo.eclipse.ui.GenericTableComparator;
-import org.argeo.slc.client.ui.dist.DistConstants;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.TableColumn;
-
-/**
- * Centralizes and factorizes useful methods to create and manage tables that
- * display artifacts for both editors and views.
- */
-public class ArtifactsTableConfigurer implements SlcNames, SlcTypes,
-               DistConstants {
-       private final static Log log = LogFactory
-                       .getLog(ArtifactsTableConfigurer.class);
-       // Used in the comparator to be able to retrieve the value from a row
-       // knowing the corresponding column index.
-       private Map<Integer, String> indexToName = new HashMap<Integer, String>();
-
-       private CurrentTableComparator comparator;
-       private TableViewer viewer;
-
-       protected DateFormat timeFormatter = new SimpleDateFormat(DATE_TIME_FORMAT);
-
-       /**
-        * Create and initialize the table configurer.
-        */
-       public ArtifactsTableConfigurer(TableViewer viewer,
-                       int defaultSortColumnIndex, int direction) {
-               this.viewer = viewer;
-               comparator = new CurrentTableComparator(defaultSortColumnIndex,
-                               direction);
-       }
-
-       public GenericTableComparator getComparator() {
-               return comparator;
-       }
-
-       /**
-        * Configure column width and header label depending on the value that will
-        * be displayed in the current column.
-        * 
-        * @param jcrColumnName
-        * @param column
-        * @param columnIndex
-        */
-       public void configureColumn(String jcrColumnName, TableViewerColumn column,
-                       int columnIndex) {
-
-               if (columnIndex != -1
-                               && getSelectionAdapter(column.getColumn(), columnIndex) != null) {
-                       column.getColumn().addSelectionListener(
-                                       getSelectionAdapter(column.getColumn(), columnIndex));
-                       indexToName.put(new Integer(columnIndex), jcrColumnName);
-               }
-               Object[] objs = DistUiHelpers
-                               .getLabelAndDefaultValueWidth(jcrColumnName);
-               column.getColumn().setWidth((Integer) objs[1]);
-               column.getColumn().setText((String) objs[0]);
-       }
-
-       /**
-        * Might be used by client classes to sort the table with based on selected
-        * columns.
-        * 
-        * @param column
-        * @param index
-        * @return
-        */
-       public SelectionAdapter getSelectionAdapter(final TableColumn column,
-                       final int index) {
-
-               // A comparator must be define
-               if (comparator == null)
-                       return null;
-
-               SelectionAdapter selectionAdapter = new SelectionAdapter() {
-                       @Override
-                       public void widgetSelected(SelectionEvent e) {
-
-                               try {
-
-                                       comparator.setColumn(index);
-                                       int dir = viewer.getTable().getSortDirection();
-                                       if (viewer.getTable().getSortColumn() == column) {
-                                               dir = dir == SWT.UP ? SWT.DOWN : SWT.UP;
-                                       } else {
-
-                                               dir = SWT.DOWN;
-                                       }
-                                       viewer.getTable().setSortDirection(dir);
-                                       viewer.getTable().setSortColumn(column);
-                                       viewer.refresh();
-                               } catch (Exception exc) {
-                                       exc.printStackTrace();
-                               }
-                       }
-               };
-               return selectionAdapter;
-       }
-
-       /**
-        * provides a label provider that returns the content of a specific cell.
-        * Specific treatment is done for some columns when the query returns a code
-        * that must be translated to the corresponding value at display time.
-        */
-       public ColumnLabelProvider getLabelProvider(final String columnName) {
-               boolean test = false;
-
-               if (test) {
-                       return new ColumnLabelProvider() {
-                               public String getText(Object element) {
-                                       return null;
-                               }
-
-                               public Image getImage(Object element) {
-                                       return null;
-                               }
-                       };
-               } else
-                       return new ColumnLabelProvider() {
-                               public String getText(Object element) {
-                                       Row row = (Row) element;
-                                       try {
-                                               return row.getValue(columnName).getString();
-                                       } catch (RepositoryException e) {
-                                               throw new ArgeoException("Cannot display row " + row, e);
-                                       }
-                               }
-
-                               public Image getImage(Object element) {
-                                       return null;
-                               }
-                       };
-       }
-
-       /** Implements comparator for various types of Artifact Table row */
-       private class CurrentTableComparator extends GenericTableComparator {
-
-               public CurrentTableComparator(int colIndex, int direction) {
-                       super(colIndex, direction);
-               }
-
-               @Override
-               public int compare(Viewer viewer, Object e1, Object e2) {
-                       int rc = 0;
-
-                       if (e1 instanceof Row) {
-                               try {
-
-                                       Value v1 = ((Row) e1).getValue(indexToName
-                                                       .get(propertyIndex));
-                                       Value v2 = ((Row) e2).getValue(indexToName
-                                                       .get(propertyIndex));
-
-                                       if (v1.getType() == PropertyType.STRING)
-                                               rc = v1.getString().compareTo(v2.getString());
-                                       else if (v1.getType() == PropertyType.DATE)
-                                               rc = v1.getDate().compareTo(v2.getDate());
-                                       else
-                                               throw new ArgeoException("comparator for object type "
-                                                               + v1.getType() + " is not yet implemented");
-                               } catch (Exception e) {
-                                       throw new ArgeoException("rows cannot be compared ", e);
-                               }
-                       } else
-                               throw new ArgeoException("Unsupported row type");
-                       // If descending order, flip the direction
-                       if (direction == DESCENDING) {
-                               rc = -rc;
-                       }
-                       return rc;
-               }
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/CommandHelpers.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/CommandHelpers.java
deleted file mode 100644 (file)
index ebd8826..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-package org.argeo.slc.client.ui.dist.utils;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.argeo.ArgeoException;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.eclipse.core.commands.Command;
-import org.eclipse.core.commands.Parameterization;
-import org.eclipse.core.commands.ParameterizedCommand;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.ui.menus.CommandContributionItem;
-import org.eclipse.ui.menus.CommandContributionItemParameter;
-import org.eclipse.ui.services.IServiceLocator;
-
-/**
- * Centralizes useful methods to manage command updates
- */
-public class CommandHelpers {
-
-       /**
-        * Refresh the given command. 
-        */
-       public static void refreshCommand(IMenuManager menuManager,
-                       IServiceLocator locator, String cmdId, String label, String iconPath,
-                       boolean showCommand) {
-               IContributionItem ici = menuManager.find(cmdId);
-               if (ici != null)
-                       menuManager.remove(ici);
-
-               if (showCommand) {
-                       // Set Params
-                       CommandContributionItemParameter contributionItemParameter = new CommandContributionItemParameter(
-                                       locator, null, cmdId, SWT.PUSH);
-                       contributionItemParameter.label = label;
-                       contributionItemParameter.icon = DistPlugin.getImageDescriptor(iconPath);
-                       CommandContributionItem cci = new CommandContributionItem(
-                                       contributionItemParameter);
-                       cci.setId(cmdId);
-                       menuManager.add(cci);
-               }
-       }
-
-       /**
-        * Refresh the given command and optionally corresponding parameters.
-        * 
-        * @param menuManager
-        * @param locator
-        * @param cmdId
-        * @param label
-        * @param showCommand
-        *            Command must be explicitly removed from the context menu at
-        *            each refresh setting this to false.
-        * @param params
-        *            maps a paramId with a String value
-        */
-       public static void refreshParameterizedCommand(IMenuManager menuManager,
-                       IServiceLocator locator, String cmdId, String label, String iconPath,
-                       boolean showCommand, Map<String, String> params) {
-               IContributionItem ici = menuManager.find(cmdId);
-               if (ici != null)
-                       menuManager.remove(ici);
-               
-               if (showCommand) {
-                       // Set Params
-                       CommandContributionItemParameter contributionItemParameter = new CommandContributionItemParameter(
-                                       locator, null, cmdId, SWT.PUSH);
-                       contributionItemParameter.label = label;
-                       contributionItemParameter.icon = DistPlugin.getImageDescriptor(iconPath);
-
-                       if (params != null)
-                               contributionItemParameter.parameters = params;
-
-                       CommandContributionItem cci = new CommandContributionItem(
-                                       contributionItemParameter);
-                       cci.setId(cmdId);
-                       menuManager.add(cci);
-               }
-       }
-
-       /** Helper to call a command without parameter easily */
-       public static void callCommand(String commandID) {
-               callCommand(commandID, null);
-       }
-
-       /** Helper to call a command with a single parameter easily */
-       public static void callCommand(String commandID, String parameterID,
-                       String parameterValue) {
-               Map<String, String> params = new HashMap<String, String>();
-               params.put(parameterID, parameterValue);
-               callCommand(commandID, params);
-       }
-
-       /**
-        * Helper to call a command with a map of parameters easily
-        * 
-        * @param paramMap
-        *            a map that links various commands ids with corresponding
-        *            String values.
-        */
-       public static void callCommand(String commandID,
-                       Map<String, String> paramMap) {
-               try {
-                       IWorkbench iw = DistPlugin.getDefault().getWorkbench();
-                       IHandlerService handlerService = (IHandlerService) iw
-                                       .getService(IHandlerService.class);
-                       ICommandService cmdService = (ICommandService) iw
-                                       .getActiveWorkbenchWindow().getService(
-                                                       ICommandService.class);
-                       Command cmd = cmdService.getCommand(commandID);
-
-                       ArrayList<Parameterization> parameters = null;
-                       ParameterizedCommand pc; 
-
-                       if (paramMap != null) {
-                               // Set parameters of the command to launch :
-                               parameters = new ArrayList<Parameterization>();
-                               Parameterization parameterization;
-                               for (String id : paramMap.keySet()) {
-                                       parameterization = new Parameterization(
-                                                       cmd.getParameter(id), paramMap.get(id));
-                                       parameters.add(parameterization);
-                               }
-                               pc = new ParameterizedCommand(cmd,
-                                               parameters.toArray(new Parameterization[parameters.size()]));
-                       } else 
-                               pc = new ParameterizedCommand(cmd, null);
-                       
-                       // build the parameterized command
-                       // execute the command
-                       handlerService.executeCommand(pc, null);
-               } catch (Exception e) {
-                       throw new ArgeoException(
-                                       "Unexepected exception while opening node editor", e);
-               }
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/DistUiHelpers.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/DistUiHelpers.java
deleted file mode 100644 (file)
index ce39103..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.utils;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-
-import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.argeo.slc.client.ui.dist.DistConstants;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
-
-public class DistUiHelpers implements DistConstants, SlcTypes, SlcNames {
-       private final static Log log = LogFactory.getLog(DistUiHelpers.class);
-       private final static DateFormat df = new SimpleDateFormat(DATE_TIME_FORMAT);
-
-       /**
-        * Returns a user-friendly label for a given jcr property name. If the
-        * corresponding mapping is not found, the input String is returned. If
-        * input String is null "(No name)" is returned
-        */
-       public static String getLabelJcrName(String jcrName) {
-               return (String) getLabelAndDefaultValueWidth(jcrName)[0];
-       }
-
-       /**
-        * Returns a label ( (String) object[0] )and default value width ( (int)
-        * object[1] ) for a given property name
-        */
-       public static Object[] getLabelAndDefaultValueWidth(String propertyName) {
-               // to avoid npe :
-               if (propertyName == null)
-                       return new Object[] { "(No name)", 60 };
-
-               // ArtifactId
-               if (propertyName.equals(SLC_ARTIFACT + "." + SLC_ARTIFACT_ID)
-                               || propertyName.equals(SLC_ARTIFACT_BASE + "."
-                                               + SLC_ARTIFACT_ID)
-                               || propertyName.equals(SLC_ARTIFACT_VERSION_BASE + "."
-                                               + SLC_ARTIFACT_ID)
-                               || propertyName.equals(SLC_ARTIFACT_ID)) {
-                       return new Object[] { "Artifact ID", 200 };
-               } // GroupId
-               else if (propertyName.equals(SLC_ARTIFACT + "." + SLC_GROUP_ID)
-                               || propertyName.equals(SLC_ARTIFACT_BASE + "." + SLC_GROUP_ID)
-                               || propertyName.equals(SLC_ARTIFACT_VERSION_BASE + "."
-                                               + SLC_GROUP_ID) || propertyName.equals(SLC_GROUP_ID)) {
-                       return new Object[] { "Group ID", 120 };
-               } // Version
-               else if (propertyName.equals(SLC_ARTIFACT + "." + SLC_ARTIFACT_VERSION)
-                               || propertyName.equals(SLC_ARTIFACT_VERSION_BASE + "."
-                                               + SLC_ARTIFACT_VERSION)
-                               || propertyName.equals(SLC_ARTIFACT_VERSION)) {
-                       return new Object[] { "Version", 60 };
-               } else if (propertyName.equals(SLC_ARTIFACT + "."
-                               + SLC_ARTIFACT_CLASSIFIER)
-                               || propertyName.equals(SLC_ARTIFACT_CLASSIFIER)) {
-                       return new Object[] { "Classifier", 60 };
-               } else if (propertyName.equals(SLC_ARTIFACT + "."
-                               + SLC_ARTIFACT_EXTENSION)
-                               || propertyName.equals(SLC_ARTIFACT_EXTENSION)) {
-                       return new Object[] { "Type", 40 };
-               } else if (propertyName.equals(SLC_BUNDLE_ARTIFACT + "."
-                               + SLC_SYMBOLIC_NAME)
-                               || propertyName.equals(SLC_SYMBOLIC_NAME)) {
-                       return new Object[] { "Symbolic name", 180 };
-               } else if (propertyName.equals(SLC_BUNDLE_ARTIFACT + "."
-                               + SLC_BUNDLE_VERSION)
-                               || propertyName.equals(SLC_BUNDLE_VERSION)) {
-                       return new Object[] { "Bundle version", 120 };
-               } else if (propertyName
-                               .equals(SLC_BUNDLE_ARTIFACT + "." + SLC_MANIFEST)
-                               || propertyName.equals(SLC_MANIFEST)) {
-                       return new Object[] { "Manifest", 60 };
-               } // TODO remove hard coded strings
-               else if (propertyName.equals("slc:Bundle-ManifestVersion")) {
-                       return new Object[] { "Bundle Manifest Version", 60 };
-               } else if (propertyName.equals("slc:Manifest-Version")) {
-                       return new Object[] { "Manifest Version", 60 };
-               } else if (propertyName.equals("slc:Bundle-Vendor")) {
-                       return new Object[] { "Bundle Vendor", 60 };
-               } else if (propertyName.equals("slc:Bundle-SymbolicName")) {
-                       return new Object[] { "Bundle symbolic name", 60 };
-               } else if (propertyName.equals("slc:Bundle-Name")) {
-                       return new Object[] { "Bundle name", 60 };
-               } else if (propertyName.equals("slc:Bundle-DocURL")) {
-                       return new Object[] { "Doc URL", 120 };
-               } else if (propertyName.equals("slc:Bundle-Licence")) {
-                       return new Object[] { "Bundle licence", 120 };
-               } else if (propertyName.equals(SLC_ARTIFACT_VERSION_BASE + "."
-                               + JCR_IDENTIFIER)) {
-                       return new Object[] { "UUID", 0 };
-               } else {
-                       if (log.isTraceEnabled())
-                               log.trace("No Column label provider defined for property: ["
-                                               + propertyName + "]");
-                       return new Object[] { propertyName, 60 };
-               }
-       }
-
-       public static String formatValueAsString(Value value) {
-               try {
-                       String strValue;
-
-                       if (value.getType() == PropertyType.BINARY)
-                               strValue = "<binary>";
-                       else if (value.getType() == PropertyType.DATE)
-                               strValue = df.format(value.getDate().getTime());
-                       else
-                               strValue = value.getString();
-                       return strValue;
-               } catch (RepositoryException e) {
-                       throw new ArgeoException("unexpected error while formatting value",
-                                       e);
-               }
-       }
-
-       public static String formatAsString(Object value) {
-               String strValue;
-               if (value instanceof Calendar)
-                       strValue = df.format(((Calendar) value).getTime());
-               else
-                       strValue = value.toString();
-               return strValue;
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/GenericDoubleClickListener.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/GenericDoubleClickListener.java
deleted file mode 100644 (file)
index d18b3f0..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.utils;
-
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.nodetype.NodeType;
-import javax.jcr.query.Row;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.argeo.eclipse.ui.jcr.utils.JcrFileProvider;
-import org.argeo.eclipse.ui.specific.FileHandler;
-import org.argeo.slc.client.ui.dist.DistConstants;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.editors.GenericArtifactEditor;
-import org.argeo.slc.client.ui.dist.editors.GenericArtifactEditorInput;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.ui.PartInitException;
-
-/**
- * Centralizes the management of double click on an ArtifactTreeViewer
- */
-public class GenericDoubleClickListener implements IDoubleClickListener,
-               SlcTypes, SlcNames, DistConstants {
-
-       private final static Log log = LogFactory
-                       .getLog(GenericDoubleClickListener.class);
-
-       private TreeViewer viewer;
-
-       private JcrFileProvider jfp;
-       private FileHandler fileHandler;
-
-       public GenericDoubleClickListener(TreeViewer viewer) {
-               this.viewer = viewer;
-               jfp = new JcrFileProvider();
-               fileHandler = new FileHandler(jfp);
-       }
-
-       public void doubleClick(DoubleClickEvent event) {
-               if (event.getSelection() == null || event.getSelection().isEmpty())
-                       return;
-               Object obj = ((IStructuredSelection) event.getSelection())
-                               .getFirstElement();
-               try {
-                       if (obj instanceof Node) {
-                               Node node = (Node) obj;
-                               if (node.isNodeType(SLC_ARTIFACT_VERSION_BASE)) {
-                                       GenericArtifactEditorInput gaei = new GenericArtifactEditorInput(
-                                                       node);
-                                       DistPlugin.getDefault().getWorkbench()
-                                                       .getActiveWorkbenchWindow().getActivePage()
-                                                       .openEditor(gaei, GenericArtifactEditor.ID);
-                               } else if (node.isNodeType(NodeType.NT_FILE)) {
-                                       String name = node.getName();
-                                       String id = node.getIdentifier();
-                                       jfp.setReferenceNode(node);
-                                       fileHandler.openFile(name, id);
-                               }
-
-                       } else if (obj instanceof Row) {
-                               Row row = (Row) obj;
-                               // String uuid;
-                               // try {
-                               // uuid = row.getValue(
-                               // SLC_ARTIFACT_VERSION_BASE + "." + JCR_IDENTIFIER)
-                               // .getString();
-                               // } catch (ItemNotFoundException infe) {
-                               // MessageDialog.openError(DistPlugin.getDefault()
-                               // .getWorkbench().getActiveWorkbenchWindow()
-                               // .getShell(), "Invalid request",
-                               // "The request must return a value for "
-                               // + SLC_ARTIFACT_VERSION_BASE + "."
-                               // + JCR_IDENTIFIER
-                               // + " in order to open the artifact editor");
-                               // return;
-                               // }
-                               // Node node =
-                               // row.getNode(SLC_ARTIFACT_VERSION_BASE).getSession()
-                               // .getNodeByIdentifier(uuid);
-
-                               Node node = row.getNode(SLC_ARTIFACT_VERSION_BASE);
-                               if (node == null)
-                                       MessageDialog.openError(DistPlugin.getDefault()
-                                                       .getWorkbench().getActiveWorkbenchWindow()
-                                                       .getShell(), "Invalid request",
-                                                       "The request must return a "
-                                                                       + SLC_ARTIFACT_VERSION_BASE + " node "
-                                                                       + " in order to open the artifact editor");
-                               else {
-                                       GenericArtifactEditorInput gaei = new GenericArtifactEditorInput(
-                                                       node);
-                                       DistPlugin.getDefault().getWorkbench()
-                                                       .getActiveWorkbenchWindow().getActivePage()
-                                                       .openEditor(gaei, GenericArtifactEditor.ID);
-                               }
-                       }
-               } catch (RepositoryException re) {
-                       throw new ArgeoException(
-                                       "Repository error while getting node info", re);
-               } catch (PartInitException pie) {
-                       throw new ArgeoException(
-                                       "Unexepected exception while opening artifact editor", pie);
-               }
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/NodeViewerComparator.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/NodeViewerComparator.java
deleted file mode 100644 (file)
index 8a0ad60..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-package org.argeo.slc.client.ui.dist.utils;
-
-import java.math.BigDecimal;
-import java.util.Calendar;
-import java.util.List;
-
-import javax.jcr.Node;
-import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-import javax.jcr.ValueFormatException;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.argeo.eclipse.ui.GenericTableComparator;
-import org.eclipse.jface.viewers.Viewer;
-
-public class NodeViewerComparator extends GenericTableComparator {
-       private final static Log log = LogFactory
-                       .getLog(NodeViewerComparator.class);
-
-       protected List<String> propertiesList;
-       protected List<Integer> propertyTypesList;
-       protected Integer propertyType;
-       protected String property;
-
-       public NodeViewerComparator(int defaultColIndex, int defaultDirection,
-                       List<String> propertiesList, List<Integer> propertyTypesList) {
-               super(defaultColIndex, defaultDirection);
-               this.propertiesList = propertiesList;
-               this.propertyTypesList = propertyTypesList;
-               this.propertyIndex = defaultColIndex;
-               this.propertyType = propertyTypesList.get(defaultColIndex);
-               this.property = propertiesList.get(defaultColIndex);
-               setColumn(defaultColIndex);
-       }
-
-       @Override
-       public int compare(Viewer viewer, Object e1, Object e2) {
-               int rc = 0;
-               long lc = 0;
-
-               try {
-                       Node n1 = (Node) e1;
-                       Node n2 = (Node) e2;
-
-                       Value v1 = null;
-                       Value v2 = null;
-                       if (n1.hasProperty(property))
-                               v1 = n1.getProperty(property).getValue();
-                       if (n2.hasProperty(property))
-                               v2 = n2.getProperty(property).getValue();
-
-                       if (v2 == null && v1 == null)
-                               return 0;
-                       else if (v2 == null)
-                               return -1;
-                       else if (v1 == null)
-                               return 1;
-
-                       switch (propertyType) {
-                       case PropertyType.STRING:
-                               rc = v1.getString().compareTo(v2.getString());
-                               break;
-                       case PropertyType.BOOLEAN:
-                               boolean b1 = v1.getBoolean();
-                               boolean b2 = v2.getBoolean();
-                               if (b1 == b2)
-                                       rc = 0;
-                               else
-                                       // we assume true is greater than false
-                                       rc = b1 ? 1 : -1;
-                               break;
-                       case PropertyType.DATE:
-                               Calendar c1 = v1.getDate();
-                               Calendar c2 = v2.getDate();
-                               if (c1 == null || c2 == null)
-                                       log.trace("undefined date");
-                               lc = c1.getTimeInMillis() - c2.getTimeInMillis();
-                               if (lc < Integer.MIN_VALUE)
-                                       // rc = Integer.MIN_VALUE;
-                                       rc = -1;
-                               else if (lc > Integer.MAX_VALUE)
-                                       // rc = Integer.MAX_VALUE;
-                                       rc = 1;
-                               else
-                                       rc = (int) lc;
-                               break;
-                       case PropertyType.LONG:
-                               long l1;
-                               long l2;
-                               // FIXME sometimes an empty string is set instead of the id 
-                               try {
-                                       l1 = v1.getLong();
-                               } catch (ValueFormatException ve) {
-                                       l1 = 0;
-                               }
-                               try {
-                                       l2 = v2.getLong();
-                               } catch (ValueFormatException ve) {
-                                       l2 = 0;
-                               }
-
-                               lc = l1 - l2;
-                               if (lc < Integer.MIN_VALUE)
-                                       // rc = Integer.MIN_VALUE;
-                                       rc = -1;
-                               else if (lc > Integer.MAX_VALUE)
-                                       // rc = Integer.MAX_VALUE;
-                                       rc = 1;
-                               else
-                                       rc = (int) lc;
-                               break;
-                       case PropertyType.DECIMAL:
-                               BigDecimal bd1 = v1.getDecimal();
-                               BigDecimal bd2 = v2.getDecimal();
-                               rc = bd1.compareTo(bd2);
-                               break;
-                       default:
-                               throw new ArgeoException(
-                                               "Unimplemented comparaison for PropertyType "
-                                                               + propertyType);
-                       }
-
-                       // If descending order, flip the direction
-                       if (direction == DESCENDING) {
-                               rc = -rc;
-                       }
-
-               } catch (RepositoryException re) {
-                       throw new ArgeoException("Unexpected error "
-                                       + "while comparing nodes", re);
-               }
-               return rc;
-       }
-
-       @Override
-       public void setColumn(int column) {
-               if (column == this.propertyIndex) {
-                       // Same column as last sort; toggle the direction
-                       direction = 1 - direction;
-               } else {
-                       // New column; do a descending sort
-                       this.propertyIndex = column;
-                       this.propertyType = propertyTypesList.get(column);
-                       this.property = propertiesList.get(column);
-                       direction = ASCENDING;
-               }
-       }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/AbstractQueryArtifactsView.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/AbstractQueryArtifactsView.java
deleted file mode 100644 (file)
index 940d868..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.views;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.query.Query;
-import javax.jcr.query.QueryResult;
-import javax.jcr.query.Row;
-import javax.jcr.query.RowIterator;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.argeo.eclipse.ui.GenericTableComparator;
-import org.argeo.slc.client.ui.dist.utils.ArtifactsTableConfigurer;
-import org.argeo.slc.client.ui.dist.utils.GenericDoubleClickListener;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.ui.part.ViewPart;
-
-/** Factorizes useful methods to build a query view in a sashForm */
-public abstract class AbstractQueryArtifactsView extends ViewPart implements
-               SlcTypes {
-       private static final Log log = LogFactory
-                       .getLog(AbstractQueryArtifactsView.class);
-
-       // shortcuts
-       final protected static String SAVB = "[" + SLC_ARTIFACT_VERSION_BASE + "]";
-       final protected static String SBA = "[" + SLC_BUNDLE_ARTIFACT + "]";
-       final protected static String SIP = "[" + SLC_IMPORTED_PACKAGE + "]";
-       final protected static String SEP = "[" + SLC_EXPORTED_PACKAGE + "]";
-
-       /* DEPENDENCY INJECTION */
-       private Session session;
-       private List<String> columnProperties;
-
-       // This page widgets
-       private TableViewer viewer;
-       private List<TableViewerColumn> tableViewerColumns = new ArrayList<TableViewerColumn>();
-       private ArtifactsTableConfigurer tableConfigurer;
-       private GenericTableComparator comparator;
-
-       // to be set by client to display all columns
-       private boolean displayAllColumns = false;
-
-       protected void createResultPart(Composite parent) {
-               viewer = new TableViewer(parent);
-               Table table = viewer.getTable();
-               table.getParent().setLayout(new GridLayout(1, false));
-               table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-               viewer.getTable().setHeaderVisible(true);
-               viewer.getTable().setLinesVisible(true);
-
-               viewer.setLabelProvider(new ViewLabelProvider());
-               viewer.setContentProvider(new ViewContentProvider());
-               viewer.addDoubleClickListener(new GenericDoubleClickListener(null));
-
-               tableConfigurer = new ArtifactsTableConfigurer(viewer, 1,
-                               GenericTableComparator.DESCENDING);
-
-               comparator = tableConfigurer.getComparator();
-               viewer.setComparator(comparator);
-       }
-
-       protected void executeQuery(String statement) {
-               try {
-                       Calendar stStamp = new GregorianCalendar();
-                       if (log.isDebugEnabled()) {
-                               log.debug("Executed query: " + statement);
-                       }
-                       QueryResult qr = session.getWorkspace().getQueryManager()
-                                       .createQuery(statement, Query.JCR_SQL2).execute();
-
-                       if (log.isDebugEnabled()) {
-                               Calendar enStamp = new GregorianCalendar();
-                               long duration = enStamp.getTimeInMillis()
-                                               - stStamp.getTimeInMillis();
-                               log.debug("Query executed in : " + duration / 1000 + "s.");
-                       }
-
-                       // remove previous columns
-                       for (TableViewerColumn tvc : tableViewerColumns)
-                               tvc.getColumn().dispose();
-
-                       // If a pre(-defined list of columns has been injected, we use it,
-                       // otherwise we display all results of the resultSet
-                       if (!displayAllColumns && columnProperties != null) {
-                               int i = 0;
-
-                               Iterator<String> it = columnProperties.iterator();
-                               while (it.hasNext()) {
-                                       String columnName = it.next();
-
-                                       TableViewerColumn tvc = new TableViewerColumn(viewer,
-                                                       SWT.NONE);
-                                       tableConfigurer.configureColumn(columnName, tvc, i);
-                                       tvc.setLabelProvider(tableConfigurer
-                                                       .getLabelProvider(columnName));
-                                       tableViewerColumns.add(tvc);
-                                       i++;
-                               }
-                       } else {
-                               int i = 0;
-                               for (final String columnName : qr.getColumnNames()) {
-                                       TableViewerColumn tvc = new TableViewerColumn(viewer,
-                                                       SWT.NONE);
-                                       // Small hack to remove prefix from the column name
-                                       // String tmpStr = columnName.substring(columnName
-                                       // .lastIndexOf(".") + 1);
-                                       tableConfigurer.configureColumn(columnName, tvc, i);
-                                       tvc.setLabelProvider(tableConfigurer
-                                                       .getLabelProvider(columnName));
-                                       tableViewerColumns.add(tvc);
-                                       i++;
-                               }
-                       }
-                       // We must create a local list because query result can be read only
-                       // once.
-                       try {
-                               List<Row> rows = new ArrayList<Row>();
-                               RowIterator rit = qr.getRows();
-                               while (rit.hasNext()) {
-                                       rows.add(rit.nextRow());
-                               }
-                               viewer.setInput(rows);
-                       } catch (RepositoryException e) {
-                               throw new ArgeoException("Cannot read query result", e);
-                       }
-
-               } catch (RepositoryException e) {
-                       ErrorDialog.openError(null, "Error", "Cannot execute JCR query: "
-                                       + statement, new Status(IStatus.ERROR,
-                                       "org.argeo.eclipse.ui.jcr", e.getMessage()));
-               }
-       }
-
-       /**
-        * Client must use this method to display all columns of the result set
-        * instead of a limited predifined and injected set
-        **/
-       public void displayAllColumns(boolean flag) {
-               displayAllColumns = flag;
-       }
-
-       // Can be overridden by subclasses.
-       protected String generateSelectStatement() {
-               StringBuffer sb = new StringBuffer("select " + SAVB + ".* ");
-               return sb.toString();
-       }
-
-       protected String generateFromStatement() {
-               StringBuffer sb = new StringBuffer(" from ");
-               sb.append(SAVB);
-               sb.append(" ");
-               return sb.toString();
-       }
-
-       // Providers
-       protected class ViewContentProvider implements IStructuredContentProvider {
-
-               public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
-               }
-
-               public void dispose() {
-               }
-
-               @SuppressWarnings("unchecked")
-               public Object[] getElements(Object obj) {
-                       return ((List<String[]>) obj).toArray();
-               }
-       }
-
-       protected class ViewLabelProvider extends LabelProvider implements
-                       ITableLabelProvider {
-               public String getColumnText(Object obj, int index) {
-                       if (!(obj instanceof String[]))
-                               return "Object is not properly formatted ";
-
-                       String[] value = (String[]) obj;
-
-                       return value[index];
-               }
-
-               public Image getColumnImage(Object obj, int index) {
-                       return null;
-               }
-       }
-
-       /* DEPENDENCY INJECTION */
-       public void setSession(Session session) {
-               this.session = session;
-       }
-
-       public void setColumnProperties(List<String> columnProperties) {
-               this.columnProperties = columnProperties;
-       }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/ArtifactsBrowser.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/ArtifactsBrowser.java
deleted file mode 100644 (file)
index 71cb36e..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.views;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-
-import javax.jcr.Node;
-import javax.jcr.Property;
-import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.Value;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.argeo.jcr.JcrUtils;
-import org.argeo.slc.client.ui.dist.DistConstants;
-import org.argeo.slc.client.ui.dist.DistImages;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.providers.ArtifactsTreeContentProvider;
-import org.argeo.slc.client.ui.dist.utils.GenericDoubleClickListener;
-import org.argeo.slc.jcr.SlcTypes;
-import org.argeo.slc.repo.RepoConstants;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerCell;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * Basic View to browse a maven based repository.
- * 
- * By Default size of the various bundles is not computed but it can be
- * activated the view command.
- */
-
-public class ArtifactsBrowser extends ViewPart implements DistConstants,
-               RepoConstants {
-       private final static Log log = LogFactory.getLog(ArtifactsBrowser.class);
-       public final static String ID = DistPlugin.ID + ".artifactsBrowser";
-
-       /* DEPENDENCY INJECTION */
-       private Session jcrSession;
-
-       // Business objects
-       private Node rootNode;
-
-       // This page widgets
-       private TreeViewer artifactTreeViewer;
-       private boolean isSizeVisible = false;
-
-       // To be able to configure columns easily
-       public static final int COLUMN_TREE = 0;
-       public static final int COLUMN_DATE = 1;
-       public static final int COLUMN_SIZE = 2;
-       private static final int SIZE_COL_WIDTH = 55;
-
-       @Override
-       public void createPartControl(Composite parent) {
-               // Enable the different parts to fill the whole page when the tab is
-               // maximized
-               parent.setLayout(new FillLayout());
-               artifactTreeViewer = createArtifactsTreeViewer(parent);
-
-               // context menu : it is completely defined in the plugin.xml file.
-               // Nothing in the context menu for the time being
-               // MenuManager menuManager = new MenuManager();
-               // Menu menu =
-               // menuManager.createContextMenu(artifactTreeViewer.getTree());
-               // artifactTreeViewer.getTree().setMenu(menu);
-               // getSite().registerContextMenu(menuManager, artifactTreeViewer);
-
-               getSite().setSelectionProvider(artifactTreeViewer);
-               // packagesViewer.setComparer(new NodeViewerComparer());
-
-               // Model initialisation
-               if (jcrSession != null) {
-                       try {
-                               rootNode = jcrSession.getNode(ARTIFACTS_BASE_PATH);
-                               artifactTreeViewer.setInput(rootNode);
-                       } catch (RepositoryException e) {
-                               throw new ArgeoException("Cannot load base artifact nodes", e);
-                       }
-               }
-       }
-
-       protected TreeViewer createArtifactsTreeViewer(Composite parent) {
-               int style = SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION;
-               Tree tree = new Tree(parent, style);
-               createColumn(tree, "Artifacts", SWT.LEFT, 300);
-               createColumn(tree, "Date created", SWT.LEFT, 105);
-               createColumn(tree, "Size", SWT.RIGHT, 0);
-               tree.setLinesVisible(true);
-               tree.setHeaderVisible(true);
-
-               TreeViewer viewer = new TreeViewer(tree);
-
-               viewer.setContentProvider(new ArtifactsTreeContentProvider());
-               viewer.setLabelProvider(new ArtifactLabelProvider());
-               viewer.addSelectionChangedListener(new ArtifactTreeSelectionListener());
-               viewer.addDoubleClickListener(new GenericDoubleClickListener(viewer));
-               viewer.setInput(rootNode);
-
-               return viewer;
-       }
-
-       private static TreeColumn createColumn(Tree parent, String name, int style,
-                       int width) {
-               TreeColumn result = new TreeColumn(parent, style);
-               result.setText(name);
-               result.setWidth(width);
-               result.setMoveable(true);
-               result.setResizable(true);
-               return result;
-       }
-
-       protected TreeViewer getArtifactTreeViewer() {
-               return artifactTreeViewer;
-       }
-
-       @Override
-       public void setFocus() {
-               // TODO Auto-generated method stub
-
-       }
-
-       /**
-        * Refresh the given element of the tree browser. If null is passed as a
-        * parameter, it refreshes the whole tree
-        */
-       public void refresh(Object element) {
-               if (element == null) {
-                       artifactTreeViewer.refresh(rootNode);
-               } else
-                       artifactTreeViewer.refresh(element);
-       }
-
-       /** Returns wether size column is visible or not */
-       public boolean isSizeVisible() {
-               return isSizeVisible;
-       }
-
-       /** Sets the visibility of the size column */
-       public void setSizeVisible(boolean visible) {
-               if (isSizeVisible == visible)
-                       return; // nothing has changed
-               else
-                       isSizeVisible = visible;
-
-               if (visible) {
-                       artifactTreeViewer.getTree().getColumn(COLUMN_SIZE)
-                                       .setWidth(SIZE_COL_WIDTH);
-               } else {
-                       // we just hide the column, we don't refresh the whole tree.
-                       artifactTreeViewer.getTree().getColumn(COLUMN_SIZE).setWidth(0);
-               }
-       }
-
-       private class ArtifactLabelProvider extends ColumnLabelProvider implements
-                       DistConstants, SlcTypes {
-
-               // Utils
-               protected DateFormat timeFormatter = new SimpleDateFormat(
-                               DATE_TIME_FORMAT);
-
-               public void update(ViewerCell cell) {
-                       int colIndex = cell.getColumnIndex();
-                       Object element = cell.getElement();
-                       cell.setText(getColumnText(element, colIndex));
-
-                       if (element instanceof Node && colIndex == 0) {
-                               Node node = (Node) element;
-                               try {
-                                       if (node.isNodeType(SLC_ARTIFACT_BASE))
-                                               cell.setImage(DistImages.IMG_ARTIFACT_BASE);
-                                       else if (node.isNodeType(SLC_ARTIFACT_VERSION_BASE))
-                                               cell.setImage(DistImages.IMG_ARTIFACT_VERSION_BASE);
-                               } catch (RepositoryException e) {
-                                       // Silent
-                               }
-                       }
-               }
-
-               @Override
-               public Image getImage(Object element) {
-
-                       if (element instanceof Node) {
-                               Node node = (Node) element;
-                               try {
-                                       if (node.isNodeType(SLC_ARTIFACT_BASE)) {
-                                               return DistImages.IMG_ARTIFACT_BASE;
-                                       } else if (node.isNodeType(SLC_ARTIFACT_VERSION_BASE)) {
-                                               return DistImages.IMG_ARTIFACT_VERSION_BASE;
-                                       }
-                               } catch (RepositoryException e) {
-                                       // Silent
-                               }
-                       }
-                       return null;
-               }
-
-               public String getColumnText(Object element, int columnIndex) {
-                       try {
-                               if (element instanceof Node) {
-                                       Node node = (Node) element;
-                                       switch (columnIndex) {
-                                       case COLUMN_TREE:
-                                               return node.getName();
-                                       case COLUMN_SIZE:
-                                               if (isSizeVisible) {
-                                                       long size = JcrUtils.getNodeApproxSize(node) / 1024;
-                                                       if (size > 1024)
-                                                               return size / 1024 + " MB";
-                                                       else
-                                                               return size + " KB";
-                                               } else
-                                                       return "";
-                                       case COLUMN_DATE:
-                                               if (node.hasProperty(Property.JCR_CREATED))
-                                                       return timeFormatter.format(node
-                                                                       .getProperty(Property.JCR_CREATED)
-                                                                       .getDate().getTime());
-                                               else
-                                                       return null;
-                                       }
-                               }
-                       } catch (RepositoryException re) {
-                               throw new ArgeoException(
-                                               "Unexepected error while getting property values", re);
-                       }
-                       return null;
-               }
-
-               private String formatValueAsString(Value value) {
-                       // TODO enhance this method
-                       try {
-                               String strValue;
-
-                               if (value.getType() == PropertyType.BINARY)
-                                       strValue = "<binary>";
-                               else if (value.getType() == PropertyType.DATE)
-                                       strValue = timeFormatter.format(value.getDate().getTime());
-                               else
-                                       strValue = value.getString();
-                               return strValue;
-                       } catch (RepositoryException e) {
-                               throw new ArgeoException(
-                                               "unexpected error while formatting value", e);
-                       }
-               }
-       }
-
-       private class ArtifactTreeSelectionListener implements
-                       ISelectionChangedListener {
-
-               public void selectionChanged(SelectionChangedEvent event) {
-                       ISelection selection = event.getSelection();
-                       if (selection != null && selection instanceof IStructuredSelection) {
-                               IStructuredSelection iss = (IStructuredSelection) selection;
-                               if (iss.size() == 1) {
-                                       artifactTreeViewer.refresh(iss.getFirstElement());
-                               }
-                       }
-
-               }
-
-       }
-
-       /* DEPENDENCY INJECTION */
-       public void setJcrSession(Session jcrSession) {
-               this.jcrSession = jcrSession;
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/DistributionsView.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/DistributionsView.java
deleted file mode 100644 (file)
index 6ac3d79..0000000
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.views;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.eclipse.ui.AbstractTreeContentProvider;
-import org.argeo.eclipse.ui.ErrorFeedback;
-import org.argeo.eclipse.ui.TreeParent;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.client.ui.dist.commands.CopyWorkspace;
-import org.argeo.slc.client.ui.dist.commands.CreateWorkspace;
-import org.argeo.slc.client.ui.dist.commands.DeleteWorkspace;
-import org.argeo.slc.client.ui.dist.commands.ManageWorkspaceAuth;
-import org.argeo.slc.client.ui.dist.commands.NormalizeDistribution;
-import org.argeo.slc.client.ui.dist.editors.DistributionEditor;
-import org.argeo.slc.client.ui.dist.editors.DistributionEditorInput;
-import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
-import org.argeo.slc.jcr.SlcNames;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.TreeViewerColumn;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * Browse and manipulate distributions (like merge, rename, etc.). Only support
- * one single repository currently.
- */
-
-public class DistributionsView extends ViewPart implements SlcNames {
-       private final static Log log = LogFactory.getLog(DistributionsView.class);
-       public final static String ID = DistPlugin.ID + ".distributionsView";
-
-       private Repository repository;
-
-       private TreeViewer viewer;
-
-       @Override
-       public void createPartControl(Composite parent) {
-               // Define the TableViewer
-               viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL
-                               | SWT.FULL_SELECTION | SWT.BORDER);
-
-               TreeViewerColumn col = new TreeViewerColumn(viewer, SWT.NONE);
-               col.getColumn().setWidth(200);
-               col.getColumn().setText("Workspace");
-               col.setLabelProvider(new ColumnLabelProvider() {
-                       @Override
-                       public String getText(Object element) {
-                               return element.toString();
-                       }
-               });
-
-               final Tree table = viewer.getTree();
-               table.setHeaderVisible(true);
-               table.setLinesVisible(true);
-
-               viewer.setContentProvider(new DistributionsContentProvider());
-               viewer.addDoubleClickListener(new DistributionsDCL());
-
-               MenuManager menuManager = new MenuManager();
-               Menu menu = menuManager.createContextMenu(viewer.getTree());
-               menuManager.addMenuListener(new IMenuListener() {
-                       public void menuAboutToShow(IMenuManager manager) {
-                               contextMenuAboutToShow(manager);
-                       }
-               });
-               viewer.getTree().setMenu(menu);
-               getSite().registerContextMenu(menuManager, viewer);
-
-               viewer.setInput(getSite());
-
-       }
-
-       @Override
-       public void setFocus() {
-               viewer.getTree().setFocus();
-       }
-
-       /**
-        * Force refresh of the whole view
-        */
-       public void refresh() {
-               viewer.setContentProvider(new DistributionsContentProvider());
-       }
-
-       public void setRepository(Repository repository) {
-               this.repository = repository;
-       }
-
-       /** Programatically configure the context menu */
-       protected void contextMenuAboutToShow(IMenuManager menuManager) {
-               IWorkbenchWindow window = DistPlugin.getDefault().getWorkbench()
-                               .getActiveWorkbenchWindow();
-               // Get Current selected item :
-               Object firstElement = ((IStructuredSelection) viewer.getSelection())
-                               .getFirstElement();
-
-               if (firstElement instanceof TreeParent) {
-                       TreeParent tp = (TreeParent) firstElement;
-                       String wsName = tp.getName();
-
-                       // Build conditions depending on element type (repo or distribution
-                       // for the time being)
-                       boolean isDistribElem = false; // , isRepoElem = false;
-
-                       // if (tp instanceof RepositoryElem){
-                       // isRepoElem = true;
-                       // } else
-                       if (tp instanceof DistributionElem) {
-                               isDistribElem = true;
-                       }
-
-                       // create workspace
-                       CommandHelpers.refreshCommand(menuManager, window,
-                                       CreateWorkspace.ID, CreateWorkspace.DEFAULT_LABEL,
-                                       CreateWorkspace.DEFAULT_ICON_PATH,
-                                       tp instanceof RepositoryElem);
-
-                       // Normalize workspace
-                       Map<String, String> params = new HashMap<String, String>();
-                       params.put(NormalizeDistribution.PARAM_WORKSPACE, wsName);
-                       CommandHelpers.refreshParameterizedCommand(menuManager, window,
-                                       NormalizeDistribution.ID,
-                                       NormalizeDistribution.DEFAULT_LABEL,
-                                       NormalizeDistribution.DEFAULT_ICON_PATH, isDistribElem,
-                                       params);
-
-                       // Copy workspace
-                       params = new HashMap<String, String>();
-                       params.put(CopyWorkspace.PARAM_WORKSPACE_NAME, wsName);
-                       CommandHelpers.refreshParameterizedCommand(menuManager, window,
-                                       CopyWorkspace.ID, CopyWorkspace.DEFAULT_LABEL,
-                                       CopyWorkspace.DEFAULT_ICON_PATH, isDistribElem, params);
-
-                       // Delete Workspace
-                       params = new HashMap<String, String>();
-                       params.put(DeleteWorkspace.PARAM_WORKSPACE_NAME, wsName);
-                       CommandHelpers.refreshParameterizedCommand(menuManager, window,
-                                       DeleteWorkspace.ID, DeleteWorkspace.DEFAULT_LABEL,
-                                       DeleteWorkspace.DEFAULT_ICON_PATH, isDistribElem, params);
-
-                       // Manage workspace authorizations
-                       params = new HashMap<String, String>();
-                       params.put(ManageWorkspaceAuth.PARAM_WORKSPACE_NAME, wsName);
-                       CommandHelpers.refreshParameterizedCommand(menuManager, window,
-                                       ManageWorkspaceAuth.ID, ManageWorkspaceAuth.DEFAULT_LABEL,
-                                       ManageWorkspaceAuth.DEFAULT_ICON_PATH, isDistribElem,
-                                       params);
-               }
-       }
-
-       private class DistributionsContentProvider extends
-                       AbstractTreeContentProvider {
-
-               public Object[] getElements(Object arg0) {
-                       return new Object[] { new RepositoryElem("java", repository) };
-               }
-
-       }
-
-       private static class RepositoryElem extends TreeParent {
-               // private final Repository repository;
-               private Session defaultSession;
-
-               public RepositoryElem(String name, Repository repository) {
-                       super(name);
-                       // this.repository = repository;
-                       try {
-                               defaultSession = repository.login();
-                               String[] workspaceNames = defaultSession.getWorkspace()
-                                               .getAccessibleWorkspaceNames();
-                               for (String workspace : workspaceNames)
-                                       addChild(new DistributionElem(repository, workspace));
-                       } catch (RepositoryException e) {
-                               ErrorFeedback.show("Cannot log to repository", e);
-                       }
-               }
-
-               @Override
-               public synchronized void dispose() {
-                       if (log.isTraceEnabled())
-                               log.trace("Disposing RepositoryElement");
-                       if (defaultSession != null)
-                               defaultSession.logout();
-                       super.dispose();
-               }
-       }
-
-       private static class DistributionElem extends TreeParent {
-               private final String workspaceName;
-               private final Repository repository;
-
-               public DistributionElem(Repository repository, String workspaceName) {
-                       super(workspaceName);
-                       this.workspaceName = workspaceName;
-                       this.repository = repository;
-               }
-
-               public String getWorkspaceName() {
-                       return workspaceName;
-               }
-
-               public Repository getRepository() {
-                       return repository;
-               }
-       }
-
-       @Override
-       public void dispose() {
-               super.dispose();
-       }
-
-       private class DistributionsDCL implements IDoubleClickListener {
-
-               public void doubleClick(DoubleClickEvent event) {
-                       if (event.getSelection() == null || event.getSelection().isEmpty())
-                               return;
-                       Object obj = ((IStructuredSelection) event.getSelection())
-                                       .getFirstElement();
-                       if (obj instanceof DistributionElem) {
-                               DistributionElem distributionElem = (DistributionElem) obj;
-                               DistributionEditorInput dei = new DistributionEditorInput(
-                                               distributionElem.getRepository(),
-                                               distributionElem.getWorkspaceName());
-                               try {
-                                       DistPlugin.getDefault().getWorkbench()
-                                                       .getActiveWorkbenchWindow().getActivePage()
-                                                       .openEditor(dei, DistributionEditor.ID);
-                               } catch (PartInitException e) {
-                                       ErrorFeedback.show("Cannot open editor for "
-                                                       + distributionElem.getWorkspaceName(), e);
-                               }
-                       }
-               }
-       }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/ModulesView.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/ModulesView.java
deleted file mode 100644 (file)
index 0c0a679..0000000
+++ /dev/null
@@ -1,406 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.views;
-
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.eclipse.ui.TreeParent;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.part.ViewPart;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.packageadmin.ExportedPackage;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-public class ModulesView extends ViewPart {
-       private final static Log log = LogFactory.getLog(ModulesView.class);
-
-       private TreeViewer viewer;
-
-       private PackageAdmin packageAdmin;
-
-       private Comparator<ExportedPackage> exportedPackageComparator = new Comparator<ExportedPackage>() {
-
-               public int compare(ExportedPackage o1, ExportedPackage o2) {
-                       if (!o1.getName().equals(o2.getName()))
-                               return o1.getName().compareTo(o2.getName());
-                       else
-                               return o1.getVersion().compareTo(o2.getVersion());
-               }
-       };
-
-       @Override
-       public void createPartControl(Composite parent) {
-               viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
-               viewer.setContentProvider(new ModulesContentProvider());
-               viewer.setLabelProvider(new ModulesLabelProvider());
-               viewer.setInput(DistPlugin.getBundleContext());
-       }
-
-       @Override
-       public void setFocus() {
-               viewer.getTree().setFocus();
-       }
-
-       private class ModulesContentProvider implements ITreeContentProvider {
-
-               public Object[] getElements(Object inputElement) {
-                       return getChildren(inputElement);
-               }
-
-               public Object[] getChildren(Object parentElement) {
-                       if (parentElement instanceof BundleContext) {
-                               BundleContext bundleContext = (BundleContext) parentElement;
-                               Bundle[] bundles = bundleContext.getBundles();
-
-                               TreeParent bundlesNode = new TreeParent("Bundles");
-                               for (Bundle bundle : bundles) {
-                                       if (bundle.getState() == Bundle.ACTIVE)
-                                               bundlesNode.addChild(new BundleNode(bundle));
-                               }
-
-                               // scan packages
-                               ServiceReference paSr = bundleContext
-                                               .getServiceReference(PackageAdmin.class.getName());
-                               // TODO: make a cleaner referencing
-                               packageAdmin = (PackageAdmin) bundleContext.getService(paSr);
-
-                               Bundle bundle1 = null;
-                               Bundle bundle2 = null;
-
-                               Map<Bundle, Set<ExportedPackage>> importedPackages = new HashMap<Bundle, Set<ExportedPackage>>();
-                               Map<String, Set<ExportedPackage>> packages = new TreeMap<String, Set<ExportedPackage>>();
-                               for (Bundle bundle : bundles) {
-                                       if (bundle.getSymbolicName()
-                                                       .equals("org.argeo.security.ui"))
-                                               bundle1 = bundle;
-                                       if (bundle.getSymbolicName().equals(
-                                                       "org.argeo.security.equinox"))
-                                               bundle2 = bundle;
-
-                                       ExportedPackage[] pkgs = packageAdmin
-                                                       .getExportedPackages(bundle);
-                                       if (pkgs != null)
-                                               for (ExportedPackage pkg : pkgs) {
-                                                       if (!packages.containsKey(pkg.getName()))
-                                                               packages.put(pkg.getName(),
-                                                                               new TreeSet<ExportedPackage>(
-                                                                                               exportedPackageComparator));
-                                                       Set<ExportedPackage> expPackages = (Set<ExportedPackage>) packages
-                                                                       .get(pkg.getName());
-                                                       expPackages.add(pkg);
-
-                                                       // imported
-                                                       for (Bundle b : pkg.getImportingBundles()) {
-                                                               if (bundle.getBundleId() != b.getBundleId()) {
-                                                                       if (!importedPackages.containsKey(b))
-                                                                               importedPackages
-                                                                                               .put(b,
-                                                                                                               new TreeSet<ExportedPackage>(
-                                                                                                                               exportedPackageComparator));
-                                                                       Set<ExportedPackage> impPackages = (Set<ExportedPackage>) importedPackages
-                                                                                       .get(b);
-                                                                       impPackages.add(pkg);
-                                                               }
-                                                       }
-                                               }
-                               }
-
-                               TreeParent mPackageNode = new TreeParent("Multiple Packages");
-                               TreeParent aPackageNode = new TreeParent("All Packages");
-                               for (String packageName : packages.keySet()) {
-                                       Set<ExportedPackage> pkgs = packages.get(packageName);
-                                       if (pkgs.size() > 1) {
-                                               MultiplePackagesNode mpn = new MultiplePackagesNode(
-                                                               packageName, pkgs);
-                                               mPackageNode.addChild(mpn);
-                                               aPackageNode.addChild(mpn);
-                                       } else {
-                                               aPackageNode.addChild(new ExportedPackageNode(pkgs
-                                                               .iterator().next()));
-                                       }
-                               }
-
-                               // Map<String, Set<String>> traces1 = new TreeMap<String,
-                               // Set<String>>();
-                               // Map<String, ExportedPackage> space1 =
-                               // dependencySpace(bundle1,
-                               // importedPackages, traces1);
-                               // Map<String, Set<String>> traces2 = new TreeMap<String,
-                               // Set<String>>();
-                               // Map<String, ExportedPackage> space2 =
-                               // dependencySpace(bundle2,
-                               // importedPackages, traces2);
-                               // for (String key : space1.keySet()) {
-                               // if (space2.containsKey(key)) {
-                               // ExportedPackage pkg1 = space1.get(key);
-                               // ExportedPackage pkg2 = space2.get(key);
-                               // if (!pkg1.getVersion().equals(pkg2.getVersion())) {
-                               // log.debug("\n##" + pkg1 + " <> " + pkg2);
-                               // log.debug("# Traces for "
-                               // + bundle1.getSymbolicName());
-                               // for (String trace : traces1.get(pkg1.getName())) {
-                               // log.debug(trace);
-                               // }
-                               // log.debug("# Traces for "
-                               // + bundle2.getSymbolicName());
-                               // for (String trace : traces2.get(pkg2.getName())) {
-                               // log.debug(trace);
-                               // }
-                               // }
-                               // }
-                               // }
-
-                               return new Object[] { bundlesNode, mPackageNode, aPackageNode };
-                       } else if (parentElement instanceof TreeParent) {
-                               return ((TreeParent) parentElement).getChildren();
-                       } else {
-                               return null;
-                       }
-               }
-
-               public Object getParent(Object element) {
-                       // TODO Auto-generated method stub
-                       return null;
-               }
-
-               public boolean hasChildren(Object element) {
-                       if (element instanceof TreeParent) {
-                               return ((TreeParent) element).hasChildren();
-                       }
-                       return false;
-               }
-
-               public void dispose() {
-                       // TODO Auto-generated method stub
-
-               }
-
-               public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-                       // TODO Auto-generated method stub
-
-               }
-
-       }
-
-       protected Map<String, ExportedPackage> dependencySpace(Bundle bundle,
-                       Map<Bundle, Set<ExportedPackage>> importedPackages,
-                       Map<String, Set<String>> traces) {
-               log.debug("Dependency space for " + bundle.getSymbolicName());
-               Map<String, ExportedPackage> space = new TreeMap<String, ExportedPackage>();
-               fillDependencySpace(space, bundle, importedPackages,
-                               bundle.getSymbolicName(), traces);
-               return space;
-       }
-
-       /** Recursive */
-       protected void fillDependencySpace(Map<String, ExportedPackage> space,
-                       Bundle bundle, Map<Bundle, Set<ExportedPackage>> importedPackages,
-                       String currTrace, Map<String, Set<String>> traces) {
-               if (importedPackages.containsKey(bundle)) {
-                       Set<ExportedPackage> imports = importedPackages.get(bundle);
-                       // log.debug("## Fill dependency space for " + bundle + " : ");
-                       for (ExportedPackage pkg : imports) {
-                               if (!traces.containsKey(pkg.getName()))
-                                       traces.put(pkg.getName(), new TreeSet<String>());
-                               traces.get(pkg.getName()).add(currTrace);
-                               if (!space.containsKey(pkg.getName())) {
-                                       space.put(pkg.getName(), pkg);
-                                       Bundle exportingBundle = pkg.getExportingBundle();
-                                       // if (bundle.getBundleId() !=
-                                       // exportingBundle.getBundleId())
-                                       fillDependencySpace(space, exportingBundle,
-                                                       importedPackages, currTrace + " > "
-                                                                       + exportingBundle.getSymbolicName(), traces);
-                               }
-                       }
-               }
-       }
-
-       private class ModulesLabelProvider extends LabelProvider implements
-                       ITableLabelProvider {
-
-               public Image getColumnImage(Object element, int columnIndex) {
-                       // TODO Auto-generated method stub
-                       return null;
-               }
-
-               public String getColumnText(Object element, int columnIndex) {
-                       return getText(element);
-               }
-
-       }
-
-       class BundleNode extends TreeParent {
-               private final Bundle bundle;
-
-               public BundleNode(Bundle bundle) {
-                       super(bundle.getSymbolicName());
-                       this.bundle = bundle;
-
-                       // Registered services
-                       ServiceReference[] registeredServices = bundle
-                                       .getRegisteredServices();
-                       if (registeredServices != null) {
-                               TreeParent registeredServicesNode = new TreeParent(
-                                               "Registered Services");
-                               addChild(registeredServicesNode);
-                               for (ServiceReference sr : registeredServices) {
-                                       if (sr != null)
-                                               registeredServicesNode
-                                                               .addChild(new ServiceReferenceNode(sr));
-                               }
-                       }
-
-                       // Used services
-                       ServiceReference[] usedServices = bundle.getRegisteredServices();
-                       if (usedServices != null) {
-                               TreeParent usedServicesNode = new TreeParent("Used Services");
-                               addChild(usedServicesNode);
-                               for (ServiceReference sr : usedServices) {
-                                       if (sr != null)
-                                               usedServicesNode.addChild(new ServiceReferenceNode(sr));
-                               }
-                       }
-               }
-
-               public Bundle getBundle() {
-                       return bundle;
-               }
-
-       }
-
-       class ServiceReferenceNode extends TreeParent {
-               private final ServiceReference serviceReference;
-
-               public ServiceReferenceNode(ServiceReference serviceReference) {
-                       super(serviceReference.toString());
-                       this.serviceReference = serviceReference;
-
-                       Bundle[] usedBundles = serviceReference.getUsingBundles();
-                       if (usedBundles != null) {
-                               TreeParent usingBundles = new TreeParent("Using Bundles");
-                               addChild(usingBundles);
-                               for (Bundle b : usedBundles) {
-                                       if (b != null)
-                                               usingBundles.addChild(new TreeParent(b
-                                                               .getSymbolicName()));
-                               }
-                       }
-
-                       TreeParent properties = new TreeParent("Properties");
-                       addChild(properties);
-                       for (String key : serviceReference.getPropertyKeys()) {
-                               properties.addChild(new TreeParent(key + "="
-                                               + serviceReference.getProperty(key)));
-                       }
-
-               }
-
-               public ServiceReference getServiceReference() {
-                       return serviceReference;
-               }
-
-       }
-
-       class MultiplePackagesNode extends TreeParent {
-               private String packageName;
-               private Set<ExportedPackage> exportedPackages;
-
-               public MultiplePackagesNode(String packageName,
-                               Set<ExportedPackage> exportedPackages) {
-                       super(packageName);
-                       this.packageName = packageName;
-                       this.exportedPackages = exportedPackages;
-                       for (ExportedPackage pkg : exportedPackages) {
-                               addChild(new ExportedPackageNode(pkg));
-                       }
-               }
-
-       }
-
-       class ConflictingPackageNode extends TreeParent {
-               private ExportedPackage exportedPackage;
-
-               public ConflictingPackageNode(ExportedPackage exportedPackage) {
-                       super(exportedPackage.getName() + " - "
-                                       + exportedPackage.getVersion() + " ("
-                                       + exportedPackage.getExportingBundle() + ")");
-                       this.exportedPackage = exportedPackage;
-
-                       TreeParent bundlesNode = new TreeParent("Dependent Bundles");
-                       this.addChild(bundlesNode);
-                       Map<String, Bundle> bundles = new TreeMap<String, Bundle>();
-                       for (Bundle b : exportedPackage.getImportingBundles()) {
-                               bundles.put(b.getSymbolicName(), b);
-                       }
-                       for (String key : bundles.keySet()) {
-                               addDependentBundles(bundlesNode, bundles.get(key));
-                       }
-               }
-       }
-
-       protected void addDependentBundles(TreeParent parent, Bundle bundle) {
-               TreeParent bundleNode = new TreeParent(bundle.toString());
-               parent.addChild(bundleNode);
-               Map<String, Bundle> bundles = new TreeMap<String, Bundle>();
-               ExportedPackage[] pkgs = packageAdmin.getExportedPackages(bundle);
-               if (pkgs != null)
-                       for (ExportedPackage pkg : pkgs) {
-                               for (Bundle b : pkg.getImportingBundles()) {
-                                       if (!bundles.containsKey(b.getSymbolicName())
-                                                       && b.getBundleId() != bundle.getBundleId()) {
-                                               bundles.put(b.getSymbolicName(), b);
-                                       }
-                               }
-                       }
-
-               for (String key : bundles.keySet()) {
-                       addDependentBundles(bundleNode, bundles.get(key));
-               }
-       }
-
-       class ExportedPackageNode extends TreeParent {
-               private ExportedPackage exportedPackage;
-
-               public ExportedPackageNode(ExportedPackage exportedPackage) {
-                       super(exportedPackage.getName() + " - "
-                                       + exportedPackage.getVersion() + " ("
-                                       + exportedPackage.getExportingBundle() + ")");
-                       this.exportedPackage = exportedPackage;
-                       for (Bundle bundle : exportedPackage.getImportingBundles()) {
-                               addChild(new BundleNode(bundle));
-                       }
-               }
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryArtifactsForm.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryArtifactsForm.java
deleted file mode 100644 (file)
index e7ee355..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.views;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.jcr.SlcNames;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-
-/** Query SLC Repo to get some artifacts given some predefined parameters */
-public class QueryArtifactsForm extends AbstractQueryArtifactsView implements
-               SlcNames {
-       private static final Log log = LogFactory.getLog(QueryArtifactsForm.class);
-       public static final String ID = DistPlugin.ID + ".queryArtifactsForm";
-
-       // widgets
-       private Button executeBtn;
-       private Text groupId;
-       private Text artifactId;
-       private Text version;
-       private SashForm sashForm;
-
-       private Composite top, bottom;
-
-       @Override
-       public void createPartControl(Composite parent) {
-
-               sashForm = new SashForm(parent, SWT.VERTICAL);
-               sashForm.setSashWidth(4);
-               // Enable the different parts to fill the whole page when the tab is
-               // maximized
-               sashForm.setLayout(new FillLayout());
-
-               top = new Composite(sashForm, SWT.NONE);
-               top.setLayout(new GridLayout(1, false));
-
-               bottom = new Composite(sashForm, SWT.NONE);
-               bottom.setLayout(new GridLayout(1, false));
-
-               sashForm.setWeights(new int[] { 25, 75 });
-
-               createQueryForm(top);
-               createResultPart(bottom);
-       }
-
-       public void createQueryForm(Composite parent) {
-               Label lbl;
-               GridData gd;
-
-               GridLayout gl = new GridLayout(2, false);
-               gl.marginTop = 5;
-               parent.setLayout(gl);
-
-               // lbl = new Label(parent, SWT.SINGLE);
-               // lbl.setText("Query by coordinates");
-               // gd = new GridData();
-               // gd.horizontalSpan = 2;
-               // lbl.setLayoutData(gd);
-
-               // Group ID
-               lbl = new Label(parent, SWT.SINGLE);
-               lbl.setText("Group ID");
-               groupId = new Text(parent, SWT.SINGLE | SWT.BORDER);
-               gd = new GridData(GridData.FILL_HORIZONTAL);
-               gd.grabExcessHorizontalSpace = true;
-               groupId.setLayoutData(gd);
-
-               // Artifact ID
-               lbl = new Label(parent, SWT.SINGLE);
-               lbl.setText("Artifact ID");
-               artifactId = new Text(parent, SWT.SINGLE | SWT.BORDER);
-               gd = new GridData(GridData.FILL_HORIZONTAL);
-               gd.grabExcessHorizontalSpace = true;
-               artifactId.setLayoutData(gd);
-
-               // Version
-               lbl = new Label(parent, SWT.SINGLE);
-               lbl.setText("Version");
-               version = new Text(parent, SWT.SINGLE | SWT.BORDER);
-               gd = new GridData(GridData.FILL_HORIZONTAL);
-               gd.grabExcessHorizontalSpace = true;
-               version.setLayoutData(gd);
-
-               executeBtn = new Button(parent, SWT.PUSH);
-               executeBtn.setText("Search");
-               gd = new GridData();
-               gd.horizontalSpan = 2;
-               executeBtn.setLayoutData(gd);
-
-               Listener executeListener = new Listener() {
-                       public void handleEvent(Event event) {
-                               refreshQuery();
-                       }
-               };
-               executeBtn.addListener(SWT.Selection, executeListener);
-       }
-
-       public void refreshQuery() {
-               String queryStr = generateSelectStatement() + generateFromStatement()
-                               + generateWhereStatement();
-               executeQuery(queryStr);
-               bottom.layout();
-               sashForm.layout();
-       }
-
-       private String generateWhereStatement() {
-               try {
-                       boolean hasFirstClause = false;
-                       StringBuffer sb = new StringBuffer(" where ");
-
-                       if (groupId.getText() != null
-                                       && !groupId.getText().trim().equals("")) {
-                               sb.append("[" + SLC_GROUP_ID + "] like '"
-                                               + groupId.getText().replace('*', '%') + "'");
-                               hasFirstClause = true;
-                       }
-
-                       if (artifactId.getText() != null
-                                       && !artifactId.getText().trim().equals("")) {
-                               if (hasFirstClause)
-                                       sb.append(" AND ");
-                               sb.append("[" + SLC_ARTIFACT_ID + "] like '"
-                                               + artifactId.getText().replace('*', '%') + "'");
-                               hasFirstClause = true;
-                       }
-
-                       if (version.getText() != null
-                                       && !version.getText().trim().equals("")) {
-                               if (hasFirstClause)
-                                       sb.append(" AND ");
-                               sb.append("[" + SLC_ARTIFACT_VERSION + "] like '"
-                                               + version.getText().replace('*', '%') + "'");
-                       }
-
-                       return sb.toString();
-               } catch (Exception e) {
-                       throw new ArgeoException(
-                                       "Cannot generate where statement to get artifacts", e);
-               }
-       }
-
-       @Override
-       public void setFocus() {
-               executeBtn.setFocus();
-       }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryArtifactsText.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryArtifactsText.java
deleted file mode 100644 (file)
index f78b610..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.views;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.jcr.SlcNames;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-
-/** Query SLC Repo to get some artifacts with a JCR SQL 2 request. */
-public class QueryArtifactsText extends AbstractQueryArtifactsView implements
-               SlcNames {
-       private static final Log log = LogFactory.getLog(QueryArtifactsText.class);
-       public static final String ID = DistPlugin.ID + ".queryArtifactsText";
-
-       // widgets
-       private Button executeBtn;
-       private Text queryText;
-       private SashForm sashForm;
-
-       private Composite top, bottom;
-
-       @Override
-       public void createPartControl(Composite parent) {
-
-               sashForm = new SashForm(parent, SWT.VERTICAL);
-               sashForm.setSashWidth(4);
-               // Enable the different parts to fill the whole page when the tab is
-               // maximized
-               sashForm.setLayout(new FillLayout());
-
-               top = new Composite(sashForm, SWT.NONE);
-               top.setLayout(new GridLayout(1, false));
-
-               bottom = new Composite(sashForm, SWT.NONE);
-               bottom.setLayout(new GridLayout(1, false));
-
-               sashForm.setWeights(new int[] { 25, 75 });
-
-               createQueryForm(top);
-               createResultPart(bottom);
-       }
-
-       public void createQueryForm(Composite parent) {
-               Label lbl;
-               GridData gd;
-
-               GridLayout gl = new GridLayout(2, false);
-               gl.marginTop = 5;
-               parent.setLayout(gl);
-
-               lbl = new Label(parent, SWT.SINGLE);
-               lbl.setText("Enter a JCR:SQL2 Query");
-
-               executeBtn = new Button(parent, SWT.PUSH);
-               executeBtn.setText("Search");
-
-               queryText = new Text(parent, SWT.MULTI | SWT.WRAP | SWT.BORDER);
-               gd = new GridData(GridData.FILL_HORIZONTAL);
-               gd.grabExcessHorizontalSpace = true;
-               gd.heightHint = 100;
-               gd.horizontalSpan = 2;
-               queryText.setLayoutData(gd);
-
-               String query = generateSelectStatement() + generateFromStatement()
-                               + generateWhereStatement();
-               queryText.setText(query);
-
-               Listener executeListener = new Listener() {
-                       public void handleEvent(Event event) {
-                               refreshQuery();
-                       }
-               };
-               executeBtn.addListener(SWT.Selection, executeListener);
-       }
-
-       public void refreshQuery() {
-               String queryStr = queryText.getText();
-               executeQuery(queryStr);
-               bottom.layout();
-               sashForm.layout();
-       }
-
-       private String generateWhereStatement() {
-               StringBuffer sb = new StringBuffer(" where ");
-               return sb.toString();
-       }
-
-       @Override
-       public void setFocus() {
-               executeBtn.setFocus();
-       }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryBundlesForm.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryBundlesForm.java
deleted file mode 100644 (file)
index 51b621b..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.dist.views;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-
-/** Query SLC Repo to get some artifacts given some predefined parameters */
-public class QueryBundlesForm extends AbstractQueryArtifactsView implements
-               SlcNames, SlcTypes {
-       private static final Log log = LogFactory.getLog(QueryBundlesForm.class);
-       public static final String ID = DistPlugin.ID + ".queryBundlesForm";
-
-       // widgets
-       private Button executeBtn;
-       private Text symbolicName;
-       private Text importedPackage;
-       private Text exportedPackage;
-       private SashForm sashForm;
-
-       private Composite top, bottom;
-
-       @Override
-       public void createPartControl(Composite parent) {
-
-               sashForm = new SashForm(parent, SWT.VERTICAL);
-               sashForm.setSashWidth(4);
-               // Enable the different parts to fill the whole page when the tab is
-               // maximized
-               sashForm.setLayout(new FillLayout());
-
-               top = new Composite(sashForm, SWT.NONE);
-               top.setLayout(new GridLayout(1, false));
-
-               bottom = new Composite(sashForm, SWT.NONE);
-               bottom.setLayout(new GridLayout(1, false));
-
-               sashForm.setWeights(new int[] { 25, 75 });
-
-               createQueryForm(top);
-               createResultPart(bottom);
-       }
-
-       public void createQueryForm(Composite parent) {
-               Label lbl;
-               GridData gd;
-
-               GridLayout gl = new GridLayout(2, false);
-               gl.marginTop = 5;
-               parent.setLayout(gl);
-
-               // Bundle Name
-               lbl = new Label(parent, SWT.SINGLE);
-               lbl.setText("Symbolic name");
-               symbolicName = new Text(parent, SWT.SINGLE | SWT.BORDER);
-               gd = new GridData(GridData.FILL_HORIZONTAL);
-               gd.grabExcessHorizontalSpace = true;
-               symbolicName.setLayoutData(gd);
-
-               // imported package
-               lbl = new Label(parent, SWT.SINGLE);
-               lbl.setText("Imported package");
-               importedPackage = new Text(parent, SWT.SINGLE | SWT.BORDER);
-               gd = new GridData(GridData.FILL_HORIZONTAL);
-               gd.grabExcessHorizontalSpace = true;
-               importedPackage.setLayoutData(gd);
-
-               // exported package
-               lbl = new Label(parent, SWT.SINGLE);
-               lbl.setText("Exported package");
-               exportedPackage = new Text(parent, SWT.SINGLE | SWT.BORDER);
-               gd = new GridData(GridData.FILL_HORIZONTAL);
-               gd.grabExcessHorizontalSpace = true;
-               exportedPackage.setLayoutData(gd);
-
-               executeBtn = new Button(parent, SWT.PUSH);
-               executeBtn.setText("Search");
-               gd = new GridData();
-               gd.horizontalSpan = 2;
-               executeBtn.setLayoutData(gd);
-
-               Listener executeListener = new Listener() {
-                       public void handleEvent(Event event) {
-                               refreshQuery();
-                       }
-               };
-               executeBtn.addListener(SWT.Selection, executeListener);
-       }
-
-       public void refreshQuery() {
-               String queryStr = generateStatement();
-               executeQuery(queryStr);
-               bottom.layout();
-               sashForm.layout();
-       }
-
-       private String generateStatement() {
-               try {
-                       // shortcuts
-                       boolean hasFirstClause = false;
-                       boolean ipClause = importedPackage.getText() != null
-                                       && !importedPackage.getText().trim().equals("");
-                       boolean epClause = exportedPackage.getText() != null
-                                       && !exportedPackage.getText().trim().equals("");
-
-                       StringBuffer sb = new StringBuffer();
-                       // Select
-                       sb.append("select " + SBA + ".*, " + SAVB + ".* ");
-                       sb.append(" from " + SAVB);
-
-                       // join
-                       sb.append(" inner join ");
-                       sb.append(SBA);
-                       sb.append(" on isdescendantnode(" + SBA + ", " + SAVB + ") ");
-                       if (ipClause) {
-                               sb.append(" inner join ");
-                               sb.append(SIP);
-                               sb.append(" on isdescendantnode(" + SIP + ", " + SBA + ") ");
-                       }
-
-                       if (epClause) {
-                               sb.append(" inner join ");
-                               sb.append(SEP);
-                               sb.append(" on isdescendantnode(" + SEP + ", " + SBA + ") ");
-                       }
-
-                       // where
-                       sb.append(" where ");
-                       if (symbolicName.getText() != null
-                                       && !symbolicName.getText().trim().equals("")) {
-                               sb.append(SBA + ".[" + SLC_SYMBOLIC_NAME + "] like '"
-                                               + symbolicName.getText().replace('*', '%') + "'");
-                               hasFirstClause = true;
-                       }
-
-                       if (ipClause) {
-                               if (hasFirstClause)
-                                       sb.append(" AND ");
-                               sb.append(SIP + ".[" + SLC_NAME + "] like '"
-                                               + importedPackage.getText().replace('*', '%') + "'");
-                               hasFirstClause = true;
-                       }
-
-                       if (epClause) {
-                               if (hasFirstClause)
-                                       sb.append(" AND ");
-                               sb.append(SEP + ".[" + SLC_NAME + "] like '"
-                                               + exportedPackage.getText().replace('*', '%') + "'");
-                       }
-                       return sb.toString();
-               } catch (Exception e) {
-                       throw new ArgeoException(
-                                       "Cannot generate where statement to get artifacts", e);
-               }
-       }
-
-       @Override
-       public void setFocus() {
-               executeBtn.setFocus();
-       }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/wizards/ChangeRightsWizard.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/wizards/ChangeRightsWizard.java
deleted file mode 100644 (file)
index 772a8c2..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.argeo.slc.client.ui.dist.wizards;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-
-import org.argeo.ArgeoException;
-import org.argeo.jcr.JcrUtils;
-import org.eclipse.jface.wizard.Wizard;
-
-/**
- * Small wizard to manage authorizations on the root node of the current
- * workspace
- */
-public class ChangeRightsWizard extends Wizard {
-
-       private Session currentSession;
-
-       // This page widget
-       private ChooseRightsPage page;
-
-       public ChangeRightsWizard(Session currentSession) {
-               super();
-               this.currentSession = currentSession;
-       }
-
-       @Override
-       public void addPages() {
-               try {
-                       page = new ChooseRightsPage();
-                       addPage(page);
-               } catch (Exception e) {
-                       throw new ArgeoException("Cannot add page to wizard ", e);
-               }
-       }
-
-       @Override
-       public boolean performFinish() {
-               if (!canFinish())
-                       return false;
-               try {
-                       JcrUtils.addPrivilege(currentSession, "/", page.getGroupName(),
-                                       page.getAuthTypeStr());
-               } catch (RepositoryException re) {
-                       throw new ArgeoException(
-                                       "Unexpected error while setting privileges", re);
-               }
-               return true;
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/wizards/ChooseRightsPage.java b/eclipse/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/wizards/ChooseRightsPage.java
deleted file mode 100644 (file)
index 251ea61..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.argeo.slc.client.ui.dist.wizards;
-
-import java.util.regex.Pattern;
-
-import javax.jcr.security.Privilege;
-
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class ChooseRightsPage extends WizardPage implements ModifyListener {
-
-       // This page widget
-       private Text groupNameTxt;
-       private Combo authorizationCmb;
-
-       // Define acceptable chars for the technical name
-       private static Pattern p = Pattern.compile("^[A-Za-z0-9]+$");
-
-       // USABLE SHORTCUTS
-       protected final static String[] validAuthType = { Privilege.JCR_READ,
-                       Privilege.JCR_WRITE, Privilege.JCR_ALL };
-
-       public ChooseRightsPage() {
-               super("Main");
-               setTitle("Manange authorizations on the current workspace");
-       }
-
-       public void createControl(Composite parent) {
-               // specify subject
-               Composite composite = new Composite(parent, SWT.NONE);
-               composite.setLayout(new GridLayout(2, false));
-               Label lbl = new Label(composite, SWT.LEAD);
-               lbl.setText("Group or user name (no blank, no special chars)");
-               lbl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
-               groupNameTxt = new Text(composite, SWT.LEAD | SWT.BORDER);
-               groupNameTxt.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
-                               false));
-               if (groupNameTxt != null)
-                       groupNameTxt.addModifyListener(this);
-
-               // Choose rigths
-               new Label(composite, SWT.NONE).setText("Choose corresponding rights");
-               authorizationCmb = new Combo(composite, SWT.BORDER | SWT.V_SCROLL);
-               authorizationCmb.setItems(validAuthType);
-               GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-               authorizationCmb.setLayoutData(gd);
-
-               authorizationCmb.select(0);
-
-               // Compulsory
-               setControl(composite);
-       }
-
-       protected String getGroupName() {
-               return groupNameTxt.getText();
-       }
-
-       protected String getAuthTypeStr() {
-               return authorizationCmb.getItem(authorizationCmb.getSelectionIndex());
-       }
-
-       private static boolean match(String s) {
-               return p.matcher(s).matches();
-       }
-
-       public void modifyText(ModifyEvent event) {
-               String message = checkComplete();
-               if (message != null)
-                       setMessage(message, WizardPage.ERROR);
-               else {
-                       setMessage("Complete", WizardPage.INFORMATION);
-                       setPageComplete(true);
-               }
-       }
-
-       /** @return error message or null if complete */
-       protected String checkComplete() {
-               String groupStr = groupNameTxt.getText();
-               if (groupStr == null || "".equals(groupStr))
-                       return "Please enter the name of the corresponding group.";
-               // Remove regexp check for the time being.
-               // else if (!match(groupStr))
-               // return
-               // "Please use only alphanumerical chars for the short technical name.";
-               return null;
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/.classpath b/eclipse/plugins/org.argeo.slc.client.ui/.classpath
deleted file mode 100644 (file)
index 5641c7c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="src" path="src/main/java"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/.project b/eclipse/plugins/org.argeo.slc.client.ui/.project
deleted file mode 100644 (file)
index ed71a2e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.client.ui</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-       </natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.argeo.slc.client.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 95d6b05..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#Wed Aug 04 16:31:36 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.argeo.slc.client.ui/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644 (file)
index 31cbfae..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Jul 27 14:24:51 CEST 2010
-eclipse.preferences.version=1
-resolve.requirebundle=false
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.argeo.slc.client.ui/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index f7ddb79..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Ui
-Bundle-SymbolicName: org.argeo.slc.client.ui;singleton:=true
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-Activator: org.argeo.slc.client.ui.ClientUiPlugin
-Require-Bundle: org.eclipse.ui;resolution:=optional,
- org.eclipse.core.runtime;resolution:=optional,
- org.eclipse.rap.ui;resolution:=optional,
- org.eclipse.rap.ui.workbench;resolution:=optional
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.argeo.slc.client.ui,
- org.argeo.slc.client.ui.views
-Import-Package: javax.jcr;version="2.0.0",
- javax.jcr.nodetype;version="2.0.0",
- javax.jcr.observation;version="2.0.0",
- javax.jcr.query;version="2.0.0",
- org.apache.commons.io;version="1.4.0",
- org.apache.commons.logging;version="1.1.1",
- org.argeo,
- org.argeo.eclipse.spring,
- org.argeo.eclipse.ui,
- org.argeo.eclipse.ui.jcr,
- org.argeo.eclipse.ui.specific,
- org.argeo.jcr,
- org.argeo.jcr.spring,
- org.argeo.slc,
- org.argeo.slc.build,
- org.argeo.slc.client.ui,
- org.argeo.slc.core.attachment,
- org.argeo.slc.core.execution,
- org.argeo.slc.core.runtime,
- org.argeo.slc.core.structure.tree,
- org.argeo.slc.core.test.tree,
- org.argeo.slc.dao.process,
- org.argeo.slc.dao.test,
- org.argeo.slc.dao.test.tree,
- org.argeo.slc.deploy,
- org.argeo.slc.execution,
- org.argeo.slc.jcr,
- org.argeo.slc.jcr.execution,
- org.argeo.slc.msg.test.tree,
- org.argeo.slc.process,
- org.argeo.slc.runtime,
- org.argeo.slc.services,
- org.argeo.slc.services.impl,
- org.argeo.slc.test,
- org.eclipse.core.expressions,
- org.eclipse.ui.forms,
- org.eclipse.ui.forms.editor,
- org.eclipse.ui.forms.widgets,
- org.eclipse.ui.plugin,
- org.springframework.beans.factory,
- org.springframework.context,
- org.springframework.core.io.support
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/commands.xml b/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/commands.xml
deleted file mode 100644 (file)
index 6ed132d..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans
-        http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-       <bean id="updateModule"
-               class="org.argeo.slc.client.ui.commands.UpdateModule"
-               scope="prototype">
-               <property name="modulesManager" ref="modulesManager"/>
-       </bean>
-<!--   <bean name="runSlc/Flow" -->
-<!--           class="org.argeo.slc.client.ui.commands.RunSlcFlow" -->
-<!--           scope="prototype"> -->
-<!--           <property name="modulesManager" ref="modulesManager"/> -->
-<!--   </bean> -->
-
-       <!-- Result list view commands-->
-<!--   <bean id="org.argeo.slc.client.ui.refreshResultList" -->
-<!--           class="org.argeo.slc.client.ui.commands.ResultListViewRefreshHandler" -->
-<!--           scope="prototype"> -->
-<!--   </bean> -->
-
-<!--   <bean id="org.argeo.slc.client.ui.removeSelectedResultFromResultList" -->
-<!--           class="org.argeo.slc.client.ui.commands.RemoveSelectedResultFromResultList" -->
-<!--           scope="prototype"> -->
-<!--   </bean> -->
-
-
-<!--   <bean id="org.argeo.slc.client.ui.refreshExecutionModulesView" -->
-<!--           class="org.argeo.slc.client.ui.commands.ExecutionModulesViewRefreshHandler" -->
-<!--           scope="prototype"> -->
-<!--   </bean> -->
-<!--   <bean id="org.argeo.slc.client.ui.refreshProcessList" -->
-<!--           class="org.argeo.slc.client.ui.commands.ProcessListViewRefreshHandler" -->
-<!--           scope="prototype"> -->
-<!--   </bean> -->
-<!--   <bean id="org.argeo.slc.client.ui.displayProcessDetails" -->
-<!--           class="org.argeo.slc.client.ui.commands.ProcessDetailsDisplayHandler" -->
-<!--           scope="prototype"> -->
-<!--   </bean> -->
-<!--   <bean id="org.argeo.slc.client.ui.displayResultDetails" -->
-<!--           class="org.argeo.slc.client.ui.commands.ResultDetailsDisplayHandler" -->
-<!--           scope="prototype"> -->
-<!--   </bean> -->
-<!--   <bean id="org.argeo.slc.client.ui.launchBatch" class="org.argeo.slc.client.ui.commands.LaunchBatchHandler" -->
-<!--           scope="prototype"> -->
-<!--   </bean> -->
-<!--   <bean id="org.argeo.slc.client.ui.removeSelectedFromBatch" -->
-<!--           class="org.argeo.slc.client.ui.commands.RemoveSelectedProcessFromBatchHandler" -->
-<!--           scope="prototype"> -->
-<!--   </bean> -->
-<!--   <bean id="org.argeo.slc.client.ui.clearBatch" class="org.argeo.slc.client.ui.commands.ClearBatchHandler" -->
-<!--           scope="prototype"> -->
-<!--   </bean> -->
-<!--   <bean id="org.argeo.slc.client.ui.manageBundles" class="org.argeo.slc.client.ui.commands.ManageBundlesHandler" -->
-<!--           scope="prototype"> -->
-<!--   </bean>  -->
-</beans>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/controllers.xml b/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/controllers.xml
deleted file mode 100644 (file)
index 229d6d1..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans
-        http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-       <bean id="processController" class="org.argeo.slc.client.ui.controllers.ProcessController">
-       </bean>
-</beans>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/editors.xml b/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/editors.xml
deleted file mode 100644 (file)
index 31267a1..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans
-        http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-       <bean id="processEditor" class="org.argeo.slc.client.ui.editors.ProcessEditor"
-               scope="prototype">
-               <property name="processController" ref="processController" />
-               <property name="modulesManager" ref="modulesManager" />
-               <property name="session">
-                       <bean factory-bean="repository" factory-method="login" />
-               </property>
-       </bean>
-</beans>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/jcr.xml b/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/jcr.xml
deleted file mode 100644 (file)
index b2043e2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans
-        http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-       <bean id="session" class="org.argeo.jcr.spring.ThreadBoundSession">
-               <property name="repository" ref="repository" />
-       </bean>
-</beans>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/osgi.xml b/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/osgi.xml
deleted file mode 100644 (file)
index 0c121d3..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xmlns:osgi="http://www.springframework.org/schema/osgi"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"\r
-       osgi:default-timeout="30000">\r
-\r
-       <beans:description>SLC UI</beans:description>\r
-\r
-       <!-- REFERENCES -->\r
-       <reference id="repository" interface="javax.jcr.Repository"\r
-               filter="(argeo.jcr.repository.alias=slc)" />\r
-       <list id="agentFactories" interface="org.argeo.slc.runtime.SlcAgentFactory">\r
-               <osgi:listener ref="processController" bind-method="register"\r
-                       unbind-method="unregister" />\r
-       </list>\r
-       <reference id="modulesManager"\r
-               interface="org.argeo.slc.execution.ExecutionModulesManager" />\r
-\r
-\r
-       <!-- Services exposed by the current bundle -->\r
-\r
-       <!-- Listeners used by the execution modules -->\r
-<!--   <service ref="testManagerServiceAdapter" -->\r
-<!--           interface="org.argeo.slc.core.test.tree.TreeTestResultListener" /> -->\r
-<!--   <service ref="slcExecutionServiceAdapter" interface="org.argeo.slc.process.SlcExecutionNotifier" /> -->\r
-\r
-\r
-\r
-<!--   <reference id="slcExecutionService" interface="org.argeo.slc.services.SlcExecutionService" /> -->\r
-<!--   <reference id="testManagerService" interface="org.argeo.slc.services.TestManagerService" /> -->\r
-<!--   <reference id="oxmBean" interface="org.argeo.slc.client.oxm.OxmInterface" /> -->\r
-\r
-       <!-- References Needed -->\r
-       <!-- <reference id="marshaller" interface="org.springframework.oxm.Marshaller" \r
-               /> <reference id="unmarshaller" interface="org.springframework.oxm.Unmarshaller" \r
-               /> -->\r
-\r
-       <!-- DAO -->\r
-<!--   <reference id="testResultCollectionDao" -->\r
-<!--           interface="org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao" -->\r
-<!--           context-class-loader="service-provider" /> -->\r
-\r
-<!--   <reference id="treeTestResultDao" interface="org.argeo.slc.dao.test.tree.TreeTestResultDao" -->\r
-<!--           context-class-loader="service-provider" /> -->\r
-\r
-\r
-<!--   <reference id="slcExecutionDao" interface="org.argeo.slc.dao.process.SlcExecutionDao" -->\r
-<!--           context-class-loader="service-provider" /> -->\r
-\r
-       <!-- Content providers are deported in an other bundle for UI not to depend \r
-               on DB used implementation. We use bean-name reference because interface is \r
-               not enough to choose between various been with same interface -->\r
-<!--   <reference id="processListTableLabelProvider" interface="org.eclipse.jface.viewers.ITableLabelProvider" -->\r
-<!--           bean-name="processListTableLabelProvider" /> -->\r
-<!--   <reference id="processListStructuredContentProvider" -->\r
-<!--           interface="org.eclipse.jface.viewers.IStructuredContentProvider" -->\r
-<!--           bean-name="processListStructuredContentProvider" /> -->\r
-<!--   <reference id="processDetailContentProvider" -->\r
-<!--           interface="org.eclipse.jface.viewers.ITreeContentProvider" bean-name="processDetailContentProvider" /> -->\r
-<!--   <reference id="resultDetailContentProvider" -->\r
-<!--           interface="org.eclipse.jface.viewers.ITreeContentProvider" bean-name="resultDetailContentProvider" /> -->\r
-<!--   <reference id="resultDetailLabelProvider" interface="org.eclipse.jface.viewers.ITableLabelProvider" -->\r
-<!--           bean-name="resultDetailLabelProvider" /> -->\r
-\r
-\r
-       <!-- TODO : what is it for ? -->\r
-<!--   <list id="slcAgents" interface="org.argeo.slc.runtime.SlcAgent" /> -->\r
-</beans:beans>
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/views.xml b/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/views.xml
deleted file mode 100644 (file)
index 9c4b4a9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans
-        http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-       <bean id="jcrExecutionModulesView" class="org.argeo.slc.client.ui.views.JcrExecutionModulesView"
-               scope="prototype">
-               <property name="session" ref="session" />
-               <property name="modulesManager" ref="modulesManager" />
-       </bean>
-
-       <bean id="jcrProcessListView" class="org.argeo.slc.client.ui.views.JcrProcessListView"
-               scope="prototype">
-               <property name="session" ref="session" />
-       </bean>
-
-       <bean id="jcrResultListView" class="org.argeo.slc.client.ui.views.JcrResultListView"
-               scope="prototype">
-               <property name="session" ref="session" />
-       </bean>
-
-</beans>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/build.properties b/eclipse/plugins/org.argeo.slc.client.ui/build.properties
deleted file mode 100644 (file)
index a1c313d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/main/java
-output.. = target/classes
-bin.includes = plugin.xml,\
-               META-INF/,\
-               .,\
-               icons/
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/agent.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/agent.gif
deleted file mode 100644 (file)
index 0a1fa96..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/agent.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/agentFactory.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/agentFactory.gif
deleted file mode 100644 (file)
index b51ae39..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/agentFactory.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/archive.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/archive.png
deleted file mode 100644 (file)
index fb36f36..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/archive.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/batch.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/batch.gif
deleted file mode 100644 (file)
index b8ca14a..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/batch.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/choices.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/choices.gif
deleted file mode 100644 (file)
index da2f577..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/choices.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/clear_batch.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/clear_batch.gif
deleted file mode 100644 (file)
index 28a3785..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/clear_batch.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/computer.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/computer.png
deleted file mode 100644 (file)
index ff64b84..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/computer.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/edit_parameters.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/edit_parameters.gif
deleted file mode 100644 (file)
index 94eedf6..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/edit_parameters.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/error.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/error.gif
deleted file mode 100644 (file)
index 64b4384..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/error.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/excel.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/excel.png
deleted file mode 100644 (file)
index eb6158e..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/excel.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/executionSpec.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/executionSpec.gif
deleted file mode 100644 (file)
index 1ff93cb..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/executionSpec.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/executionSpecAttribute.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/executionSpecAttribute.gif
deleted file mode 100644 (file)
index bee687c..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/executionSpecAttribute.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/executionSpecs.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/executionSpecs.gif
deleted file mode 100644 (file)
index 0b63124..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/executionSpecs.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/execution_module.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/execution_module.gif
deleted file mode 100644 (file)
index 983932f..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/execution_module.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/failed.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/failed.gif
deleted file mode 100644 (file)
index 3e9d893..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/failed.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/flow.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/flow.png
deleted file mode 100644 (file)
index 114193f..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/flow.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/folder.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/folder.gif
deleted file mode 100644 (file)
index 42e027c..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/folder.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/folder.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/folder.png
deleted file mode 100644 (file)
index 6937ed4..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/folder.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/kill.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/kill.png
deleted file mode 100644 (file)
index cfbf9d1..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/kill.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/launch.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/launch.gif
deleted file mode 100644 (file)
index ec477ea..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/launch.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/module.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/module.png
deleted file mode 100644 (file)
index 0afea5b..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/module.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/module_stopped.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/module_stopped.gif
deleted file mode 100644 (file)
index c88284a..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/module_stopped.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/passed.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/passed.gif
deleted file mode 100644 (file)
index 23c97f0..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/passed.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/process_completed.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/process_completed.png
deleted file mode 100644 (file)
index 0ad64e7..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/process_completed.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/process_details.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/process_details.gif
deleted file mode 100644 (file)
index c81630a..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/process_details.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/process_error.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/process_error.png
deleted file mode 100644 (file)
index e66c98e..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/process_error.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/process_running.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/process_running.png
deleted file mode 100644 (file)
index 471c091..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/process_running.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/process_scheduled.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/process_scheduled.gif
deleted file mode 100644 (file)
index b7f03d5..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/process_scheduled.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/processes.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/processes.gif
deleted file mode 100644 (file)
index 364c0e7..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/processes.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/processes.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/processes.png
deleted file mode 100644 (file)
index 364c0e7..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/processes.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/refresh.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/refresh.png
deleted file mode 100644 (file)
index a3884fb..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/refresh.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/relaunch.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/relaunch.gif
deleted file mode 100644 (file)
index 8f943a8..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/relaunch.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/removeAll.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/removeAll.png
deleted file mode 100644 (file)
index 73053c4..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/removeAll.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/remove_one.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/remove_one.gif
deleted file mode 100644 (file)
index 2cd9c54..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/remove_one.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/result_details.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/result_details.gif
deleted file mode 100644 (file)
index 4017f6d..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/result_details.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/results.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/results.gif
deleted file mode 100644 (file)
index 0dc862c..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/results.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/slc_execution_perspective.gif b/eclipse/plugins/org.argeo.slc.client.ui/icons/slc_execution_perspective.gif
deleted file mode 100644 (file)
index b8ca14a..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/slc_execution_perspective.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/icons/system.png b/eclipse/plugins/org.argeo.slc.client.ui/icons/system.png
deleted file mode 100644 (file)
index 71f44d0..0000000
Binary files a/eclipse/plugins/org.argeo.slc.client.ui/icons/system.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/plugin.xml b/eclipse/plugins/org.argeo.slc.client.ui/plugin.xml
deleted file mode 100644 (file)
index bd42332..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-       <!-- Views --> 
-   <extension
-         point="org.eclipse.ui.views">
-          <view
-                id="org.argeo.slc.client.ui.jcrExecutionModulesView"
-                class="org.argeo.eclipse.spring.SpringExtensionFactory"
-                icon="icons/execution_module.gif"
-                name="Execution"
-                restorable="true">
-          </view>
-          <view
-                id="org.argeo.slc.client.ui.jcrResultListView"
-                class="org.argeo.eclipse.spring.SpringExtensionFactory"
-                icon="icons/results.gif"
-                name="Results"
-                restorable="true">
-          </view>
-          <view
-                id="org.argeo.slc.client.ui.jcrProcessListView"
-                class="org.argeo.eclipse.spring.SpringExtensionFactory"
-                name="Processes"
-                icon="icons/processes.gif"
-                restorable="true">
-          </view>
-          <!--
-          <view
-                id="org.argeo.slc.client.ui.executionModulesView"
-                class="org.argeo.eclipse.spring.SpringExtensionFactory"
-                icon="icons/execution_module.gif"
-                name="Execution Modules"
-                restorable="true">
-          </view>
-          <view
-                class="org.argeo.eclipse.spring.SpringExtensionFactory"
-                icon="icons/results.gif"
-                id="org.argeo.slc.client.ui.resultListView"
-                name="Results"
-                restorable="true">
-          </view>
-          <view
-                allowMultiple="true"
-                class="org.argeo.eclipse.spring.SpringExtensionFactory"
-                icon="icons/result_details.gif"
-                id="org.argeo.slc.client.ui.resultDetailView"
-                name="Result details"
-                restorable="true">
-          </view>
-          <view
-                id="org.argeo.slc.client.ui.processListView"
-                class="org.argeo.eclipse.spring.SpringExtensionFactory"
-                name="Processes"
-                icon="icons/processes.gif"
-                restorable="true">
-          </view>
-          <view
-                allowMultiple="true"
-                class="org.argeo.eclipse.spring.SpringExtensionFactory"
-                icon="icons/process_details.gif"
-                id="org.argeo.slc.client.ui.processDetailView"
-                name="Process details"
-                restorable="true">
-          </view>
-          <view
-                class="org.argeo.eclipse.spring.SpringExtensionFactory"
-                icon="icons/edit_parameters.gif"
-                id="org.argeo.slc.client.ui.processParametersView"
-                name="Process Parameters"
-                restorable="true">
-          </view>
-          <view
-                class="org.argeo.eclipse.spring.SpringExtensionFactory"
-                icon="icons/batch.gif"
-                id="org.argeo.slc.client.ui.processBuilderView"
-                name="Batch"
-                restorable="true">
-          </view>
-          -->
-   </extension>
-       
-       <!-- Commands definitions --> 
-       <extension
-       point="org.eclipse.ui.commands">
-               <command
-               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.slc.client.ui.updateModule"
-               name="Update Module">
-           </command>
-           <!--
-               <command
-               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.slc.client.ui.runSlc/Flow"
-               name="org.argeo.slc.demo.minimal:hello">
-           </command>
-           -->
-           <!-- Result List
-               <command
-               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.slc.client.ui.refreshResultList"
-               name="Refresh Result List">
-           </command>
-               <command
-               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.slc.client.ui.removeSelectedResultFromResultList"
-               name="Remove selected results from list">
-           </command>
-               <command 
-               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.slc.client.ui.displayResultDetails"
-               name="Display Result Details">
-               </command>
-        -->
-           <!-- Execution Modules
-           <command
-               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.slc.client.ui.refreshExecutionModulesView"
-               name="Refresh Execution Modules View">
-               </command>
-                -->
-           <!-- Batch
-           <command
-               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.slc.client.ui.launchBatch"
-               name="Launch Batch">
-           </command>
-           <command
-               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.slc.client.ui.removeSelectedFromBatch"
-               name="Remove Selected From Batch">
-               </command>
-           <command
-               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.slc.client.ui.clearBatch"
-               name="Clear Batch">
-               </command>
-                -->
-           <!-- Process List
-           <command
-               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.slc.client.ui.refreshProcessList"
-               name="Refresh Process List ">
-               </command>
-               <command 
-               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.slc.client.ui.displayProcessDetails"
-               name="DisplayProcessDetails">
-                       <commandParameter
-                       id="org.argeo.slc.client.commands.processUuid"
-                       name="Process UUID">
-                       </commandParameter>
-               </command>
-               <command 
-               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
-               id="org.argeo.slc.client.ui.manageBundles"
-               name="Manage Bundles">
-               </command>
-                -->
-    </extension>
-   
-       <!-- Menu definitions -->
-       <extension
-       id="menu:org.eclipse.ui.main.menu"
-        point="org.eclipse.ui.menus">
-               <menuContribution
-               locationURI="toolbar:org.argeo.slc.client.ui.jcrExecutionModulesView">
-                       <command
-                               commandId="org.argeo.slc.client.ui.updateModule"
-                               icon="icons/refresh.png"
-                               label="Update module"
-                               tooltip="Update module">
-                       </command>
-                       <!--
-                       <command
-                               commandId="org.argeo.slc.client.ui.runSlc/Flow"
-                               icon="icons/launch.gif"
-                               label="Run SLC Flow"
-                               tooltip="Run SLC Flow">
-                       </command>
-                       -->
-               </menuContribution>   
-        <!--
-               <menuContribution
-               locationURI="menu:fileMenu">
-               </menuContribution>
-               <menuContribution
-                       locationURI="toolbar:org.argeo.slc.client.ui.resultListView">
-            <command
-               commandId="org.argeo.slc.client.ui.refreshResultList"
-                icon="icons/refresh.png"
-                label="Refresh result list"
-                tooltip="Refresh the result list">
-            </command>
-            <command
-               commandId="org.argeo.slc.client.ui.removeSelectedResultFromResultList"
-                icon="icons/removeAll.png"
-                label="Remove selected"
-                tooltip="Remove selected items from the result list (Also on server side, cannot be undone)">
-            </command>
-               </menuContribution>
-               <menuContribution
-               locationURI="toolbar:org.argeo.slc.client.ui.executionModulesView">
-                       <command
-                               commandId="org.argeo.slc.client.ui.refreshExecutionModulesView"
-                               icon="icons/refresh.png"
-                               label="Refresh execution modules"
-                               tooltip="Refresh the execution modules view.">
-                       </command>
-               </menuContribution>   
-               <menuContribution
-                       locationURI="toolbar:org.argeo.slc.client.ui.processBuilderView">
-                       <command
-                               commandId="org.argeo.slc.client.ui.launchBatch"
-                               icon="icons/launch.gif"
-                               label="Launch Batch"
-                               tooltip="Launch the batch built in the process builder view.">
-                       </command>
-                       <command
-                               commandId="org.argeo.slc.client.ui.clearBatch"
-                               label="Clear Batch"
-                               icon="icons/clear_batch.gif"
-                               tooltip="Clear the batch built in the process builder view.">
-                       </command>
-                       <command
-                               commandId="org.argeo.slc.client.ui.removeSelectedFromBatch"
-                               icon="icons/remove_one.gif"
-                               label="Remove Selected From Batch"
-                               tooltip="Remove selected process from process builder view.">
-                       </command>
-               </menuContribution>
-               -->
-       </extension>
-   <extension
-         point="org.eclipse.ui.perspectives">
-      <perspective
-            class="org.argeo.slc.client.ui.SlcExecutionPerspective"
-            icon="icons/slc_execution_perspective.gif"
-            id="org.argeo.slc.client.ui.slcExecutionPerspective"
-            name="SLC Execution">
-      </perspective>
-   </extension>
-   <extension
-         point="org.eclipse.ui.editors">
-      <editor
-            class="org.argeo.eclipse.spring.SpringExtensionFactory"
-            default="false"
-            icon="icons/batch.gif"
-            id="org.argeo.slc.client.ui.processEditor"
-            name="Process">
-      </editor>
-   </extension>
-   <extension
-         point="org.eclipse.ui.elementFactories">
-      <factory
-            class="org.argeo.slc.client.ui.editors.ProcessEditorInputFactory"
-            id="org.argeo.slc.client.ui.processEditorInputFactory">
-      </factory>
-   </extension>
-   <extension
-           point="org.eclipse.ui.activities">
-     </extension>
-  <extension
-           point="org.eclipse.ui.activities">
-        <activity
-              description="SLC users"
-              id="org.argeo.slc.client.ui.slcActivity"
-              name="SLC">
-                 <enabledWhen>
-                   <with variable="roles">
-                     <iterate ifEmpty="false" operator="or">
-                       <equals value="ROLE_SLC" />
-                     </iterate>
-                   </with>
-                 </enabledWhen>
-        </activity>
-        <!-- TODO: find a way to exclude evrything -->
-        <activityPatternBinding
-              activityId="org.argeo.slc.client.ui.slcActivity"
-              isEqualityPattern="true"
-              pattern="org.argeo.slc.client.ui/org.argeo.slc.client.ui.slcExecutionPerspective">
-        </activityPatternBinding>
-        <activityPatternBinding
-              activityId="org.argeo.security.ui.adminActivity"
-              isEqualityPattern="true"
-              pattern="org.argeo.slc.client.ui/org.argeo.slc.client.ui.slcExecutionPerspective">
-        </activityPatternBinding>
-     </extension>
-</plugin>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/pom.xml b/eclipse/plugins/org.argeo.slc.client.ui/pom.xml
deleted file mode 100644 (file)
index 98b8880..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc.eclipse</groupId>
-               <artifactId>plugins</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.client.ui</artifactId>
-       <name>SLC Client UI</name>
-       <packaging>jar</packaging>
-
-
-       <dependencies>
-               <!-- SLC Client UI -->
-               <!-- <dependency> -->
-               <!-- <groupId>org.argeo.slc.eclipse</groupId> -->
-               <!-- <artifactId>org.argeo.slc.client.oxm</artifactId> -->
-               <!-- <version>${version.slc}</version> -->
-               <!-- </dependency> -->
-               <!-- <dependency> -->
-               <!-- <groupId>org.argeo.slc.eclipse</groupId> -->
-               <!-- <artifactId>org.argeo.slc.client.core</artifactId> -->
-               <!-- <version>${version.slc}</version> -->
-               <!-- </dependency> -->
-
-               <!-- SLC -->
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.core</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.support.jcr</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.server</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-
-               <!-- Argeo Eclipse -->
-               <dependency>
-                       <groupId>org.argeo.commons.base</groupId>
-                       <artifactId>org.argeo.eclipse.ui</artifactId>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.base</groupId>
-                       <artifactId>org.argeo.eclipse.ui.jcr</artifactId>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
-
-               <!-- Eclipse and RCP only dependency, needed at compile time -->
-               <dependency>
-                       <groupId>org.argeo.commons.base</groupId>
-                       <artifactId>org.argeo.eclipse.ui.rcp</artifactId>
-                       <version>${version.argeo-commons}</version>
-                       <scope>provided</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.base</groupId>
-                       <artifactId>org.argeo.eclipse.dep.rcp</artifactId>
-                       <version>${version.argeo-commons}</version>
-                       <scope>provided</scope>
-               </dependency>
-       </dependencies>
-</project>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/ClientUiPlugin.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/ClientUiPlugin.java
deleted file mode 100644 (file)
index 9d794fb..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/** The activator class controls the plug-in life cycle */
-public class ClientUiPlugin extends AbstractUIPlugin {
-       public static final String ID = "org.argeo.slc.client.ui";
-       private static ClientUiPlugin plugin;
-
-       public void start(BundleContext context) throws Exception {
-               super.start(context);
-               plugin = this;
-       }
-
-       public void stop(BundleContext context) throws Exception {
-               plugin = null;
-               super.stop(context);
-       }
-
-       public static ClientUiPlugin getDefault() {
-               return plugin;
-       }
-
-       /** Creates the image */
-       public static Image img(String path) {
-               return getImageDescriptor(path).createImage();
-       }
-
-       public static ImageDescriptor getImageDescriptor(String path) {
-               return imageDescriptorFromPlugin(ID, path);
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/SlcExecutionPerspective.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/SlcExecutionPerspective.java
deleted file mode 100644 (file)
index a95970c..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui;
-
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class SlcExecutionPerspective implements IPerspectiveFactory {
-
-       public void createInitialLayout(IPageLayout layout) {
-               String editorArea = layout.getEditorArea();
-               layout.setEditorAreaVisible(true);
-               layout.setFixed(false);
-
-               // Create the main ui layout
-
-               // For a vertical split, the part on top gets the specified ratio of the
-               // current space and the part on bottom gets the rest. Likewise, for a
-               // horizontal split, the part at left gets the specified ratio of the
-               // current space.
-               // IFolderLayout main = layout.createFolder("main", IPageLayout.RIGHT,
-               // 0.3f, editorArea);
-               IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT,
-                               0.3f, editorArea);
-
-               IFolderLayout bottom = layout.createFolder("bottom",
-                               IPageLayout.BOTTOM, 0.65f, editorArea);
-               bottom.addView("org.argeo.security.ui.logView");
-               bottom.addView("org.argeo.slc.client.ui.jcrProcessListView");
-
-               // IFolderLayout topRight = layout.createFolder("topRight",
-               // IPageLayout.RIGHT, 0.6f, "main");
-
-               // add the views to the corresponding place holder
-               left.addView("org.argeo.slc.client.ui.jcrExecutionModulesView");
-               left.addView("org.argeo.slc.client.ui.jcrResultListView");
-
-               // main.addView("org.argeo.slc.client.ui.processBuilderView");
-               // main.addPlaceholder("org.argeo.slc.client.ui.resultDetailView:UUID-*");
-               // main.addPlaceholder("org.argeo.slc.client.ui.processDetailView:UUID-*");
-
-               // topRight.addView("org.argeo.slc.client.ui.processParametersView");
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/SlcImages.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/SlcImages.java
deleted file mode 100644 (file)
index 18f4b94..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui;
-
-import static org.argeo.slc.client.ui.ClientUiPlugin.img;
-
-import org.eclipse.swt.graphics.Image;
-
-/** Shared images. */
-public class SlcImages {
-       public final static Image AGENT = img("icons/agent.gif");
-       public final static Image AGENT_FACTORY = img("icons/agentFactory.gif");
-       public final static Image MODULE = img("icons/module.png");
-       public final static Image MODULE_STOPPED = img("icons/module_stopped.gif");
-       public final static Image FOLDER = img("icons/folder.gif");
-       public final static Image FLOW = img("icons/flow.png");
-       public final static Image PROCESSES = img("icons/processes.gif");
-       public final static Image PASSED = img("icons/passed.gif");
-       public final static Image ERROR = img("icons/error.gif");
-       public final static Image LAUNCH = img("icons/launch.gif");
-       public final static Image RELAUNCH = img("icons/relaunch.gif");
-       public final static Image KILL = img("icons/kill.png");
-       public final static Image REMOVE_ONE = img("icons/remove_one.gif");
-       public final static Image REMOVE_ALL = img("icons/removeAll.png");
-       public final static Image EXECUTION_SPECS = img("icons/executionSpecs.gif");
-       public final static Image EXECUTION_SPEC = img("icons/executionSpec.gif");
-       public final static Image EXECUTION_SPEC_ATTRIBUTE = img("icons/executionSpecAttribute.gif");
-       public final static Image CHOICES = img("icons/choices.gif");
-       public final static Image PROCESS_ERROR = img("icons/process_error.png");
-       public final static Image PROCESS_SCHEDULED = img("icons/process_scheduled.gif");
-       public final static Image PROCESS_RUNNING = img("icons/process_running.png");
-       public final static Image PROCESS_COMPLETED = img("icons/process_completed.png");
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/RunSlcFlow.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/RunSlcFlow.java
deleted file mode 100644 (file)
index 00f989d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.argeo.slc.client.ui.commands;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.argeo.slc.SlcException;
-import org.argeo.slc.execution.ExecutionFlowDescriptor;
-import org.argeo.slc.execution.ExecutionModulesManager;
-import org.argeo.slc.process.RealizedFlow;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.Command;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IParameter;
-
-public class RunSlcFlow extends AbstractHandler {
-       private ExecutionModulesManager modulesManager;
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               try {
-                       Command command = event.getCommand();
-                       String name = command.getName();
-                       String module = name.substring(0, name.indexOf(':'));
-                       String flowName = name.substring(name.indexOf(':') + 1);
-
-                       final RealizedFlow realizedFlow = new RealizedFlow();
-                       realizedFlow.setModuleName(module);
-                       // FIXME deal with version
-                       String version = "0.0.0";
-                       realizedFlow.setModuleVersion(version);
-                       ExecutionFlowDescriptor efd = new ExecutionFlowDescriptor();
-                       efd.setName(flowName);
-
-                       Map<String, Object> values = new HashMap<String, Object>();
-                       if (command.getParameters() != null) {
-                               for (IParameter param : command.getParameters()) {
-                                       String argName = param.getId();
-                                       // FIXME make it safer
-                                       Object value = param.getValues().getParameterValues()
-                                                       .values().iterator().next();
-                                       values.put(argName, value);
-                               }
-                               efd.setValues(values);
-                       }
-                       realizedFlow.setFlowDescriptor(efd);
-                       // new Thread("SLC Flow " + name + " from Eclipse command "
-                       // + command.getId()) {
-                       // public void run() {
-                       modulesManager.start(realizedFlow.getModuleNameVersion());
-                       modulesManager.execute(realizedFlow);
-                       // }
-                       // }.start();
-                       return null;
-               } catch (Exception e) {
-                       throw new SlcException("Could not execute command "
-                                       + event.getCommand() + " as SLC flow", e);
-               }
-       }
-
-       public void setModulesManager(
-                       ExecutionModulesManager executionModulesManager) {
-               this.modulesManager = executionModulesManager;
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/UpdateModule.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/UpdateModule.java
deleted file mode 100644 (file)
index 225bd41..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.client.ui.commands;\r
-\r
-import java.util.HashMap;\r
-import java.util.Iterator;\r
-import java.util.Map;\r
-\r
-import javax.jcr.Node;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.argeo.slc.BasicNameVersion;\r
-import org.argeo.slc.NameVersion;\r
-import org.argeo.slc.SlcException;\r
-import org.argeo.slc.deploy.ModulesManager;\r
-import org.argeo.slc.jcr.SlcNames;\r
-import org.argeo.slc.jcr.SlcTypes;\r
-import org.eclipse.core.commands.AbstractHandler;\r
-import org.eclipse.core.commands.ExecutionEvent;\r
-import org.eclipse.core.commands.ExecutionException;\r
-import org.eclipse.core.runtime.IProgressMonitor;\r
-import org.eclipse.core.runtime.IStatus;\r
-import org.eclipse.core.runtime.Status;\r
-import org.eclipse.core.runtime.jobs.Job;\r
-import org.eclipse.jface.viewers.ISelection;\r
-import org.eclipse.jface.viewers.IStructuredSelection;\r
-import org.eclipse.ui.handlers.HandlerUtil;\r
-\r
-/** Deletes one or many results */\r
-public class UpdateModule extends AbstractHandler {\r
-       private final static Log log = LogFactory.getLog(UpdateModule.class);\r
-\r
-       private ModulesManager modulesManager;\r
-\r
-       public Object execute(ExecutionEvent event) throws ExecutionException {\r
-               final ISelection selection = HandlerUtil\r
-                               .getActiveWorkbenchWindow(event).getActivePage().getSelection();\r
-               if (selection != null && selection instanceof IStructuredSelection) {\r
-                       UpdateJob job = new UpdateJob(selection);\r
-                       job.setUser(true);\r
-                       job.schedule();\r
-               }\r
-               return null;\r
-       }\r
-\r
-       private class UpdateJob extends Job {\r
-               private final IStructuredSelection selection;\r
-\r
-               public UpdateJob(ISelection selection) {\r
-                       super("Update modules");\r
-                       this.selection = ((IStructuredSelection) selection);\r
-               }\r
-\r
-               @Override\r
-               protected IStatus run(IProgressMonitor monitor) {\r
-                       Iterator<?> it = selection.iterator();\r
-                       Object obj = null;\r
-                       try {\r
-                               Map<String, Node> nodes = new HashMap<String, Node>();\r
-                               nodes: while (it.hasNext()) {\r
-                                       obj = it.next();\r
-                                       if (obj instanceof Node) {\r
-                                               Node node = (Node) obj;\r
-                                               Node executionModuleNode = null;\r
-                                               while (executionModuleNode == null) {\r
-                                                       if (node.isNodeType(SlcTypes.SLC_EXECUTION_MODULE)) {\r
-                                                               executionModuleNode = node;\r
-                                                       }\r
-                                                       node = node.getParent();\r
-                                                       if (node.getPath().equals("/"))// root\r
-                                                               continue nodes;\r
-                                               }\r
-\r
-                                               if (!nodes.containsKey(executionModuleNode.getPath()))\r
-                                                       nodes.put(executionModuleNode.getPath(),\r
-                                                                       executionModuleNode);\r
-                                       }\r
-                               }\r
-\r
-                               monitor.beginTask("Update modules", nodes.size());\r
-                               for (Node executionModuleNode : nodes.values()) {\r
-                                       monitor.subTask("Update " + executionModuleNode.getName());\r
-                                       NameVersion nameVersion = new BasicNameVersion(\r
-                                                       executionModuleNode.getProperty(SlcNames.SLC_NAME)\r
-                                                                       .getString(), executionModuleNode\r
-                                                                       .getProperty(SlcNames.SLC_VERSION)\r
-                                                                       .getString());\r
-                                       modulesManager.upgrade(nameVersion);\r
-                                       monitor.worked(1);\r
-                                       log.info("Module " + nameVersion + " updated");\r
-                                       if (monitor.isCanceled())\r
-                                               return Status.CANCEL_STATUS;\r
-                               }\r
-                               return Status.OK_STATUS;\r
-                       } catch (Exception e) {\r
-                               throw new SlcException("Cannot update module " + obj, e);\r
-                               // return Status.CANCEL_STATUS;\r
-                       }\r
-               }\r
-\r
-               @Override\r
-               protected void canceling() {\r
-                       getThread().interrupt();\r
-                       super.canceling();\r
-               }\r
-\r
-       }\r
-\r
-       public void setModulesManager(ModulesManager modulesManager) {\r
-               this.modulesManager = modulesManager;\r
-       }\r
-\r
-}\r
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/controllers/ProcessController.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/controllers/ProcessController.java
deleted file mode 100644 (file)
index cdeb01e..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.controllers;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.Property;
-import javax.jcr.RepositoryException;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.jcr.SlcJcrConstants;
-import org.argeo.slc.jcr.SlcJcrUtils;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.execution.JcrExecutionProcess;
-import org.argeo.slc.runtime.SlcAgent;
-import org.argeo.slc.runtime.SlcAgentFactory;
-
-/**
- * We use a separate class (not in UI components) so that it can be a singleton
- * in an application context.
- */
-public class ProcessController {
-       private final static Log log = LogFactory.getLog(ProcessController.class);
-       private Map<String, SlcAgentFactory> agentFactories = new HashMap<String, SlcAgentFactory>();
-
-       public ExecutionProcess process(Node processNode) {
-               JcrExecutionProcess process = new JcrExecutionProcess(processNode);
-               try {
-                       SlcAgent slcAgent = findAgent(processNode);
-                       if (slcAgent == null)
-                               throw new SlcException("Cannot find agent for " + processNode);
-                       slcAgent.process(process);
-                       return process;
-               } catch (Exception e) {
-                       if (!process.getStatus().equals(ExecutionProcess.ERROR))
-                               process.setStatus(ExecutionProcess.ERROR);
-                       throw new SlcException("Cannot execute " + processNode, e);
-               }
-       }
-
-       public void kill(Node processNode) {
-               JcrExecutionProcess process = new JcrExecutionProcess(processNode);
-               try {
-                       SlcAgent slcAgent = findAgent(processNode);
-                       if (slcAgent == null)
-                               throw new SlcException("Cannot find agent for " + processNode);
-                       slcAgent.kill(process);
-               } catch (Exception e) {
-                       if (!process.getStatus().equals(ExecutionProcess.ERROR))
-                               process.setStatus(ExecutionProcess.ERROR);
-                       throw new SlcException("Cannot execute " + processNode, e);
-               }
-       }
-
-       protected SlcAgent findAgent(Node processNode) throws RepositoryException {
-               // we currently only deal with single agents
-               Node realizedFlowNode = processNode.getNode(SlcNames.SLC_FLOW);
-               NodeIterator nit = realizedFlowNode.getNodes();
-               if (nit.hasNext()) {
-                       // TODO find a better way to determine which agent to use
-                       // currently we check the agent of the first registered flow
-                       Node firstRealizedFlow = nit.nextNode();
-                       // we assume there is an nt:address
-                       String firstFlowPath = firstRealizedFlow
-                                       .getNode(SlcNames.SLC_ADDRESS)
-                                       .getProperty(Property.JCR_PATH).getString();
-                       Node flowNode = processNode.getSession().getNode(firstFlowPath);
-                       String agentFactoryPath = SlcJcrUtils
-                                       .flowAgentFactoryPath(firstFlowPath);
-                       if (!agentFactories.containsKey(agentFactoryPath))
-                               throw new SlcException("No agent factory registered under "
-                                               + agentFactoryPath);
-                       SlcAgentFactory agentFactory = agentFactories.get(agentFactoryPath);
-                       Node agentNode = ((Node) flowNode
-                                       .getAncestor(SlcJcrUtils.AGENT_FACTORY_DEPTH + 1));
-                       String agentUuid = agentNode.getProperty(SlcNames.SLC_UUID)
-                                       .getString();
-
-                       // process
-                       return agentFactory.getAgent(agentUuid);
-               }
-               return null;
-       }
-
-       public synchronized void register(SlcAgentFactory agentFactory,
-                       Map<String, String> properties) {
-               String path = properties.get(SlcJcrConstants.PROPERTY_PATH);
-               if (log.isDebugEnabled())
-                       log.debug("Agent factory registered under " + path);
-               agentFactories.put(path, agentFactory);
-       }
-
-       public synchronized void unregister(SlcAgentFactory agentFactory,
-                       Map<String, String> properties) {
-               String path = properties.get(SlcJcrConstants.PROPERTY_PATH);
-               if (log.isDebugEnabled())
-                       log.debug("Agent factory unregistered from " + path);
-               agentFactories.remove(path);
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessBuilderPage.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessBuilderPage.java
deleted file mode 100644 (file)
index 958be82..0000000
+++ /dev/null
@@ -1,822 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.editors;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.Property;
-import javax.jcr.RepositoryException;
-import javax.jcr.nodetype.NodeType;
-import javax.jcr.observation.Event;
-import javax.jcr.observation.EventListener;
-import javax.jcr.observation.ObservationManager;
-import javax.jcr.query.Query;
-import javax.jcr.query.QueryManager;
-
-import org.argeo.ArgeoException;
-import org.argeo.eclipse.ui.jcr.AsyncUiEventListener;
-import org.argeo.jcr.JcrUtils;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.client.ui.SlcImages;
-import org.argeo.slc.core.execution.PrimitiveUtils;
-import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.jcr.SlcJcrUtils;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.ColumnViewer;
-import org.eclipse.jface.viewers.ComboBoxCellEditor;
-import org.eclipse.jface.viewers.EditingSupport;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerDropAdapter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowData;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.ui.forms.AbstractFormPart;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.editor.FormPage;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-
-/** Definition of the process. */
-public class ProcessBuilderPage extends FormPage implements SlcNames {
-       public final static String ID = "processBuilderPage";
-       // private final static Log log =
-       // LogFactory.getLog(ProcessBuilderPage.class);
-
-       /** To be displayed in empty lists */
-       final static String NONE = "<none>";
-
-       private Node processNode;
-
-       private TreeViewer flowsViewer;
-       private TableViewer valuesViewer;
-       private Label statusLabel;
-       private Button run;
-       private Button remove;
-       private Button clear;
-
-       private AbstractFormPart formPart;
-       private EventListener statusObserver;
-
-       public ProcessBuilderPage(ProcessEditor editor, Node processNode) {
-               super(editor, ID, "Definition");
-               this.processNode = processNode;
-       }
-
-       @Override
-       protected void createFormContent(IManagedForm mf) {
-               try {
-                       ScrolledForm form = mf.getForm();
-                       form.setExpandHorizontal(true);
-                       form.setExpandVertical(true);
-                       form.setText("Process " + processNode.getName());
-                       GridLayout mainLayout = new GridLayout(1, true);
-                       form.getBody().setLayout(mainLayout);
-
-                       createControls(form.getBody());
-                       createBuilder(form.getBody());
-
-                       // form
-                       formPart = new AbstractFormPart() {
-
-                       };
-                       getManagedForm().addPart(formPart);
-
-                       // observation
-                       statusObserver = new AsyncUiEventListener(form.getDisplay()) {
-                               protected void onEventInUiThread(List<Event> events) {
-                                       statusChanged();
-                               }
-                       };
-                       ObservationManager observationManager = processNode.getSession()
-                                       .getWorkspace().getObservationManager();
-                       observationManager.addEventListener(statusObserver,
-                                       Event.PROPERTY_CHANGED, processNode.getPath(), true, null,
-                                       null, false);
-
-                       // make sure all controls are in line with status
-                       statusChanged();
-
-                       // add initial flows
-                       addInitialFlows();
-
-               } catch (RepositoryException e) {
-                       throw new ArgeoException("Cannot create form content", e);
-               }
-       }
-
-       protected void createControls(Composite parent) {
-               FormToolkit tk = getManagedForm().getToolkit();
-
-               Composite controls = tk.createComposite(parent);
-               controls.setLayout(new RowLayout());
-               controls.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
-               run = tk.createButton(controls, null, SWT.PUSH);
-               run.setToolTipText("Run");
-               run.setImage(SlcImages.LAUNCH);
-               run.addSelectionListener(new SelectionListener() {
-                       public void widgetSelected(SelectionEvent e) {
-                               if (isFinished(getProcessStatus())) {
-                                       ((ProcessEditor) getEditor()).relaunch();
-                               } else if (isRunning(getProcessStatus())) {
-                                       ((ProcessEditor) getEditor()).kill();
-                               } else {
-                                       ((ProcessEditor) getEditor()).process();
-                               }
-                       }
-
-                       public void widgetDefaultSelected(SelectionEvent e) {
-                               widgetSelected(e);
-                       }
-               });
-
-               remove = tk.createButton(controls, null, SWT.PUSH);
-               remove.setImage(SlcImages.REMOVE_ONE);
-               remove.setToolTipText("Remove selected flows");
-               remove.addSelectionListener(new SelectionListener() {
-                       public void widgetSelected(SelectionEvent e) {
-                               removeSelectedFlows();
-                       }
-
-                       public void widgetDefaultSelected(SelectionEvent e) {
-                               widgetSelected(e);
-                       }
-               });
-
-               clear = tk.createButton(controls, null, SWT.PUSH);
-               clear.setImage(SlcImages.REMOVE_ALL);
-               clear.setToolTipText("Clear all flows");
-               clear.addSelectionListener(new SelectionListener() {
-                       public void widgetSelected(SelectionEvent e) {
-                               removeAllFlows();
-                       }
-
-                       public void widgetDefaultSelected(SelectionEvent e) {
-                               widgetSelected(e);
-                       }
-               });
-
-               Composite statusComposite = tk.createComposite(controls);
-               RowData rowData = new RowData();
-               rowData.width = 100;
-               rowData.height = 16;
-               statusComposite.setLayoutData(rowData);
-               statusComposite.setLayout(new FillLayout());
-               statusLabel = tk.createLabel(statusComposite, getProcessStatus());
-
-       }
-
-       protected void createBuilder(Composite parent) {
-               FormToolkit tk = getManagedForm().getToolkit();
-               SashForm sashForm = new SashForm(parent, SWT.HORIZONTAL);
-               sashForm.setSashWidth(4);
-               GridData sahFormGd = new GridData(SWT.FILL, SWT.FILL, true, true);
-               sahFormGd.widthHint = 400;
-               sashForm.setLayoutData(sahFormGd);
-
-               Composite flowsComposite = tk.createComposite(sashForm);
-               flowsComposite.setLayout(new GridLayout(1, false));
-
-               flowsViewer = new TreeViewer(flowsComposite);
-               flowsViewer.getTree().setLayoutData(
-                               new GridData(SWT.FILL, SWT.FILL, true, true));
-               flowsViewer.setLabelProvider(new FlowsLabelProvider());
-               flowsViewer.setContentProvider(new FlowsContentProvider());
-               flowsViewer.addSelectionChangedListener(new FlowsSelectionListener());
-
-               int operations = DND.DROP_COPY | DND.DROP_MOVE;
-               Transfer[] tt = new Transfer[] { TextTransfer.getInstance() };
-               flowsViewer.addDropSupport(operations, tt, new FlowsDropListener(
-                               flowsViewer));
-
-               flowsViewer.setInput(getEditorSite());
-               flowsViewer.setInput(processNode);
-
-               Composite valuesComposite = tk.createComposite(sashForm);
-               valuesComposite.setLayout(new GridLayout(1, false));
-
-               valuesViewer = new TableViewer(valuesComposite);
-               GridData valuedGd = new GridData(SWT.FILL, SWT.FILL, true, true);
-               // valuedGd.widthHint = 200;
-               valuesViewer.getTable().setLayoutData(valuedGd);
-               valuesViewer.setContentProvider(new ValuesContentProvider());
-               initializeValuesViewer(valuesViewer);
-               sashForm.setWeights(getWeights());
-               valuesViewer.setInput(getEditorSite());
-       }
-
-       /** Creates the columns of the values viewer */
-       protected void initializeValuesViewer(TableViewer viewer) {
-               String[] titles = { "Name", "Value" };
-               int[] bounds = { 200, 100 };
-
-               for (int i = 0; i < titles.length; i++) {
-                       TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
-                       column.getColumn().setText(titles[i]);
-                       column.getColumn().setWidth(bounds[i]);
-                       column.getColumn().setResizable(true);
-                       column.getColumn().setMoveable(true);
-                       if (i == 0) {
-                               column.setLabelProvider(new ColumnLabelProvider() {
-                                       public String getText(Object element) {
-                                               try {
-                                                       Node specAttrNode = (Node) element;
-                                                       return specAttrNode.getName();
-                                               } catch (RepositoryException e) {
-                                                       throw new SlcException("Cannot get value", e);
-                                               }
-                                       }
-                               });
-                       } else if (i == 1) {
-                               column.setLabelProvider(new ColumnLabelProvider() {
-                                       public String getText(Object element) {
-                                               return getAttributeSpecText((Node) element);
-                                       }
-                               });
-                               column.setEditingSupport(new ValuesEditingSupport(viewer));
-                       }
-
-               }
-               Table table = viewer.getTable();
-               table.setHeaderVisible(false);
-               table.setLinesVisible(true);
-       }
-
-       protected int[] getWeights() {
-               return new int[] { 50, 50 };
-       }
-
-       /*
-        * CONTROLLERS
-        */
-       /** Reflects a status change */
-       protected void statusChanged() {
-               String status = getProcessStatus();
-               statusLabel.setText(status);
-               Boolean isEditable = isEditable(status);
-               run.setEnabled(status.equals(ExecutionProcess.RUNNING) || isEditable);
-               remove.setEnabled(isEditable);
-               clear.setEnabled(isEditable);
-               // flowsViewer.getTree().setEnabled(isEditable);
-               if (status.equals(ExecutionProcess.RUNNING)) {
-                       run.setEnabled(true);
-                       run.setImage(SlcImages.KILL);
-                       run.setToolTipText("Kill");
-               } else if (isFinished(status)) {
-                       run.setEnabled(true);
-                       run.setImage(SlcImages.RELAUNCH);
-                       run.setToolTipText("Relaunch");
-               }
-
-               if (flowsViewer != null)
-                       flowsViewer.refresh();
-       }
-
-       /** Adds initial flows from the editor input if any */
-       protected void addInitialFlows() {
-               for (String path : ((ProcessEditorInput) getEditorInput())
-                               .getInitialFlowPaths()) {
-                       addFlow(path);
-               }
-       }
-
-       /**
-        * Adds a new flow.
-        * 
-        * @param path
-        *            the path of the flow
-        */
-       protected void addFlow(String path) {
-               try {
-                       Node flowNode = processNode.getSession().getNode(path);
-                       Node realizedFlowNode = processNode.getNode(SLC_FLOW).addNode(
-                                       SLC_FLOW);
-                       realizedFlowNode.addMixin(SlcTypes.SLC_REALIZED_FLOW);
-                       Node address = realizedFlowNode.addNode(SLC_ADDRESS,
-                                       NodeType.NT_ADDRESS);
-                       address.setProperty(Property.JCR_PATH, path);
-
-                       // copy spec attributes
-                       Node specAttrsBase;
-                       if (flowNode.hasProperty(SLC_SPEC)) {
-                               Node executionSpecNode = flowNode.getProperty(SLC_SPEC)
-                                               .getNode();
-                               specAttrsBase = executionSpecNode;
-                               String executionSpecName = executionSpecNode.getProperty(
-                                               SLC_NAME).getString();
-                               realizedFlowNode.setProperty(SLC_SPEC, executionSpecName);
-                       } else
-                               specAttrsBase = flowNode;
-
-                       specAttrs: for (NodeIterator nit = specAttrsBase.getNodes(); nit
-                                       .hasNext();) {
-                               Node specAttrNode = nit.nextNode();
-                               String attrName = specAttrNode.getName();
-                               if (!specAttrNode
-                                               .isNodeType(SlcTypes.SLC_EXECUTION_SPEC_ATTRIBUTE))
-                                       continue specAttrs;
-                               Node realizedAttrNode = realizedFlowNode.addNode(specAttrNode
-                                               .getName());
-                               JcrUtils.copy(specAttrNode, realizedAttrNode);
-
-                               // override with flow value
-                               if (flowNode.hasNode(attrName)) {
-                                       // assuming this is a primitive
-                                       realizedAttrNode.setProperty(SLC_VALUE,
-                                                       flowNode.getNode(attrName).getProperty(SLC_VALUE)
-                                                                       .getValue());
-                               }
-                       }
-
-                       flowsViewer.refresh();
-                       formPart.markDirty();
-               } catch (RepositoryException e) {
-                       throw new SlcException("Cannot drop " + path, e);
-               }
-       }
-
-       @SuppressWarnings("unchecked")
-       protected void removeSelectedFlows() {
-               if (!flowsViewer.getSelection().isEmpty()) {
-                       Iterator<Object> it = ((StructuredSelection) flowsViewer
-                                       .getSelection()).iterator();
-                       while (it.hasNext()) {
-                               Node node = (Node) it.next();
-                               try {
-                                       node.remove();
-                               } catch (RepositoryException e) {
-                                       throw new ArgeoException("Cannot remove " + node, e);
-                               }
-                       }
-                       flowsViewer.refresh();
-                       formPart.markDirty();
-               }
-       }
-
-       protected void removeAllFlows() {
-               try {
-                       for (NodeIterator nit = processNode.getNode(SLC_FLOW).getNodes(); nit
-                                       .hasNext();) {
-                               nit.nextNode().remove();
-                       }
-                       flowsViewer.refresh();
-                       formPart.markDirty();
-               } catch (RepositoryException e) {
-                       throw new ArgeoException("Cannot remove flows from " + processNode,
-                                       e);
-               }
-       }
-
-       public void commit(Boolean onSave) {
-               if (onSave)
-                       statusLabel.setText(getProcessStatus());
-               formPart.commit(onSave);
-       }
-
-       /*
-        * STATE
-        */
-       protected String getProcessStatus() {
-               try {
-                       return processNode.getProperty(SLC_STATUS).getString();
-               } catch (RepositoryException e) {
-                       throw new SlcException("Cannot retrieve status for " + processNode,
-                                       e);
-               }
-       }
-
-       /** Optimization so that we don't call the node each time */
-       protected static Boolean isEditable(String status) {
-               return status.equals(ExecutionProcess.NEW)
-                               || status.equals(ExecutionProcess.INITIALIZED);
-       }
-
-       protected static Boolean isFinished(String status) {
-               return status.equals(ExecutionProcess.COMPLETED)
-                               || status.equals(ExecutionProcess.ERROR)
-                               || status.equals(ExecutionProcess.KILLED);
-       }
-
-       protected static Boolean isRunning(String status) {
-               return status.equals(ExecutionProcess.RUNNING);
-       }
-
-       /*
-        * LIFECYCLE
-        */
-       @Override
-       public void dispose() {
-               JcrUtils.unregisterQuietly(processNode, statusObserver);
-               super.dispose();
-       }
-
-       /*
-        * UTILITIES
-        */
-       // protected static Object getAttributeSpecValue(Node specAttrNode) {
-       // try {
-       // if (specAttrNode.isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)) {
-       // if (!specAttrNode.hasProperty(SLC_VALUE))
-       // return null;
-       // String type = specAttrNode.getProperty(SLC_TYPE).getString();
-       // // TODO optimize based on data type?
-       // Object value = PrimitiveUtils.convert(type, specAttrNode
-       // .getProperty(SLC_VALUE).getString());
-       // // log.debug(specAttrNode + ", type=" + type + ", value=" +
-       // // value);
-       // return value;
-       // } else if (specAttrNode.isNodeType(SlcTypes.SLC_REF_SPEC_ATTRIBUTE)) {
-       // if (specAttrNode.hasNode(SLC_VALUE)) {
-       // // return the index of the sub node
-       // // in the future we may manage reference as well
-       // return specAttrNode.getProperty(SLC_VALUE).getLong();
-       // } else
-       // return null;
-       // }
-       // return null;
-       // } catch (RepositoryException e) {
-       // throw new SlcException("Cannot get value", e);
-       // }
-       //
-       // }
-
-       protected static String getAttributeSpecText(Node specAttrNode) {
-               try {
-                       if (specAttrNode.isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)) {
-                               if (!specAttrNode.hasProperty(SLC_VALUE))
-                                       return "";
-                               String type = specAttrNode.getProperty(SLC_TYPE).getString();
-                               Object value = PrimitiveUtils.convert(type, specAttrNode
-                                               .getProperty(SLC_VALUE).getString());
-                               return value.toString();
-                       } else if (specAttrNode.isNodeType(SlcTypes.SLC_REF_SPEC_ATTRIBUTE)) {
-                               if (specAttrNode.hasProperty(SLC_VALUE)) {
-                                       int value = (int) specAttrNode.getProperty(SLC_VALUE)
-                                                       .getLong();
-                                       NodeIterator children = specAttrNode.getNodes();
-                                       int index = 0;
-                                       while (children.hasNext()) {
-                                               Node child = children.nextNode();
-                                               if (index == value)
-                                                       return child.getProperty(Property.JCR_TITLE)
-                                                                       .getString();
-                                               index++;
-                                       }
-                                       throw new SlcException("No child node with index " + value
-                                                       + " for spec attribute " + specAttrNode);
-                               } else
-                                       return "";
-                       }
-                       throw new SlcException("Unsupported type for spec attribute "
-                                       + specAttrNode);
-               } catch (RepositoryException e) {
-                       throw new SlcException("Cannot get value", e);
-               }
-       }
-
-       /*
-        * FLOWS SUBCLASSES
-        */
-       static class FlowsContentProvider implements ITreeContentProvider {
-               public Object[] getElements(Object obj) {
-                       if (!(obj instanceof Node))
-                               return new Object[0];
-
-                       try {
-                               Node node = (Node) obj;
-                               List<Node> children = new ArrayList<Node>();
-                               for (NodeIterator nit = node.getNode(SLC_FLOW).getNodes(); nit
-                                               .hasNext();)
-                                       children.add(nit.nextNode());
-                               return children.toArray();
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot list children of " + obj, e);
-                       }
-               }
-
-               public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
-               }
-
-               public void dispose() {
-               }
-
-               public Object[] getChildren(Object parentElement) {
-                       // no children for the time being
-                       return null;
-               }
-
-               public Object getParent(Object element) {
-                       return null;
-               }
-
-               public boolean hasChildren(Object element) {
-                       return false;
-               }
-
-       }
-
-       static class FlowsLabelProvider extends ColumnLabelProvider {
-
-               @Override
-               public String getText(Object element) {
-                       Node node = (Node) element;
-                       try {
-                               if (node.isNodeType(SlcTypes.SLC_REALIZED_FLOW)) {
-                                       if (node.hasNode(SLC_ADDRESS)) {
-                                               String path = node.getNode(SLC_ADDRESS)
-                                                               .getProperty(Property.JCR_PATH).getString();
-                                               Node executionModuleNode = node.getSession().getNode(
-                                                               SlcJcrUtils.modulePath(path));
-                                               String executionModuleName = executionModuleNode
-                                                               .getProperty(SLC_NAME).getString();
-                                               return executionModuleName + ":"
-                                                               + SlcJcrUtils.flowRelativePath(path);
-                                       }
-                               }
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot display " + element, e);
-                       }
-                       return super.getText(element);
-               }
-
-               @Override
-               public Image getImage(Object element) {
-                       Node node = (Node) element;
-                       try {
-                               if (node.isNodeType(SlcTypes.SLC_REALIZED_FLOW)) {
-                                       if (node.hasProperty(SLC_STATUS)) {
-                                               String status = node.getProperty(SLC_STATUS)
-                                                               .getString();
-                                               // TODO: factorize with process view ?
-                                               if (status.equals(ExecutionProcess.RUNNING))
-                                                       return SlcImages.PROCESS_RUNNING;
-                                               else if (status.equals(ExecutionProcess.ERROR)
-                                                               || status.equals(ExecutionProcess.KILLED))
-                                                       return SlcImages.PROCESS_ERROR;
-                                               else if (status.equals(ExecutionProcess.COMPLETED))
-                                                       return SlcImages.PROCESS_COMPLETED;
-                                       }
-                                       return SlcImages.FLOW;
-                               }
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot display " + element, e);
-                       }
-                       return super.getImage(element);
-               }
-
-       }
-
-       /** Parameter view is updated each time a new line is selected */
-       class FlowsSelectionListener implements ISelectionChangedListener {
-               public void selectionChanged(SelectionChangedEvent evt) {
-                       if (evt.getSelection().isEmpty()) {
-                               valuesViewer.setInput(getEditorSite());
-                               return;
-                       }
-                       Node realizedFlowNode = (Node) ((IStructuredSelection) evt
-                                       .getSelection()).getFirstElement();
-                       valuesViewer.setInput(realizedFlowNode);
-               }
-       }
-
-       /** Manages drop event. */
-       class FlowsDropListener extends ViewerDropAdapter {
-
-               public FlowsDropListener(Viewer viewer) {
-                       super(viewer);
-               }
-
-               @Override
-               public boolean performDrop(Object data) {
-                       String path = data.toString();
-                       try {
-                               // either a node or a whole directory was dragged
-                               QueryManager qm = processNode.getSession().getWorkspace()
-                                               .getQueryManager();
-                               String statement = "SELECT * FROM ["
-                                               + SlcTypes.SLC_EXECUTION_FLOW
-                                               + "] WHERE ISDESCENDANTNODE(['" + path
-                                               + "']) OR ISSAMENODE(['" + path + "'])";
-                               // log.debug(statement);
-                               Query query = qm.createQuery(statement, Query.JCR_SQL2);
-
-                               // order paths
-                               SortedSet<String> paths = new TreeSet<String>();
-                               for (NodeIterator nit = query.execute().getNodes(); nit
-                                               .hasNext();) {
-                                       paths.add(nit.nextNode().getPath());
-                               }
-
-                               for (String p : paths) {
-                                       addFlow(p);
-                               }
-                               return true;
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot query flows under " + path, e);
-                       }
-               }
-
-               @Override
-               public boolean validateDrop(Object target, int operation,
-                               TransferData transferType) {
-                       return isEditable(getProcessStatus());
-               }
-       }
-
-       /*
-        * VALUES SUBCLASSES
-        */
-       static class ValuesContentProvider implements IStructuredContentProvider {
-
-               public Object[] getElements(Object inputElement) {
-                       if (!(inputElement instanceof Node))
-                               return new Object[0];
-
-                       try {
-                               Node realizedFlowNode = (Node) inputElement;
-                               List<Node> specAttributes = new ArrayList<Node>();
-                               specAttrs: for (NodeIterator nit = realizedFlowNode.getNodes(); nit
-                                               .hasNext();) {
-                                       Node specAttrNode = nit.nextNode();
-                                       if (!specAttrNode
-                                                       .isNodeType(SlcTypes.SLC_EXECUTION_SPEC_ATTRIBUTE))
-                                               continue specAttrs;
-                                       specAttributes.add(specAttrNode);
-                               }
-                               return specAttributes.toArray();
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot get elements", e);
-                       }
-               }
-
-               public void dispose() {
-               }
-
-               public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-               }
-       }
-
-       class ValuesEditingSupport extends EditingSupport {
-               private final TableViewer tableViewer;
-
-               public ValuesEditingSupport(ColumnViewer viewer) {
-                       super(viewer);
-                       tableViewer = (TableViewer) viewer;
-               }
-
-               @Override
-               protected CellEditor getCellEditor(Object element) {
-                       try {
-                               Node specAttrNode = (Node) element;
-                               if (specAttrNode
-                                               .isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)) {
-                                       return new TextCellEditor(tableViewer.getTable());
-                               } else if (specAttrNode
-                                               .isNodeType(SlcTypes.SLC_REF_SPEC_ATTRIBUTE)) {
-                                       NodeIterator children = specAttrNode.getNodes();
-                                       ArrayList<String> items = new ArrayList<String>();
-                                       while (children.hasNext()) {
-                                               Node child = children.nextNode();
-                                               if (child.isNodeType(NodeType.MIX_TITLE))
-                                                       items.add(child.getProperty(Property.JCR_TITLE)
-                                                                       .getString());
-                                       }
-                                       return new ComboBoxCellEditor(tableViewer.getTable(),
-                                                       items.toArray(new String[items.size()]));
-                               }
-                               return null;
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot get celle editor", e);
-                       }
-               }
-
-               @Override
-               protected boolean canEdit(Object element) {
-                       try {
-                               Node specAttrNode = (Node) element;
-                               return !(specAttrNode.getProperty(SLC_IS_IMMUTABLE)
-                                               .getBoolean() || specAttrNode.getProperty(
-                                               SLC_IS_CONSTANT).getBoolean())
-                                               && isSupportedAttributeType(specAttrNode);
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot check whether " + element
-                                               + " is editable", e);
-                       }
-               }
-
-               /**
-                * Supports {@link SlcTypes#SLC_PRIMITIVE_SPEC_ATTRIBUTE} and
-                * {@link SlcTypes#SLC_REF_SPEC_ATTRIBUTE}
-                */
-               protected boolean isSupportedAttributeType(Node specAttrNode)
-                               throws RepositoryException {
-                       return specAttrNode
-                                       .isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)
-                                       || specAttrNode.isNodeType(SlcTypes.SLC_REF_SPEC_ATTRIBUTE);
-               }
-
-               @Override
-               protected Object getValue(Object element) {
-                       Node specAttrNode = (Node) element;
-                       try {
-                               // Object value = getAttributeSpecValue(specAttrNode);
-                               // if (value == null)
-                               // throw new SlcException("Unsupported attribute " + element);
-                               if (specAttrNode
-                                               .isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)) {
-                                       if (!specAttrNode.hasProperty(SLC_VALUE))
-                                               return NONE;
-                                       String type = specAttrNode.getProperty(SLC_TYPE)
-                                                       .getString();
-                                       // TODO optimize based on data type?
-                                       Object value = PrimitiveUtils.convert(type, specAttrNode
-                                                       .getProperty(SLC_VALUE).getString());
-                                       return value.toString();
-                               } else if (specAttrNode
-                                               .isNodeType(SlcTypes.SLC_REF_SPEC_ATTRIBUTE)) {
-                                       if (!specAttrNode.hasProperty(SLC_VALUE))
-                                               return 0;
-                                       // return the index of the sub node as set by setValue()
-                                       // in the future we may manage references as well
-                                       return (int) specAttrNode.getProperty(SLC_VALUE).getLong();
-                               }
-                               throw new SlcException("Unsupported type for spec attribute "
-                                               + specAttrNode);
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot get value for " + element, e);
-                       }
-               }
-
-               @Override
-               protected void setValue(Object element, Object value) {
-                       try {
-                               Node specAttrNode = (Node) element;
-                               if (specAttrNode
-                                               .isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)) {
-                                       String type = specAttrNode.getProperty(SLC_TYPE)
-                                                       .getString();
-                                       SlcJcrUtils.setPrimitiveAsProperty(specAttrNode, SLC_VALUE,
-                                                       type, value);
-                                       valuesViewer.refresh();
-                                       formPart.markDirty();
-                               } else if (specAttrNode
-                                               .isNodeType(SlcTypes.SLC_REF_SPEC_ATTRIBUTE)) {
-                                       specAttrNode.setProperty(SLC_VALUE,
-                                                       ((Integer) value).longValue());
-                                       valuesViewer.refresh();
-                                       formPart.markDirty();
-                               }
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot get celle editor", e);
-                       }
-               }
-
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditor.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditor.java
deleted file mode 100644 (file)
index 027e7c6..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.editors;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-
-import org.argeo.eclipse.ui.ErrorFeedback;
-import org.argeo.jcr.JcrUtils;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.client.ui.ClientUiPlugin;
-import org.argeo.slc.client.ui.controllers.ProcessController;
-import org.argeo.slc.execution.ExecutionModulesManager;
-import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.execution.ExecutionProcessNotifier;
-import org.argeo.slc.execution.ExecutionStep;
-import org.argeo.slc.jcr.SlcJcrUtils;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.editor.FormEditor;
-
-/** Editor for an execution process. */
-public class ProcessEditor extends FormEditor implements
-               ExecutionProcessNotifier, SlcTypes, SlcNames {
-       public final static String ID = ClientUiPlugin.ID + ".processEditor";
-
-       private Session session;
-       private Node processNode;
-       private ProcessController processController;
-
-       private ProcessBuilderPage builderPage;
-       //private ProcessLogPage logPage;
-
-       private ExecutionModulesManager modulesManager;
-
-       //private Boolean switchToLog = false;
-
-       @Override
-       public void init(IEditorSite site, IEditorInput input)
-                       throws PartInitException {
-               super.init(site, input);
-               ProcessEditorInput pei = (ProcessEditorInput) input;
-               String processPath = pei.getProcessPath();
-               try {
-                       if (processPath != null) {
-                               if (!session.itemExists(processPath))
-                                       throw new SlcException("Process " + processPath
-                                                       + " does not exist");
-                               processNode = session.getNode(processPath);
-                       } else {// new
-                               processNode = newProcessNode(pei);
-                       }
-                       setPartName(processNode.getName());
-               } catch (RepositoryException e) {
-                       throw new SlcException("Cannot initialize editor for " + pei, e);
-               }
-
-       }
-
-       protected Node newProcessNode(ProcessEditorInput pei)
-                       throws RepositoryException {
-               String uuid = UUID.randomUUID().toString();
-               String processPath = SlcJcrUtils.createExecutionProcessPath(uuid);
-               Node processNode = JcrUtils.mkdirs(session, processPath, SLC_PROCESS);
-               processNode.setProperty(SLC_UUID, uuid);
-               processNode.setProperty(SLC_STATUS, ExecutionProcess.NEW);
-               Node processFlow = processNode.addNode(SLC_FLOW);
-               processFlow.addMixin(SLC_REALIZED_FLOW);
-               return processNode;
-       }
-
-       @Override
-       public boolean isDirty() {
-               if (getProcessStatus().equals(ExecutionProcess.NEW))
-                       return true;
-               return super.isDirty();
-       }
-
-       protected String getProcessStatus() {
-               try {
-                       return processNode.getProperty(SLC_STATUS).getString();
-               } catch (RepositoryException e) {
-                       throw new SlcException("Cannot retrieve status for " + processNode,
-                                       e);
-               }
-       }
-
-       @Override
-       public void dispose() {
-               JcrUtils.logoutQuietly(session);
-       }
-
-       /** Actually runs the process. */
-       void process() {
-               // the modifications have to be saved before execution
-               try {
-                       processNode.setProperty(SLC_STATUS, ExecutionProcess.SCHEDULED);
-               } catch (RepositoryException e) {
-                       throw new SlcException("Cannot update status of " + processNode, e);
-               }
-               doSave(null);
-               try {
-                       // show log
-//                     if (switchToLog)
-//                             setActivePage(logPage.getId());
-
-                       ExecutionProcess process = processController.process(processNode);
-                       Map<String, String> properties = new HashMap<String, String>();
-                       properties.put(ExecutionModulesManager.SLC_PROCESS_ID,
-                                       process.getUuid());
-                       modulesManager.registerProcessNotifier(this, properties);
-               } catch (Exception e) {
-                       ErrorFeedback.show("Execution of " + processNode + " failed", e);
-               }
-       }
-
-       void kill() {
-               processController.kill(processNode);
-       }
-
-       /** Opens a new editor with a copy of this process */
-       void relaunch() {
-               try {
-                       Node duplicatedNode = duplicateProcess();
-                       IWorkbenchPage activePage = PlatformUI.getWorkbench()
-                                       .getActiveWorkbenchWindow().getActivePage();
-                       activePage.openEditor(
-                                       new ProcessEditorInput(duplicatedNode.getPath()),
-                                       ProcessEditor.ID);
-                       close(false);
-               } catch (Exception e1) {
-                       throw new SlcException("Cannot relaunch " + processNode, e1);
-               }
-       }
-
-       /** Duplicates the process */
-       protected Node duplicateProcess() {
-               try {
-                       Session session = processNode.getSession();
-                       String uuid = UUID.randomUUID().toString();
-                       String destPath = SlcJcrUtils.createExecutionProcessPath(uuid);
-                       Node newNode = JcrUtils.mkdirs(session, destPath,
-                                       SlcTypes.SLC_PROCESS);
-
-                       Node rootRealizedFlowNode = newNode.addNode(SLC_FLOW);
-                       // copy node
-                       JcrUtils.copy(processNode.getNode(SLC_FLOW), rootRealizedFlowNode);
-
-                       newNode.setProperty(SLC_UUID, uuid);
-                       newNode.setProperty(SLC_STATUS, ExecutionProcess.INITIALIZED);
-
-                       // reset realized flow status
-                       // we just manage one level for the time being
-                       NodeIterator nit = rootRealizedFlowNode.getNodes(SLC_FLOW);
-                       while (nit.hasNext()) {
-                               nit.nextNode().setProperty(SLC_STATUS,
-                                               ExecutionProcess.INITIALIZED);
-                       }
-
-                       session.save();
-                       return newNode;
-               } catch (RepositoryException e) {
-                       throw new SlcException("Cannot duplicate process", e);
-               }
-       }
-
-       @Override
-       protected void addPages() {
-               try {
-                       builderPage = new ProcessBuilderPage(this, processNode);
-                       addPage(builderPage);
-                       firePropertyChange(PROP_DIRTY);
-//                     logPage = new ProcessLogPage(this, processNode);
-//                     addPage(logPage);
-               } catch (PartInitException e) {
-                       throw new SlcException("Cannot add pages", e);
-               }
-
-       }
-
-       @Override
-       public void doSave(IProgressMonitor monitor) {
-               try {
-                       String status = processNode.getProperty(SLC_STATUS).getString();
-                       if (status.equals(ExecutionProcess.NEW))
-                               processNode.setProperty(SLC_STATUS,
-                                               ExecutionProcess.INITIALIZED);
-                       session.save();
-                       builderPage.commit(true);
-                       editorDirtyStateChanged();
-               } catch (RepositoryException e) {
-                       throw new SlcException("Cannot save " + processNode, e);
-               } finally {
-                       JcrUtils.discardQuietly(session);
-               }
-       }
-
-       @Override
-       public void doSaveAs() {
-       }
-
-       @Override
-       public boolean isSaveAsAllowed() {
-               return false;
-       }
-
-       public void updateStatus(ExecutionProcess process, String oldStatus,
-                       String newStatus) {
-       }
-
-       public void addSteps(ExecutionProcess process, List<ExecutionStep> steps) {
-               // logPage.addSteps(steps);
-       }
-
-       /** Expects one session per editor. */
-       public void setSession(Session session) {
-               this.session = session;
-       }
-
-       public void setProcessController(ProcessController processController) {
-               this.processController = processController;
-       }
-
-       public void setModulesManager(ExecutionModulesManager modulesManager) {
-               this.modulesManager = modulesManager;
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditorInput.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditorInput.java
deleted file mode 100644 (file)
index 734c2db..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.editors;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPersistableElement;
-
-public class ProcessEditorInput implements IEditorInput, IPersistableElement {
-       private String processPath;
-       private List<String> initialFlowPaths = new ArrayList<String>();
-       private Boolean launchImmediately = false;
-
-       /** New empty process */
-       public ProcessEditorInput() {
-       }
-
-       /** New process with some flows */
-       public ProcessEditorInput(List<String> initialFlowPaths,
-                       Boolean launchImmediately) {
-               this.initialFlowPaths = initialFlowPaths;
-               this.launchImmediately = launchImmediately;
-       }
-
-       /** Existing process */
-       public ProcessEditorInput(String processPath) {
-               this.processPath = processPath;
-       }
-
-       @SuppressWarnings("rawtypes")
-       public Object getAdapter(Class arg0) {
-               return null;
-       }
-
-       public boolean exists() {
-               return processPath != null;
-       }
-
-       public ImageDescriptor getImageDescriptor() {
-               return null;
-       }
-
-       public String getName() {
-               return processPath != null ? processPath : "<new process>";
-       }
-
-       public IPersistableElement getPersistable() {
-               return this;
-       }
-
-       public String getToolTipText() {
-               return "";
-       }
-
-       public void saveState(IMemento memento) {
-               memento.putString("processPath", processPath);
-       }
-
-       public String getFactoryId() {
-               return ProcessEditorInputFactory.ID;
-       }
-
-       public String getProcessPath() {
-               return processPath;
-       }
-
-       public List<String> getInitialFlowPaths() {
-               return initialFlowPaths;
-       }
-
-       public Boolean getLaunchImmediately() {
-               return launchImmediately;
-       }
-
-       @Override
-       public boolean equals(Object obj) {
-               if (!(obj instanceof ProcessEditorInput))
-                       return false;
-               ProcessEditorInput pei = (ProcessEditorInput) obj;
-               if (processPath != null && pei.processPath != null)
-                       return processPath.equals(pei.processPath);
-               return false;
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditorInputFactory.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditorInputFactory.java
deleted file mode 100644 (file)
index 4997749..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.editors;
-
-import org.argeo.slc.client.ui.ClientUiPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.ui.IElementFactory;
-import org.eclipse.ui.IMemento;
-
-public class ProcessEditorInputFactory implements IElementFactory {
-       public final static String ID = ClientUiPlugin.ID
-                       + ".processEditorInputFactory";
-
-       public IAdaptable createElement(IMemento memento) {
-               String path = memento.getString("processPath");
-               return new ProcessEditorInput(path);
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessLogPage.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessLogPage.java
deleted file mode 100644 (file)
index 833f1f2..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.editors;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.List;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.RepositoryException;
-import javax.jcr.Workspace;
-import javax.jcr.observation.Event;
-import javax.jcr.observation.EventListener;
-import javax.jcr.query.Query;
-
-import org.argeo.eclipse.ui.jcr.AsyncUiEventListener;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.execution.ExecutionStep;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.editor.FormPage;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-public class ProcessLogPage extends FormPage {
-       public final static String ID = "processLogPage";
-
-       private DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
-
-       /** Where the log is displayed. */
-       private Text text;
-       /**
-        * Stores logs received before the text was shown. TODO : rather store in in
-        * JCR and reads it from there.
-        */
-       private StringBuffer beforeTextInit = new StringBuffer("");
-
-       private Node processNode;
-       /**
-        * optimization field: we compute once the length of the path to slc:log so
-        * that we can easily substring the relative path of logs.
-        */
-       //private Integer logPathLength;
-
-       public ProcessLogPage(FormEditor editor, Node processNode) {
-               super(editor, ID, "Log");
-               this.processNode = processNode;
-
-               EventListener listener = new LogListener(editor.getSite().getPage()
-                               .getWorkbenchWindow().getWorkbench().getDisplay());
-
-               try {
-                       String logBasePath = processNode.getPath() + '/' + SlcNames.SLC_LOG;
-                       //logPathLength = logBasePath.length();
-
-                       Workspace ws = processNode.getSession().getWorkspace();
-
-                       String statement = "SELECT * FROM ["
-                                       + SlcTypes.SLC_LOG_ENTRY
-                                       + "] as logEntry"
-                                       + " WHERE ISDESCENDANTNODE('"
-                                       + logBasePath
-                                       + "')"
-                                       + " ORDER BY logEntry.[slc:timestamp] ASC, NAME(logEntry) ASC";
-                       StringBuffer buf = new StringBuffer("");
-                       NodeIterator it = ws.getQueryManager()
-                                       .createQuery(statement, Query.JCR_SQL2).execute()
-                                       .getNodes();
-                       while (it.hasNext())
-                               appendLogEntry(buf, it.nextNode());
-                       beforeTextInit = new StringBuffer(buf.toString());
-                       // text.setText(buf.toString());
-                       ws.getObservationManager().addEventListener(listener,
-                                       Event.NODE_ADDED, logBasePath, true, null, null, false);
-               } catch (RepositoryException e) {
-                       throw new SlcException("Cannot register listener", e);
-               }
-       }
-
-       @Override
-       public synchronized void createPartControl(Composite parent) {
-               // bypass createFormContent
-               FormToolkit tk = getEditor().getToolkit();
-               // parent.setLayout(new FillLayout());
-               text = tk.createText(parent, "", SWT.MULTI | SWT.H_SCROLL
-                               | SWT.V_SCROLL);
-               text.setEditable(false);
-
-               // transfer the existing buffer the first time
-               if (beforeTextInit.length() > 0) {
-                       text.append(beforeTextInit.toString());
-                       // clear buffer
-                       beforeTextInit.setLength(0);
-               }
-
-       }
-
-       // @Override
-       // protected synchronized void createFormContent(IManagedForm mf) {
-       // ScrolledForm form = mf.getForm();
-       // form.setExpandHorizontal(true);
-       // form.setExpandVertical(true);
-       // // form.setText("Log");
-       // FillLayout mainLayout = new FillLayout();
-       // form.getBody().setLayout(mainLayout);
-       //
-       // FormToolkit tk = getManagedForm().getToolkit();
-       // text = tk.createText(form.getBody(), "", SWT.MULTI | SWT.H_SCROLL
-       // | SWT.V_SCROLL);
-       // text.setEditable(false);
-       // // transfer the existing buffer the first time
-       // if (beforeTextInit.length() > 0) {
-       // text.append(beforeTextInit.toString());
-       // // clear buffer
-       // beforeTextInit.setLength(0);
-       // }
-       // }
-
-       protected void appendLogEntry(StringBuffer buf, Node logEntry)
-                       throws RepositoryException {
-               // +1 in order to remove the first slash
-//             String relPath = logEntry.getPath().substring(logPathLength + 1);
-               //System.out.println("relPath=" + relPath);
-//             int firstSlashIndex = relPath.indexOf('/');
-//             int lastSlashIndex = relPath.lastIndexOf('/');
-//             String thread = relPath.substring(0, firstSlashIndex);
-//             String location = relPath.substring(firstSlashIndex, lastSlashIndex);
-
-               // String date = dateFormat.format(logEntry
-               // .getProperty(SlcNames.SLC_TIMESTAMP).getDate().getTime());
-               String date = logEntry.getProperty(SlcNames.SLC_TIMESTAMP).getString();
-               buf.append(date).append(' ');
-               String type = logEntry.getPrimaryNodeType().getName().substring(7);
-               buf.append(type).append('\t');
-               // buf.append(thread).append('\t');
-               // buf.append(location).append('\t');
-               buf.append(logEntry.getProperty(SlcNames.SLC_MESSAGE).getString());
-               buf.append('\n');
-
-       }
-
-       /** @deprecated */
-       public synchronized void addSteps(List<ExecutionStep> steps) {
-               final StringBuffer buf = new StringBuffer("");
-               for (ExecutionStep step : steps) {
-                       buf.append(dateFormat.format(step.getTimestamp()));
-                       buf.append(' ');
-                       if (step.getType().equals(ExecutionStep.PHASE_START)) {
-                               buf.append("## START ").append(step.getLog());
-                               buf.append('\n');
-                       } else if (step.getType().equals(ExecutionStep.PHASE_END)) {
-                               buf.append("## END   ").append(step.getLog());
-                               buf.append("\n");
-                       } else {
-                               buf.append(step.getLog());
-                       }
-               }
-
-               if (text != null) {
-                       Display.getDefault().asyncExec(new Runnable() {
-                               public void run() {
-                                       text.append(buf.toString());
-                               }
-                       });
-               } else
-                       beforeTextInit.append(buf);
-       }
-
-       @Override
-       public Control getPartControl() {
-               return text;
-       }
-
-       @Override
-       public void setFocus() {
-               if (text != null)
-                       text.setFocus();
-       }
-
-       /** JCR event listener notifying when new nodes are added */
-       private class LogListener extends AsyncUiEventListener {
-
-               public LogListener(Display display) {
-                       super(display);
-               }
-
-               @Override
-               protected void onEventInUiThread(List<Event> events)
-                               throws RepositoryException {
-                       // since we use batch save, order is not guaranteed
-                       // so we need to reorder, according to log line number for the time
-                       // being
-                       SortedMap<Long, Node> nodes = new TreeMap<Long, Node>();
-
-                       for (Event evt : events) {
-                               Node newNode = ProcessLogPage.this.processNode.getSession()
-                                               .getNode(evt.getPath());
-                               if (newNode.isNodeType(SlcTypes.SLC_LOG_ENTRY)) {
-                                       nodes.put(Long.parseLong(newNode.getName()), newNode);
-                               }
-                       }
-
-                       StringBuffer buf = new StringBuffer("");
-                       for (Node logEntry : nodes.values()) {
-                               appendLogEntry(buf, logEntry);
-                       }
-
-                       if (text != null)
-                               text.append(buf.toString());
-                       else
-                               beforeTextInit.append(buf);
-               }
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrExecutionModulesView.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrExecutionModulesView.java
deleted file mode 100644 (file)
index 1f87c98..0000000
+++ /dev/null
@@ -1,476 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.views;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.Property;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.nodetype.NodeType;
-import javax.jcr.observation.Event;
-import javax.jcr.query.Query;
-import javax.jcr.query.QueryManager;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.argeo.eclipse.ui.jcr.AsyncUiEventListener;
-import org.argeo.eclipse.ui.jcr.DefaultNodeLabelProvider;
-import org.argeo.eclipse.ui.jcr.NodeElementComparer;
-import org.argeo.eclipse.ui.jcr.SimpleNodeContentProvider;
-import org.argeo.eclipse.ui.specific.EclipseUiSpecificUtils;
-import org.argeo.slc.BasicNameVersion;
-import org.argeo.slc.NameVersion;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.client.ui.SlcImages;
-import org.argeo.slc.client.ui.editors.ProcessEditor;
-import org.argeo.slc.client.ui.editors.ProcessEditorInput;
-import org.argeo.slc.execution.ExecutionModulesManager;
-import org.argeo.slc.jcr.SlcJcrConstants;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DragSourceAdapter;
-import org.eclipse.swt.dnd.DragSourceEvent;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-/** JCR based view of the execution modules. */
-public class JcrExecutionModulesView extends ViewPart implements SlcTypes,
-               SlcNames {
-       private final static Log log = LogFactory
-                       .getLog(JcrExecutionModulesView.class);
-
-       public static final String ID = "org.argeo.slc.client.ui.jcrExecutionModulesView";
-
-       private TreeViewer viewer;
-
-       private Session session;
-
-       private ExecutionModulesManager modulesManager;
-
-       public void createPartControl(Composite parent) {
-               viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
-               EclipseUiSpecificUtils.enableToolTipSupport(viewer);
-
-               ViewContentProvider contentProvider = new ViewContentProvider(session);
-               viewer.setContentProvider(contentProvider);
-               viewer.setComparer(new NodeElementComparer());
-               final ViewLabelProvider viewLabelProvider = new ViewLabelProvider();
-               viewer.setLabelProvider(viewLabelProvider);
-               viewer.setInput(getViewSite());
-               viewer.addDoubleClickListener(new ViewDoubleClickListener());
-               getViewSite().setSelectionProvider(viewer);
-
-               Transfer[] tt = new Transfer[] { TextTransfer.getInstance() };
-               // Transfer[] tt = new Transfer[] { EditorInputTransfer.getInstance() };
-               int operations = DND.DROP_COPY | DND.DROP_MOVE;
-               viewer.addDragSupport(operations, tt, new ViewDragListener());
-
-               try {
-                       String[] nodeTypes = { SlcTypes.SLC_AGENT,
-                                       SlcTypes.SLC_AGENT_FACTORY, SlcTypes.SLC_EXECUTION_MODULE };
-                       session.getWorkspace()
-                                       .getObservationManager()
-                                       .addEventListener(
-                                                       new VmAgentObserver(viewer.getTree().getDisplay()),
-                                                       Event.NODE_ADDED | Event.NODE_REMOVED
-                                                                       | Event.NODE_MOVED,
-                                                       SlcJcrConstants.VM_AGENT_FACTORY_PATH, true, null,
-                                                       nodeTypes, false);
-               } catch (RepositoryException e) {
-                       throw new SlcException("Cannot add observer", e);
-               }
-       }
-
-       public void setFocus() {
-               viewer.getControl().setFocus();
-       }
-
-       public TreeViewer getViewer() {
-               return viewer;
-       }
-
-       public void refreshView() {
-               viewer.setInput(getViewSite());
-       }
-
-       class ViewContentProvider extends SimpleNodeContentProvider {
-
-               public ViewContentProvider(Session session) {
-                       super(session,
-                                       new String[] { SlcJcrConstants.VM_AGENT_FACTORY_PATH });
-               }
-
-               // @Override
-               // protected Object[] getChildren(Node node) throws RepositoryException
-               // {
-               // if (node.isNodeType(SlcTypes.SLC_AGENT_FACTORY)) {
-               // List<AgentNodesWrapper> wrappers = new
-               // ArrayList<AgentNodesWrapper>();
-               // for (NodeIterator nit = node.getNodes(); nit.hasNext();) {
-               // wrappers.add(new AgentNodesWrapper(nit.nextNode()));
-               // }
-               // return wrappers.toArray();
-               // }
-               // return super.getChildren(node);
-               // }
-
-               @Override
-               protected Object[] sort(Object parent, Object[] children) {
-                       Object[] sorted = new Object[children.length];
-                       System.arraycopy(children, 0, sorted, 0, children.length);
-                       Arrays.sort(sorted, new ViewComparator());
-                       return sorted;
-               }
-
-               @Override
-               protected List<Node> filterChildren(List<Node> children)
-                               throws RepositoryException {
-                       for (Iterator<Node> it = children.iterator(); it.hasNext();) {
-                               Node node = it.next();
-                               // execution spec definitions
-                               if (node.getName().equals(SLC_EXECUTION_SPECS))
-                                       it.remove();
-                               // flow values
-                               else if (node.getParent().isNodeType(
-                                               SlcTypes.SLC_EXECUTION_FLOW))
-                                       it.remove();
-                       }
-                       return super.filterChildren(children);
-               }
-
-               @Override
-               public boolean hasChildren(Object element) {
-                       if (element instanceof Node) {
-                               Node node = (Node) element;
-                               try {
-                                       if (node.isNodeType(SlcTypes.SLC_EXECUTION_FLOW))
-                                               return false;
-                               } catch (RepositoryException e) {
-                                       throw new SlcException("Cannot check has children", e);
-                               }
-                       }
-                       return super.hasChildren(element);
-               }
-       }
-
-       static class ViewComparator implements Comparator<Object> {
-
-               public int compare(Object o1, Object o2) {
-                       try {
-                               if (o1 instanceof Node && o2 instanceof Node) {
-                                       Node node1 = (Node) o1;
-                                       Node node2 = (Node) o2;
-
-                                       if (node1.getName().equals(SLC_EXECUTION_SPECS))
-                                               return -100;
-                                       if (node2.getName().equals(SLC_EXECUTION_SPECS))
-                                               return 100;
-
-                                       if (node1.isNodeType(SLC_EXECUTION_FLOW)
-                                                       && node2.isNodeType(SLC_EXECUTION_FLOW)) {
-                                               return node1.getName().compareTo(node2.getName());
-                                       } else if (node1.isNodeType(SLC_EXECUTION_FLOW)
-                                                       && !node2.isNodeType(SLC_EXECUTION_FLOW)) {
-                                               return 1;
-                                       } else if (!node1.isNodeType(SLC_EXECUTION_FLOW)
-                                                       && node2.isNodeType(SLC_EXECUTION_FLOW)) {
-                                               return -1;
-                                       } else {
-                                               // TODO: check title
-                                               return node1.getName().compareTo(node2.getName());
-                                       }
-                               }
-                       } catch (RepositoryException e) {
-                               throw new ArgeoException("Cannot compare " + o1 + " and " + o2,
-                                               e);
-                       }
-                       return 0;
-               }
-
-       }
-
-       // /** Wraps the execution modules of an agent. */
-       // static class AgentNodesWrapper extends NodesWrapper {
-       //
-       // public AgentNodesWrapper(Node node) {
-       // super(node);
-       // }
-       //
-       // protected List<WrappedNode> getWrappedNodes()
-       // throws RepositoryException {
-       // List<WrappedNode> children = new ArrayList<WrappedNode>();
-       // Node executionModules = getNode();
-       // for (NodeIterator nit = executionModules.getNodes(); nit.hasNext();) {
-       // for (NodeIterator nitVersions = nit.nextNode().getNodes(); nitVersions
-       // .hasNext();) {
-       // children.add(new WrappedNode(this, nitVersions.nextNode()));
-       // }
-       // }
-       // return children;
-       // }
-       //
-       // }
-
-       class VmAgentObserver extends AsyncUiEventListener {
-
-               public VmAgentObserver(Display display) {
-                       super(display);
-               }
-
-               protected void onEventInUiThread(List<Event> events) {
-                       for (Event event : events) {
-                               try {
-                                       String path = event.getPath();
-
-                                       if (session.itemExists(path)) {
-                                               Node parentNode = session.getNode(path);// .getParent();
-                                               if (log.isTraceEnabled())
-                                                       log.trace("Refresh " + parentNode + " after event "
-                                                                       + event);
-                                               viewer.refresh(parentNode);
-                                       }
-                               } catch (RepositoryException e) {
-                                       log.warn("Cannot process event " + event + ": " + e);
-                               }
-                       }
-
-                       // try {
-                       // Node vmAgentNode = session
-                       // .getNode(SlcJcrConstants.VM_AGENT_FACTORY_PATH);
-                       // viewer.refresh(vmAgentNode);
-                       // } catch (RepositoryException e) {
-                       // log.warn("Cannot process event : " + e);
-                       // }
-                       // TODO: optimize based on event
-                       viewer.refresh();
-               }
-       }
-
-       class ViewLabelProvider extends DefaultNodeLabelProvider implements
-                       ITableLabelProvider {
-
-               @Override
-               protected String getText(Node node) throws RepositoryException {
-                       if (node.isNodeType(NodeType.MIX_TITLE)
-                                       && node.hasProperty(Property.JCR_TITLE))
-                               return node.getProperty(Property.JCR_TITLE).getString();
-                       else if (node.getName().equals(SLC_EXECUTION_SPECS))
-                               return "Execution Specifications";
-                       else if (node.getPath().equals(
-                                       SlcJcrConstants.VM_AGENT_FACTORY_PATH))
-                               return "Internal Agents";
-                       return super.getText(node);
-               }
-
-               @Override
-               public Image getImage(Node node) throws RepositoryException {
-                       // we try to optimize a bit by putting deeper nodes first
-                       if (node.getParent().isNodeType(
-                                       SlcTypes.SLC_EXECUTION_SPEC_ATTRIBUTE))
-                               return SlcImages.CHOICES;
-                       else if (node.isNodeType(SlcTypes.SLC_EXECUTION_SPEC_ATTRIBUTE))
-                               return SlcImages.EXECUTION_SPEC_ATTRIBUTE;
-                       else if (node.isNodeType(SlcTypes.SLC_EXECUTION_SPEC))
-                               return SlcImages.EXECUTION_SPEC;
-                       else if (node.getName().equals(SLC_EXECUTION_SPECS))
-                               return SlcImages.EXECUTION_SPECS;
-                       else if (node.isNodeType(SlcTypes.SLC_EXECUTION_FLOW))
-                               return SlcImages.FLOW;
-                       else if (node.isNodeType(SlcTypes.SLC_MODULE)) {
-                               if (node.getProperty(SLC_STARTED).getBoolean())
-                                       return SlcImages.MODULE;
-                               else
-                                       return SlcImages.MODULE_STOPPED;
-                       } else if (node.isNodeType(SlcTypes.SLC_AGENT))
-                               return SlcImages.AGENT;
-                       else if (node.isNodeType(SlcTypes.SLC_AGENT_FACTORY))
-                               return SlcImages.AGENT_FACTORY;
-                       else
-                               return SlcImages.FOLDER;
-               }
-
-               public String getToolTipText(Node node) throws RepositoryException {
-                       if (node.isNodeType(NodeType.MIX_TITLE)
-                                       && node.hasProperty(Property.JCR_DESCRIPTION))
-                               return node.getProperty(Property.JCR_DESCRIPTION).getString();
-                       return super.getToolTipText(node);
-               }
-
-               public String getColumnText(Object obj, int index) {
-                       return getText(obj);
-               }
-
-               public Image getColumnImage(Object obj, int index) {
-                       return getImage(obj);
-               }
-
-       }
-
-       class ViewDoubleClickListener implements IDoubleClickListener {
-               public void doubleClick(DoubleClickEvent evt) {
-                       Object obj = ((IStructuredSelection) evt.getSelection())
-                                       .getFirstElement();
-                       try {
-                               if (obj instanceof Node) {
-                                       Node node = (Node) obj;
-                                       if (node.isNodeType(SLC_EXECUTION_MODULE)) {
-                                               String name = node.getProperty(SLC_NAME).getString();
-                                               String version = node.getProperty(SLC_VERSION)
-                                                               .getString();
-                                               final NameVersion nameVersion = new BasicNameVersion(
-                                                               name, version);
-                                               Boolean started = node.getProperty(SLC_STARTED)
-                                                               .getBoolean();
-
-                                               Job job;
-                                               if (started) {
-                                                       job = new Job("Stop " + nameVersion) {
-                                                               protected IStatus run(IProgressMonitor monitor) {
-                                                                       monitor.beginTask("Stop " + nameVersion, 1);
-                                                                       modulesManager.stop(nameVersion);
-                                                                       monitor.worked(1);
-                                                                       return Status.OK_STATUS;
-                                                               }
-
-                                                               protected void canceling() {
-                                                                       getThread().interrupt();
-                                                                       super.canceling();
-                                                               }
-                                                       };
-                                               } else {
-                                                       job = new Job("Start " + nameVersion) {
-                                                               protected IStatus run(IProgressMonitor monitor) {
-                                                                       monitor.beginTask("Start " + nameVersion, 1);
-                                                                       modulesManager.start(nameVersion);
-                                                                       monitor.worked(1);
-                                                                       return Status.OK_STATUS;
-                                                               }
-
-                                                               protected void canceling() {
-                                                                       getThread().interrupt();
-                                                                       super.canceling();
-                                                               }
-                                                       };
-                                               }
-                                               job.setUser(true);
-                                               job.schedule();
-                                       } else {
-                                               String path = node.getPath();
-                                               // TODO factorize with editor
-                                               QueryManager qm = node.getSession().getWorkspace()
-                                                               .getQueryManager();
-                                               String statement = "SELECT * FROM ["
-                                                               + SlcTypes.SLC_EXECUTION_FLOW
-                                                               + "] WHERE ISDESCENDANTNODE(['" + path
-                                                               + "']) OR ISSAMENODE(['" + path + "'])";
-                                               // log.debug(statement);
-                                               Query query = qm.createQuery(statement, Query.JCR_SQL2);
-
-                                               // order paths
-                                               SortedSet<String> paths = new TreeSet<String>();
-                                               for (NodeIterator nit = query.execute().getNodes(); nit
-                                                               .hasNext();) {
-                                                       paths.add(nit.nextNode().getPath());
-                                               }
-
-                                               // List<String> paths = new ArrayList<String>();
-                                               // paths.add(node.getPath());
-                                               IWorkbenchPage activePage = PlatformUI.getWorkbench()
-                                                               .getActiveWorkbenchWindow().getActivePage();
-                                               activePage.openEditor(new ProcessEditorInput(
-                                                               new ArrayList<String>(paths), true),
-                                                               ProcessEditor.ID);
-                                       }
-                               }
-                       } catch (Exception e) {
-                               throw new SlcException("Cannot open " + obj, e);
-                       }
-               }
-
-       }
-
-       class ViewDragListener extends DragSourceAdapter {
-               public void dragSetData(DragSourceEvent event) {
-                       IStructuredSelection selection = (IStructuredSelection) viewer
-                                       .getSelection();
-                       if (selection.getFirstElement() instanceof Node) {
-                               Node node = (Node) selection.getFirstElement();
-                               // try {
-                               // if (node.isNodeType(SLC_EXECUTION_FLOW)) {
-                               // if (EditorInputTransfer.getInstance().isSupportedType(
-                               // event.dataType)) {
-                               // ProcessEditorInput pei = new ProcessEditorInput(
-                               // node.getPath());
-                               // EditorInputData eid = EditorInputTransfer
-                               // .createEditorInputData(ProcessEditor.ID,
-                               // pei);
-                               // event.data = new EditorInputTransfer.EditorInputData[] { eid
-                               // };
-                               //
-                               // }
-                               // }
-                               // } catch (RepositoryException e1) {
-                               // throw new SlcException("Cannot drag " + node, e1);
-                               // }
-
-                               if (TextTransfer.getInstance().isSupportedType(event.dataType)) {
-                                       try {
-                                               event.data = node.getPath();
-                                       } catch (RepositoryException e1) {
-                                               // TODO Auto-generated catch block
-                                               e1.printStackTrace();
-                                       }
-                               }
-                       }
-               }
-       }
-
-       public void setSession(Session session) {
-               this.session = session;
-       }
-
-       public void setModulesManager(ExecutionModulesManager modulesManager) {
-               this.modulesManager = modulesManager;
-       }
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrProcessListView.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrProcessListView.java
deleted file mode 100644 (file)
index ac8b5e8..0000000
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.views;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.Property;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.observation.Event;
-import javax.jcr.observation.EventListener;
-import javax.jcr.observation.ObservationManager;
-import javax.jcr.query.Query;
-
-import org.argeo.eclipse.ui.jcr.AsyncUiEventListener;
-import org.argeo.jcr.JcrUtils;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.client.ui.SlcImages;
-import org.argeo.slc.client.ui.editors.ProcessEditor;
-import org.argeo.slc.client.ui.editors.ProcessEditorInput;
-import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.jcr.SlcJcrConstants;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-/** Displays processes. */
-public class JcrProcessListView extends ViewPart {
-       public static final String ID = "org.argeo.slc.client.ui.jcrProcessListView";
-
-       private TableViewer viewer;
-
-       private Session session;
-
-       private EventListener processesObserver;
-
-       private DateFormat dateFormat = new SimpleDateFormat(
-                       "EEE, dd MMM yyyy HH:mm:ss");
-       private Integer queryLimit = 2000;
-
-       public void createPartControl(Composite parent) {
-               Table table = createTable(parent);
-               viewer = new TableViewer(table);
-               viewer.setLabelProvider(new LabelProvider());
-               viewer.setContentProvider(new ContentProvider());
-               viewer.setInput(getViewSite());
-               viewer.addDoubleClickListener(new ViewDoubleClickListener());
-
-               processesObserver = new AsyncUiEventListener(viewer.getTable()
-                               .getDisplay()) {
-                       protected void onEventInUiThread(List<Event> events) {
-                               // TODO optimize by updating only the changed process
-                               viewer.refresh();
-                       }
-               };
-               try {
-                       ObservationManager observationManager = session.getWorkspace()
-                                       .getObservationManager();
-                       observationManager.addEventListener(processesObserver,
-                                       Event.NODE_ADDED | Event.NODE_REMOVED
-                                                       | Event.PROPERTY_CHANGED,
-                                       SlcJcrConstants.PROCESSES_BASE_PATH, true, null, null,
-                                       false);
-               } catch (RepositoryException e) {
-                       throw new SlcException("Cannot register listeners", e);
-               }
-
-       }
-
-       protected Table createTable(Composite parent) {
-               int style = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
-                               | SWT.FULL_SELECTION;
-               // does not function with RAP, commented for the time being
-               // | SWT.HIDE_SELECTION;
-
-               Table table = new Table(parent, style);
-
-               table.setLinesVisible(true);
-               table.setHeaderVisible(true);
-
-               TableColumn column = new TableColumn(table, SWT.LEFT, 0);
-               column.setText("Date");
-               column.setWidth(200);
-
-               column = new TableColumn(table, SWT.LEFT, 1);
-               column.setText("Host");
-               column.setWidth(100);
-
-               column = new TableColumn(table, SWT.LEFT, 2);
-               column.setText("Id");
-               column.setWidth(300);
-
-               column = new TableColumn(table, SWT.LEFT, 3);
-               column.setText("Status");
-               column.setWidth(100);
-
-               return table;
-       }
-
-       public void setFocus() {
-               viewer.getControl().setFocus();
-       }
-
-       @Override
-       public void dispose() {
-               JcrUtils.unregisterQuietly(session.getWorkspace(), processesObserver);
-               super.dispose();
-       }
-
-       class ContentProvider implements IStructuredContentProvider {
-
-               public Object[] getElements(Object inputElement) {
-                       try {
-                               // TODO filter, optimize with virtual table, ...
-                               String sql = "SELECT * from [slc:process] ORDER BY [jcr:lastModified] DESC";
-                               Query query = session.getWorkspace().getQueryManager()
-                                               .createQuery(sql, Query.JCR_SQL2);
-                               // TODO paging
-                               query.setLimit(queryLimit);
-                               List<Node> nodes = new ArrayList<Node>();
-                               for (NodeIterator nit = query.execute().getNodes(); nit
-                                               .hasNext();) {
-                                       nodes.add(nit.nextNode());
-                               }
-                               return nodes.toArray();
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot retrieve processes", e);
-                       }
-               }
-
-               public void dispose() {
-               }
-
-               public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-               }
-
-       }
-
-       class LabelProvider extends ColumnLabelProvider implements
-                       ITableLabelProvider {
-
-               public Image getColumnImage(Object obj, int columnIndex) {
-                       if (columnIndex != 0)
-                               return null;
-                       try {
-                               Node node = (Node) obj;
-                               String status = node.getProperty(SlcNames.SLC_STATUS)
-                                               .getString();
-                               if (status.equals(ExecutionProcess.NEW)
-                                               || status.equals(ExecutionProcess.INITIALIZED)
-                                               || status.equals(ExecutionProcess.SCHEDULED))
-                                       return SlcImages.PROCESS_SCHEDULED;
-                               else if (status.equals(ExecutionProcess.ERROR)
-                                               || status.equals(ExecutionProcess.UNKOWN))
-                                       return SlcImages.PROCESS_ERROR;
-                               else if (status.equals(ExecutionProcess.COMPLETED))
-                                       return SlcImages.PROCESS_COMPLETED;
-                               else if (status.equals(ExecutionProcess.RUNNING))
-                                       return SlcImages.PROCESS_RUNNING;
-                               else if (status.equals(ExecutionProcess.KILLED))
-                                       return SlcImages.PROCESS_ERROR;
-                               else
-                                       throw new SlcException("Unkown status " + status);
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot get column text", e);
-                       }
-               }
-
-               public String getColumnText(Object obj, int index) {
-                       try {
-                               Node node = (Node) obj;
-                               switch (index) {
-
-                               case 0:
-                                       return dateFormat.format(node
-                                                       .getProperty(Property.JCR_LAST_MODIFIED).getDate()
-                                                       .getTime());
-                               case 1:
-                                       return "local";
-                               case 2:
-                                       return node.getProperty(SlcNames.SLC_UUID).getString();
-                               case 3:
-                                       return node.getProperty(SlcNames.SLC_STATUS).getString();
-                               }
-                               return getText(obj);
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot get column text", e);
-                       }
-               }
-
-       }
-
-       class ViewDoubleClickListener implements IDoubleClickListener {
-               public void doubleClick(DoubleClickEvent evt) {
-                       Object obj = ((IStructuredSelection) evt.getSelection())
-                                       .getFirstElement();
-                       try {
-                               if (obj instanceof Node) {
-                                       Node node = (Node) obj;
-                                       if (node.isNodeType(SlcTypes.SLC_PROCESS)) {
-                                               IWorkbenchPage activePage = PlatformUI.getWorkbench()
-                                                               .getActiveWorkbenchWindow().getActivePage();
-                                               activePage.openEditor(
-                                                               new ProcessEditorInput(node.getPath()),
-                                                               ProcessEditor.ID);
-                                       }
-                               }
-                       } catch (Exception e) {
-                               throw new SlcException("Cannot open " + obj, e);
-                       }
-               }
-
-       }
-
-       public void setSession(Session session) {
-               this.session = session;
-       }
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrResultListView.java b/eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrResultListView.java
deleted file mode 100644 (file)
index 322256b..0000000
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.client.ui.views;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.observation.Event;
-import javax.jcr.observation.EventListener;
-import javax.jcr.observation.ObservationManager;
-import javax.jcr.query.Query;
-
-import org.argeo.eclipse.ui.jcr.AsyncUiEventListener;
-import org.argeo.eclipse.ui.jcr.NodeElementComparer;
-import org.argeo.jcr.JcrUtils;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.client.ui.editors.ProcessEditor;
-import org.argeo.slc.client.ui.editors.ProcessEditorInput;
-import org.argeo.slc.jcr.SlcJcrConstants;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IBaseLabelProvider;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-/** Displays results. */
-public class JcrResultListView extends ViewPart implements SlcNames {
-       public static final String ID = "org.argeo.slc.client.ui.jcrResultListView";
-
-       private TableViewer viewer;
-
-       private Session session;
-
-       private EventListener resultsObserver;
-
-       private DateFormat dateFormat = new SimpleDateFormat(
-                       "EEE, dd MMM yyyy HH:mm:ss");
-       private Integer queryLimit = 2000;
-
-       public void createPartControl(Composite parent) {
-
-               Table table = createTable(parent);
-               viewer = new TableViewer(table);
-               viewer.setLabelProvider(createLabelProvider());
-               viewer.setContentProvider(new ViewContentProvider());
-               viewer.setInput(getViewSite());
-               viewer.addDoubleClickListener(new ViewDoubleClickListener());
-               viewer.setComparer(new NodeElementComparer());
-
-               getViewSite().setSelectionProvider(viewer);
-
-               resultsObserver = new ResultObserver(viewer.getTable().getDisplay());
-               try {
-                       ObservationManager observationManager = session.getWorkspace()
-                                       .getObservationManager();
-                       String[] nodeTypes = { SlcTypes.SLC_RESULT };
-                       // FIXME Will not be notified if empty result is deleted
-                       observationManager.addEventListener(resultsObserver,
-                                       Event.PROPERTY_ADDED | Event.NODE_REMOVED,
-                                       SlcJcrConstants.RESULTS_BASE_PATH, true, null, nodeTypes,
-                                       false);
-               } catch (RepositoryException e) {
-                       throw new SlcException("Cannot register listeners", e);
-               }
-
-       }
-
-       protected Table createTable(Composite parent) {
-               int style = SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
-                               | SWT.FULL_SELECTION | SWT.MULTI;
-               // does not work with RAP, commented for the time being
-               // | SWT.HIDE_SELECTION;
-
-               Table table = new Table(parent, style);
-
-               table.setLinesVisible(true);
-               table.setHeaderVisible(true);
-
-               TableColumn column = new TableColumn(table, SWT.LEFT, 0);
-               column.setText("Date");
-               column.setWidth(200);
-
-               column = new TableColumn(table, SWT.LEFT, 1);
-               column.setText("Id");
-               column.setWidth(300);
-
-               return table;
-       }
-
-       // public void refresh() {
-       // viewer.refresh();
-       // }
-
-       /*
-        * METHODS TO BE OVERRIDDEN
-        */
-       protected IBaseLabelProvider createLabelProvider() {
-               return new ViewLabelProvider();
-       }
-
-       protected void processDoubleClick(DoubleClickEvent evt) {
-               Object obj = ((IStructuredSelection) evt.getSelection())
-                               .getFirstElement();
-               try {
-                       if (obj instanceof Node) {
-                               Node node = (Node) obj;
-                               // FIXME: open a default result editor
-                               if (node.isNodeType(SlcTypes.SLC_PROCESS)) {
-                                       IWorkbenchPage activePage = PlatformUI.getWorkbench()
-                                                       .getActiveWorkbenchWindow().getActivePage();
-                                       activePage.openEditor(
-                                                       new ProcessEditorInput(node.getPath()),
-                                                       ProcessEditor.ID);
-                               }
-                       }
-               } catch (Exception e) {
-                       throw new SlcException("Cannot open " + obj, e);
-               }
-       }
-
-       public void setFocus() {
-               viewer.getControl().setFocus();
-       }
-
-       @Override
-       public void dispose() {
-               JcrUtils.unregisterQuietly(session.getWorkspace(), resultsObserver);
-               super.dispose();
-       }
-
-       class ViewContentProvider implements IStructuredContentProvider {
-
-               public Object[] getElements(Object inputElement) {
-                       try {
-                               // TODO filter, optimize with virtual table, ...
-                               String sql = "SELECT * from [slc:result] ORDER BY [jcr:lastModified] DESC";
-                               Query query = session.getWorkspace().getQueryManager()
-                                               .createQuery(sql, Query.JCR_SQL2);
-                               // TODO paging
-                               query.setLimit(queryLimit);
-                               List<Node> nodes = new ArrayList<Node>();
-                               for (NodeIterator nit = query.execute().getNodes(); nit
-                                               .hasNext();) {
-                                       nodes.add(nit.nextNode());
-                               }
-                               return nodes.toArray();
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot retrieve processes", e);
-                       }
-               }
-
-               public void dispose() {
-               }
-
-               public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-               }
-
-       }
-
-       class ViewLabelProvider extends ColumnLabelProvider implements
-                       ITableLabelProvider {
-
-               public Image getColumnImage(Object obj, int columnIndex) {
-                       if (columnIndex != 0)
-                               return null;
-                       try {
-                               Node node = (Node) obj;
-                               if (node.hasProperty(SLC_COMPLETED)) {
-                                       // TODO
-                               }
-                               return null;
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot get column text", e);
-                       }
-               }
-
-               public String getColumnText(Object obj, int index) {
-                       try {
-                               Node node = (Node) obj;
-                               switch (index) {
-
-                               case 0:
-                                       if (node.hasProperty(SLC_COMPLETED)) {
-                                               return dateFormat
-                                                               .format(node.getProperty(SLC_COMPLETED)
-                                                                               .getDate().getTime());
-                                       } else {
-                                               return "OPEN";
-                                       }
-                               case 1:
-                                       return node.getProperty(SlcNames.SLC_UUID).getString();
-                               }
-                               return getText(obj);
-                       } catch (RepositoryException e) {
-                               throw new SlcException("Cannot get column text", e);
-                       }
-               }
-
-       }
-
-       class ViewDoubleClickListener implements IDoubleClickListener {
-               public void doubleClick(DoubleClickEvent evt) {
-                       processDoubleClick(evt);
-               }
-
-       }
-
-       class ResultObserver extends AsyncUiEventListener {
-
-               public ResultObserver(Display display) {
-                       super(display);
-               }
-
-               @Override
-               protected Boolean willProcessInUiThread(List<Event> events)
-                               throws RepositoryException {
-                       for (Event event : events) {
-                               // getLog().debug("Received event " + event);
-                               int eventType = event.getType();
-                               if (eventType == Event.NODE_REMOVED)
-                                       return true;
-                               String path = event.getPath();
-                               int index = path.lastIndexOf('/');
-                               String propertyName = path.substring(index + 1);
-                               if (propertyName.equals(SLC_COMPLETED)
-                                               || propertyName.equals(SLC_UUID)) {
-                                       return true;
-                               }
-                       }
-                       return false;
-               }
-
-               protected void onEventInUiThread(List<Event> events)
-                               throws RepositoryException {
-                       if (getLog().isTraceEnabled())
-                               getLog().trace("Refresh result list");
-                       viewer.refresh();
-               }
-
-       }
-
-       public void setSession(Session session) {
-               this.session = session;
-       }
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.argeo.slc.ide.branding/.classpath b/eclipse/plugins/org.argeo.slc.ide.branding/.classpath
deleted file mode 100644 (file)
index b0a38d8..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="src" path="src/main/java"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/eclipse/plugins/org.argeo.slc.ide.branding/.project b/eclipse/plugins/org.argeo.slc.ide.branding/.project
deleted file mode 100644 (file)
index c757652..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.ide.branding</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-       </natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.argeo.slc.ide.branding/META-INF/MANIFEST.MF b/eclipse/plugins/org.argeo.slc.ide.branding/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 5fcc6ab..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Argeo IDE
-Bundle-SymbolicName: org.argeo.slc.ide.branding;singleton:=true
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-Vendor: Argeo.org
-Require-Bundle: org.eclipse.ui;bundle-version="3.5.1",
- org.eclipse.osgi;bundle-version="3.5.1",
- org.eclipse.core.runtime;bundle-version="3.5.0",
- org.eclipse.jdt.ui;bundle-version="3.5.1",
- org.eclipse.ui.console;bundle-version="3.4.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/eclipse/plugins/org.argeo.slc.ide.branding/build.properties b/eclipse/plugins/org.argeo.slc.ide.branding/build.properties
deleted file mode 100644 (file)
index b06e874..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-bin.includes = META-INF/,\
-               plugin_customization.ini,\
-               plugin.xml,\
-               icons/,\
-               splash.bmp,\
-               .
-source.. = src/main/java/
diff --git a/eclipse/plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png b/eclipse/plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png
deleted file mode 100644 (file)
index a9af088..0000000
Binary files a/eclipse/plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.xpm b/eclipse/plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.xpm
deleted file mode 100644 (file)
index 3d3ad76..0000000
+++ /dev/null
@@ -1,479 +0,0 @@
-/* XPM */
-static char * argeo_icon_100104_256_xpm[] = {
-"256 256 220 2",
-"      c None",
-".     c #FE8F00",
-"+     c #FD8F01",
-"@     c #FD8E01",
-"#     c #FD8F00",
-"$     c #FC8E01",
-"%     c #FA8D02",
-"&     c #F78C03",
-"*     c #F68C04",
-"=     c #F58C04",
-"-     c #F48B05",
-";     c #EE8907",
-">     c #DC820F",
-",     c #C0781B",
-"'     c #F98D02",
-")     c #EA8809",
-"!     c #D47F12",
-"~     c #BC761D",
-"{     c #A16C28",
-"]     c #E6860A",
-"^     c #B37321",
-"/     c #ED8908",
-"(     c #CD7D15",
-"_     c #C67A18",
-":     c #C2781A",
-"<     c #BD771C",
-"[     c #B8751E",
-"}     c #AD7123",
-"|     c #A96F25",
-"1     c #A46D27",
-"2     c #C97B17",
-"3     c #EB8808",
-"4     c #7A5E39",
-"5     c #F88D02",
-"6     c #D68012",
-"7     c #AF7122",
-"8     c #896333",
-"9     c #625544",
-"0     c #4D4D4D",
-"a     c #5A5247",
-"b     c #7C5F38",
-"c     c #9E6B2A",
-"d     c #BF771B",
-"e     c #E1840D",
-"f     c #BE771C",
-"g     c #97692D",
-"h     c #715A3D",
-"i     c #504E4B",
-"j     c #55504A",
-"k     c #94672E",
-"l     c #A26D28",
-"m     c #FB8E01",
-"n     c #826136",
-"o     c #4F4E4C",
-"p     c #7D5F38",
-"q     c #CA7C17",
-"r     c #F88D03",
-"s     c #705A3E",
-"t     c #E2850C",
-"u     c #5D5346",
-"v     c #675742",
-"w     c #B27321",
-"x     c #D17E14",
-"y     c #F68C03",
-"z     c #BB761D",
-"A     c #765C3B",
-"B     c #575149",
-"C     c #A06C29",
-"D     c #95682E",
-"E     c #DF830E",
-"F     c #92672F",
-"G     c #555049",
-"H     c #6C5840",
-"I     c #ED8907",
-"J     c #4E4E4C",
-"K     c #524F4B",
-"L     c #9A6A2B",
-"M     c #A76F26",
-"N     c #806037",
-"O     c #605445",
-"P     c #5C5346",
-"Q     c #CB7C16",
-"R     c #D27E13",
-"S     c #99692C",
-"T     c #F28A05",
-"U     c #585148",
-"V     c #EF8907",
-"W     c #846135",
-"X     c #8C6532",
-"Y     c #A56E27",
-"Z     c #D98110",
-"`     c #93672F",
-" .    c #F48B04",
-"..    c #BA761E",
-"+.    c #9D6B2A",
-"@.    c #AB7024",
-"#.    c #FB8E02",
-"$.    c #A76E26",
-"%.    c #5C5247",
-"&.    c #755C3B",
-"*.    c #AE7123",
-"=.    c #9B6A2B",
-"-.    c #5E5345",
-";.    c #B47420",
-">.    c #DB820F",
-",.    c #514F4B",
-"'.    c #6A5840",
-").    c #DD830E",
-"!.    c #5F5445",
-"~.    c #EA8709",
-"{.    c #4E4D4D",
-"].    c #6D593F",
-"^.    c #795E3A",
-"/.    c #7E5F38",
-"(.    c #E7860A",
-"_.    c #534F4A",
-":.    c #896433",
-"<.    c #E5860B",
-"[.    c #E4850B",
-"}.    c #856235",
-"|.    c #575148",
-"1.    c #D37F13",
-"2.    c #816036",
-"3.    c #565049",
-"4.    c #A86F25",
-"5.    c #D88111",
-"6.    c #8D6531",
-"7.    c #AA7025",
-"8.    c #91662F",
-"9.    c #D68011",
-"0.    c #CF7D15",
-"a.    c #7B5E39",
-"b.    c #645643",
-"c.    c #B47320",
-"d.    c #635543",
-"e.    c #504E4C",
-"f.    c #E8870A",
-"g.    c #906630",
-"h.    c #836135",
-"i.    c #A36D28",
-"j.    c #775D3B",
-"k.    c #6C593F",
-"l.    c #635544",
-"m.    c #F18A06",
-"n.    c #A66E26",
-"o.    c #E98709",
-"p.    c #7C5E39",
-"q.    c #E0840D",
-"r.    c #8E6531",
-"s.    c #D58012",
-"t.    c #8A6432",
-"u.    c #6B5840",
-"v.    c #8F6630",
-"w.    c #B17222",
-"x.    c #615544",
-"y.    c #F08A06",
-"z.    c #A46E27",
-"A.    c #595248",
-"B.    c #E88709",
-"C.    c #54504A",
-"D.    c #B07222",
-"E.    c #CE7D15",
-"F.    c #C77B18",
-"G.    c #755C3C",
-"H.    c #695841",
-"I.    c #EF8A06",
-"J.    c #595148",
-"K.    c #8B6432",
-"L.    c #CC7C16",
-"M.    c #D27F13",
-"N.    c #7F6037",
-"O.    c #735B3C",
-"P.    c #685741",
-"Q.    c #C2791A",
-"R.    c #96682D",
-"S.    c #534F4B",
-"T.    c #D07E14",
-"U.    c #C47A19",
-"V.    c #725B3D",
-"W.    c #B9751E",
-"X.    c #AC7024",
-"Y.    c #94682E",
-"Z.    c #886333",
-"`.    c #C3791A",
-" +    c #B7751F",
-".+    c #665642",
-"++    c #5E5346",
-"@+    c #9F6C29",
-"#+    c #DA8210",
-"$+    c #876234",
-"%+    c #6F5A3E",
-"&+    c #B6741F",
-"*+    c #655642",
-"=+    c #F38B05",
-"-+    c #EC8808",
-";+    c #E3850C",
-">+    c #6E593F",
-",+    c #F28B05",
-"'+    c #9C6B2B",
-")+    c #E2840C",
-"!+    c #D78111",
-"~+    c #785D3A",
-"{+    c #DA8110",
-"]+    c #F78D03",
-"^+    c #FA8E02",
-"/+    c #B8751F",
-"(+    c #C67A19",
-"_+    c #C57A19",
-":+    c #B7741F",
-"<+    c #A86F26",
-"[+    c #CF7E14",
-"}+    c #9A6A2C",
-"|+    c #795D3A",
-"1+    c #C1781B",
-"2+    c #5B5247",
-"3+    c #695741",
-"4+    c #97682D",
-"5+    c #98692C",
-"6+    c #B57420",
-"7+    c #866234",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                          . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                                                                         ",
-"                                                                                                                                                                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                                                               ",
-"                                                                                                                                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                                                     ",
-"                                                                                                                                                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                                               ",
-"                                                                                                                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                                       ",
-"                                                                                                                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                                 ",
-"                                                                                                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                             ",
-"                                                                                                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                         ",
-"                                                                                                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                   ",
-"                                                                                                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                               ",
-"                                                                                                                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                           ",
-"                                                                                                                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                         ",
-"                                                                                                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                     ",
-"                                                                                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                 ",
-"                                                                                                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                               ",
-"                                                                                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                           ",
-"                                                                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                         ",
-"                                                                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                     ",
-"                                                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                   ",
-"                                                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                 ",
-"                                                                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                             ",
-"                                                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                           ",
-"                                                                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +                                                                                                                                         ",
-"                                                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @                                                                                                                                       ",
-"                                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #                                                                                                                                     ",
-"                                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $                                                                                                                                   ",
-"                                                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . %                                                                                                                                 ",
-"                                                                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . &                                                                                                                               ",
-"                                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . *                                                                                                                             ",
-"                                                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . =                                                                                                                           ",
-"                                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -                                                                                                                         ",
-"                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ;                                                                                                                       ",
-"                                                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . >                                                                                                                     ",
-"                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ,                                                                                                                   ",
-"                                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . '                                                                                                                   ",
-"                                                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )                                                                                                                 ",
-"                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . !                                                                                                               ",
-"                                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ~                                                                                                             ",
-"                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ {                                                                                                           ",
-"                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ]                                                                                                           ",
-"                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ^                                                                                                         ",
-"                                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . / ( _ : < [ ^ } | 1 | 2 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ 4                                                                                                       ",
-"                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 6 7 8 9 0 0 0 0 0 0 0 0 0 0 0 0 0 a b c d e $ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . >                                                                                                       ",
-"                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . / f g h i 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 j k e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l                                                                                                     ",
-"                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m _ n o 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 p q # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r s                                                                                                   ",
-"                                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . t c u 0 0 0 0 0 0 0 0 0 0 0 0 0                             0 0 0 0 0 0 0 v w * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x                                                                                                   ",
-"                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y z A 0 0 0 0 0 0 0 0 0 0 0 0                                               0 0 0 0 B C 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D                                                                                                 ",
-"                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E F G 0 0 0 0 0 0 0 0 0 0                                                             0 0 0 H E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 G                                                                                               ",
-"                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I F J 0 0 0 0 0 0 0 0 0                                                                       0 0 K w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . L                                                                                               ",
-"                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . & M G 0 0 0 0 0 0 0 0 0                                                                               0 0 N ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ; G                                                                                             ",
-"                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # < O 0 0 0 0 0 0 0 0                                                                                         0 P Q . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C                                                                                             ",
-"                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . R s 0 0 0 0 0 0 0 0                                                                                                 0 S m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T U                                                                                           ",
-"                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V W 0 0 0 0 0 0 0 0                                                                                                       0 X @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y                                                                                           ",
-"                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Z O 0 0 0 0 0 0 0                                                                                                             0 ` # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  .a                                                                                         ",
-"                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..K 0 0 0 0 0 0                                                                                                                     +.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @.0                                                                                       ",
-"                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #.D 0 0 0 0 0 0 0                                                                                                                         $.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y %.                                                                                      ",
-"                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . / &.0 0 0 0 0 0                                                                                                                               *.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . =.0                                                                                     ",
-"                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 -.0 0 0 0 0 0                                                                                                                                   ;.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . >.0                                                                                     ",
-"                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Q ,.0 0 0 0 0 0                                                                                                                                       ~ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . '.0                                                                                   ",
-"                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ).G 0 0 0 0 0                                                                                                                                             ).. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @.0                                                                                   ",
-"                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 !.0 0 0 0 0                                                                                                                                                 r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ~.{.                                                                                  ",
-"                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  .].0 0 0 0 0                                                                                                                                                   ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ^.0                                                                                 ",
-"                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m /.0 0 0 0 0                                                                                                                                                       (.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..0                                                                                 ",
-"                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F 0 0 0 0 0                                                                                                                                                            .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  ._.                                                                                ",
-"                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @.0 0 0 0 0                                                                                                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . :.0                                                                               ",
-"                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <.i 0 0 0 0                                                                                                                                                                 [.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . q 0                                                                               ",
-"                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . }.0 0 0 0 0                                                                                                                                                                   V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m |.0                                                                             ",
-"                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.0 0 0 0 0                                                                                                                                                                       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.0                                                                             ",
-"                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # s 0 0 0 0                                                                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . } 0                                                                             ",
-"                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . < 0 0 0 0                                                                                                                                                                   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Z 0 0                                                                           ",
-"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r O 0 0 0 0                                                                                                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ 3.0                                                                           ",
-"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.0 0 0 0                                                                                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N 0                                                                           ",
-"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.0 0 0 0                                                                                                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @.0                                                                           ",
-"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . _ 0 0 0 0                                                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.0 0                                                                         ",
-"                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.0 0 0 0                                                                                                                                                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m G 0                                                                         ",
-"                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . % |.0 0 0                                                                                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . /.0                                                                         ",
-"                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Q 0 0 0 0                                                                                                                                           . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.0                                                                         ",
-"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.0 0 0                                                                                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.0 0                                                                       ",
-"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m a 0 0 0                                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #.j 0                                                                       ",
-"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0.0 0 0 0                                                                                                                                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p 0                                                                       ",
-"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . g 0 0 0                                                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | 0                                                                       ",
-"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . a.0 0 0                                                                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ! 0 0                                                                     ",
-"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . b.0 0 0                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r c.d.0 0                                                                     ",
-"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m e.0 0                                                                                                                   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T M %.0 0 0 0                                                                     ",
-"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . f.0 0 0                                                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 =.G 0 0 0 0 0 0                                                                     ",
-"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x 0 0 0                                                                                                           . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . e g.i 0 0 0 0 0 0 0 0                                                                     ",
-"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..0 0 0                                                                                                       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.h.{.0 0 0 0 0 0 0 0                                                                         ",
-"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i.0 0 0                                                                                                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # q j.0 0 0 0 0 0 0 0 0                                                                             ",
-"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X 0 0 0                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m f k.0 0 0 0 0 0 0 0 0                                                                                 ",
-"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A 0 0                                                                                           . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . & w l.0 0 0 0 0 0 0 0 0                                                                                     ",
-"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . h 0 0                                                                                       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m.n.a 0 0 0 0 0 0 0 0 0                                                                                         ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . j.0 0                                                                                   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . o.L j 0 0 0 0 0 0 0 0                                                                                               ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p.0 0                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . q.r.e.0 0 0 0 0 0 0 0                                                                                                   ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N 0 0                                                                           . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . s.n {.0 0 0 0 0 0 0 0                                                                                                       ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . }.0 0                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # 2 A 0 0 0 0 0 0 0 0 0                                                                                                           ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . t.0 0                                                                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #.< u.0 0 0 0 0 0 0 0 0                                                                                                               ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v.0 0                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y w.x.0 0 0 0 0 0 0 0 0                                                                                                                   ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . k 0 0                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y.z.A.0 0 0 0 0 0 0 0 0                                                                                                                       ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0 0                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B.S C.0 0 0 0 0 0 0 0                                                                                                                             ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . c 0 0                                                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E 6.e.0 0 0 0 0 0 0 0                                                                                                                                 ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D.0 0                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ! N 0 0 0 0 0 0 0 0 0                                                                                                                                     ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E.0 0                                       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # F.G.0 0 0 0 0 0 0 0 0                                                                                                                                         ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 0 0                                   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #.z H.0 0 0 0 0 0 0 0 0                                                                                                                                             ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |.0                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . * D.O 0 0 0 0 0 0 0 0 0                                                                                                                                                 ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.0                           . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.i.J.0 0 0 0 0 0 0 0 0                                                                                                                                                     ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F 0 0                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (.g _.0 0 0 0 0 0 0 0                                                                                                                                                           ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 0 0                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ).K.o 0 0 0 0 0 0 0 0                                                                                                                                                               ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . L.0 0             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M.N.0 0 0 0 0 0 0 0 0                                                                                                                                                                   ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ~.0 0       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # _ O.0 0 0 0 0 0 0 0 0                                                                                                                                                                       ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.0   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . % ..P.0 0 0 0 0 0 0 0 0                                                                                                                                                                           ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . k Q.# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . = *.O 0 0 0 0 0 0 0 0 0                                                                                                                                                                               ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V l U 0 0 0 0 0 0 0 0 0                                                                                                                                                                                   ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ] R.S.0 0 0 0 0 0 0 0                                                                                                                                                                                         ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . > :.o 0 0 0 0 0 0 0 0                                                                                                                                                                                             ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T./.0 0 0 0 0 0 0 0 0                                                                                                                                                                                                 ",
-"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ U.V.0 0 0 0 0 0 0 0 0                                                                                                                                                                                                     ",
-"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ' W.v 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                         ",
-"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  .X.-.0 0 0 0 0 0 0 0 0                                                                                                                                                                                                             ",
-"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ; C |.0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                 ",
-"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <.Y.K 0 0 0 0 0 0 0 0                                                                                                                                                                                                                       ",
-"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . >.Z.J 0 0 0 0 0 0 0 0                                                                                                                                                                                                                           ",
-"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0.b 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                               ",
-"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ `.s 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                   ",
-"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . '  +.+0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                       ",
-"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - @.++0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                           ",
-"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . / @+B 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                               ",
-"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [.` K 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                                     ",
-"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #+$+J 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                                         ",
-"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( a.0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                                             ",
-"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ : %+0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                                                 ",
-"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 &+*+0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                                                     ",
-"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . =+| u 0 0 0 0 0 0 0 0 0                                                                                                                                                       . .                                                                                                               ",
-"                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -+c 3.0 0 0 0 0 0 0 0 0                                                                                                                                                           . . . .                                                                                                           ",
-"                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ;+F ,.0 0 0 0 0 0 0 0                                                                                                                                                               . . . . . .                                                                                                         ",
-"                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Z }.J 0 0 0 0 0 0 0 0                                                                                                                                                                   . . . . . . .                                                                                                       ",
-"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . L.^.0 0 0 0 0 0 0 0 0                                                                                                                                                                     . . . . . . . . . .                                                                                                   ",
-"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ , >+0 0 0 0 0 0 0 0 0                                                                                                                                                                         . . . . . . . . . . .                                                                                                 ",
-"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r ;.b.0 0 0 0 0 0 0 0 0                                                                                                                                                                           . . . . . . . . . . . . .                                                                                               ",
-"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ,+4.%.0 0 0 0 0 0 0 0 0                                                                                                                                                                               . . . . . . . . . . . . . .                                                                                             ",
-"                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 '+G 0 0 0 0 0 0 0 0 0                                                                                                                                                                                 . . . . . . . . . . . . . . . . .                                                                                         ",
-"                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )+g.i 0 0 0 0 0 0 0 0                                                                                                                                                                                     . . . . . . . . . . . . . . . . . . .                                                                                       ",
-"                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . !+W {.0 0 0 0 0 0 0 0                                                                                                                                                                                         . . . . . . . . . . . . . . . . . . . .                                                                                     ",
-"                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Q ~+0 0 0 0 0 0 0 0 0                                                                                                                                                                                           . . . . . . . . . . . . . . . . . . . . . .                                                                                   ",
-"                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m d ].0 0 0 0 0 0 0 0 0                                                                                                                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . .                                                                               ",
-"                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . z d.0 0 0 0 0 0 0 0 0                                                                                                                                                                                                 . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                             ",
-"                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . W.0 0 0 0 0 0 0 0                                                                                                                                                                                                   . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                           ",
-"                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # ^.0 0 0 0 0                                                                                                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                       ",
-"                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [.S.0                                                                                                                                                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                     ",
-"                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @.                                                                                                                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                   ",
-"                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m j.                                                                                                                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                 ",
-"                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #+                                                                                                                                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                             ",
-"                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C                                                                                                                                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                           ",
-"                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . & >+                                                                                                                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                         ",
-"                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E.                                                                                                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                       ",
-"                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D                                                                                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                   ",
-"                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . & h.                                                                                                                                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                 ",
-"                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I                                                                                                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m                                                 ",
-"                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . e                                                                                                                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X.0                                               ",
-"                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . {+                                                                                                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.B 0 0                                             ",
-"                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . >.                                                                                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . R.0 0 0 0                                           ",
-"                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . f.                                                                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . e o 0 0 0 0                                           ",
-"                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T                                                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N 0 0 0 0                                             ",
-"                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y                                                                                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 0 0 0 0                                               ",
-"                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . '                                                                                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y v 0 0 0 0                                               ",
-"                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $                                                                                                                                   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . g.0 0 0 0                                                 ",
-"                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . , 0 0 0 0 0                                                 ",
-"                                                                                @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (.B 0 0 0 0                                                   ",
-"                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m O.0 0 0 0                                                     ",
-"                                                                                  ' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . { 0 0 0 0 0                                                     ",
-"                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T.J 0 0 0 0                                                       ",
-"                                                                                    ]+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . f.++0 0 0 0                                                         ",
-"                                                                                      % . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y.v 0 0 0 0 0                                                         ",
-"                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                           . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . & V.0 0 0 0 0                                                           ",
-"                                                                                        & . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m N 0 0 0 0 0                                                             ",
-"                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . g.0 0 0 0 0                                                               ",
-"                                                                                          r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . { 0 0 0 0 0                                                                 ",
-"                                                                                            T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ^ 0 0 0 0 0                                                                   ",
-"                                                                                              ' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ^ {.0 0 0 0                                                                     ",
-"                                                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . n.0 0 0 0 0 0                                                                     ",
-"                                                                                                ).. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # S 0 0 0 0 0 0                                                                       ",
-"                                                                                                  -+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m X 0 0 0 0 0 0                                                                         ",
-"                                                                                                    ^+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r 2.0 0 0 0 0 0                                                                           ",
-"                                                                                                    !+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - j.0 0 0 0 0 0                                                                             ",
-"                                                                                                      e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . o.>+0 0 0 0 0 0                                                                               ",
-"                                                                                                        ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( a 0 0 0 0 0                                                                                   ",
-"                                                                                                          V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ n.J 0 0 0 0 0                                                                                     ",
-"                                                                                                            = . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m.N.0 0 0 0 0 0                                                                                       ",
-"                                                                                                            g % . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Z l.0 0 0 0 0 0                                                                                         ",
-"                                                                                                              c # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . &+K 0 0 0 0 0 0                                                                                           ",
-"                                                                                                                @.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . * r.0 0 0 0 0 0 0                                                                                             ",
-"                                                                                                                  /+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x b.0 0 0 0 0 0                                                                                                 ",
-"                                                                                                                    (+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . * R.{.0 0 0 0 0 0                                                                                                   ",
-"                                                                                                                      _+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T.d.0 0 0 0 0 0 0                                                                                                     ",
-"                                                                                                                        :+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . * R.{.0 0 0 0 0 0                                                                                                         ",
-"                                                                                                                          <+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [+d.0 0 0 0 0 0 0                                                                                                           ",
-"                                                                                                                            }+# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  .D {.0 0 0 0 0 0                                                                                                               ",
-"                                                                                                                              6.m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ [ P 0 0 0 0 0 0 0                                                                                                                 ",
-"                                                                                                                                n & . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M.>+0 0 0 0 0 0 0                                                                                                                     ",
-"                                                                                                                                  |+=+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (.$+0 0 0 0 0 0 0 0                                                                                                                       ",
-"                                                                                                                                    P.#+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . = C K 0 0 0 0 0 0 0                                                                                                                           ",
-"                                                                                                                                      ,.7 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ z ++0 0 0 0 0 0 0                                                                                                                               ",
-"                                                                                                                                        0 N y.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0.s 0 0 0 0 0 0 0 0                                                                                                                                 ",
-"                                                                                                                                          0 !.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [+j.0 0 0 0 0 0 0 0                                                                                                                                     ",
-"                                                                                                                                              J 1 $ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [+j.0 0 0 0 0 0 0 0                                                                                                                                         ",
-"                                                                                                                                                0 j.o.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [+j.0 0 0 0 0 0 0 0                                                                                                                                             ",
-"                                                                                                                                                  0 C.$.r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [+j.0 0 0 0 0 0 0 0 0                                                                                                                                               ",
-"                                                                                                                                                      0 9 1+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [+j.0 0 0 0 0 0 0 0 0                                                                                                                                                   ",
-"                                                                                                                                                        0 0 A #+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ' ~ h 0 0 0 0 0 0 0 0 0                                                                                                                                                       ",
-"                                                                                                                                                            0 {.v./ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . o.C 2+0 0 0 0 0 0 0 0 0                                                                                                                                                           ",
-"                                                                                                                                                              0 0 G | = . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0.W o 0 0 0 0 0 0 0 0 0                                                                                                                                                               ",
-"                                                                                                                                                                  0 0 B L <.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . = ^ 3+0 0 0 0 0 0 0 0 0 0                                                                                                                                                                   ",
-"                                                                                                                                                                      0 0 J n 0.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # 9.4+3.0 0 0 0 0 0 0 0 0                                                                                                                                                                         ",
-"                                                                                                                                                                        0 0 0 0 '.:+& . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ ! S O 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                             ",
-"                                                                                                                                                                            0 0 0 0 J.c > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ T.4+++0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                   ",
-"                                                                                                                                                                                  0 0 0 0 9 5+0.#.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m ( ` %.0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                       ",
-"                                                                                                                                                                                      0 0 0 0 0 |.K.:  .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y T.$.p G 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                             ",
-"                                                                                                                                                                                          0 0 0 0 0 0 ,./.} E.y.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ; U.=.h e.0 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                   ",
-"                                                                                                                                                                                                0 0 0 0 0 0 0 0 O n 1 _ f.. . . . . . . . . . . . . . . . . . . . . . . . . . . m.Z 1+| r..+0 0 0 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                         ",
-"                                                                                                                                                                                                      0 0 0 0 0 0 0 0 0 0 U ~+t.5+n.c.1+0.).3 5 . # '  .V ~.<.q.>.6 L.6+c 7+>+B 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                               ",
-"                                                                                                                                                                                                              0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 i 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                       ",
-"                                                                                                                                                                                                                      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                               ",
-"                                                                                                                                                                                                                                0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                             ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                "};
diff --git a/eclipse/plugins/org.argeo.slc.ide.branding/org.argeo.slc.ide.product b/eclipse/plugins/org.argeo.slc.ide.branding/org.argeo.slc.ide.product
deleted file mode 100644 (file)
index eef57c6..0000000
+++ /dev/null
@@ -1,833 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="Argeo SLC IDE" uid="org.argeo.slc.ide" id="org.argeo.slc.ide.branding.product" application="org.eclipse.ui.ide.workbench" version="0.12.1.D20100107_1317" useFeatures="false" includeLaunchers="true">
-
-   <aboutInfo>
-      <image path="eclipse_lg.gif"/>
-      <text>
-         %productBlurb
-      </text>
-   </aboutInfo>
-
-   <configIni use="default">
-   </configIni>
-
-   <launcherArgs>
-      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
-   </launcherArgs>
-
-   <windowImages i16="/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png" i32="/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png" i48="/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png" i64="/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png" i128="/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png"/>
-
-   <splash
-      location="org.argeo.slc.ide.branding"
-      startupProgressRect="0,280,455,15"
-      startupMessageRect="7,220,441,20"
-      startupForegroundColor="0066D0" />
-   <launcher name="ArgeoSLC">
-      <linux icon="/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.xpm"/>
-      <solaris/>
-      <win useIco="false">
-         <bmp/>
-      </win>
-   </launcher>
-
-   <vm>
-      <linux>org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</linux>
-   </vm>
-
-   <license>
-        <url>http://www.eclipse.org/legal/epl-v10.html</url>
-        <text>
-   Eclipse Public License - v 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT&apos;S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-&quot;Contribution&quot; means:
-
-a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
-
-b) in the case of each subsequent Contributor:
-
-i) changes to the Program, and
-
-ii) additions to the Program;
-
-where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution &apos;originates&apos; from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor&apos;s behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
-
-&quot;Contributor&quot; means any person or entity that distributes the Program.
-
-&quot;Licensed Patents&quot; mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
-
-&quot;Program&quot; means the Contributions distributed in accordance with this Agreement.
-
-&quot;Recipient&quot; means anyone who receives the Program under this Agreement, including all Contributors.
-
-2. GRANT OF RIGHTS
-
-a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
-
-b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
-
-c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient&apos;s responsibility to acquire that license before distributing the Program.
-
-d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
-
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
-
-a) it complies with the terms and conditions of this Agreement; and
-
-b) its license agreement:
-
-i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
-
-ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
-
-iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
-
-iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
-
-When the Program is made available in source code form:
-
-a) it must be made available under this Agreement; and
-
-b) a copy of this Agreement must be included with each copy of the Program.
-
-Contributors may not remove or alter any copyright notices contained within the Program.
-
-Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (&quot;Commercial Contributor&quot;) hereby agrees to defend and indemnify every other Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor&apos;s responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient&apos;s patent(s), then such Recipient&apos;s rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient&apos;s rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient&apos;s rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient&apos;s obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
-         </text>
-   </license>
-
-   <plugins>
-      <plugin id="com.collabnet.subversion.merge"/>
-      <plugin id="com.ibm.icu"/>
-      <plugin id="com.jcraft.jsch"/>
-      <plugin id="com.sun.jna"/>
-      <plugin id="java_cup.runtime"/>
-      <plugin id="javax.activation"/>
-      <plugin id="javax.mail"/>
-      <plugin id="javax.servlet"/>
-      <plugin id="javax.servlet.jsp"/>
-      <plugin id="javax.wsdl"/>
-      <plugin id="javax.xml"/>
-      <plugin id="javax.xml.rpc"/>
-      <plugin id="javax.xml.soap"/>
-      <plugin id="net.sourceforge.lpg.lpgjavaruntime"/>
-      <plugin id="org.apache.ant"/>
-      <plugin id="org.apache.axis"/>
-      <plugin id="org.apache.batik.bridge"/>
-      <plugin id="org.apache.batik.css"/>
-      <plugin id="org.apache.batik.dom"/>
-      <plugin id="org.apache.batik.dom.svg"/>
-      <plugin id="org.apache.batik.ext.awt"/>
-      <plugin id="org.apache.batik.parser"/>
-      <plugin id="org.apache.batik.pdf"/>
-      <plugin id="org.apache.batik.svggen"/>
-      <plugin id="org.apache.batik.transcoder"/>
-      <plugin id="org.apache.batik.util"/>
-      <plugin id="org.apache.batik.util.gui"/>
-      <plugin id="org.apache.batik.xml"/>
-      <plugin id="org.apache.bcel"/>
-      <plugin id="org.apache.commons.codec"/>
-      <plugin id="org.apache.commons.discovery"/>
-      <plugin id="org.apache.commons.el"/>
-      <plugin id="org.apache.commons.httpclient"/>
-      <plugin id="org.apache.commons.jxpath"/>
-      <plugin id="org.apache.commons.lang"/>
-      <plugin id="org.apache.commons.logging"/>
-      <plugin id="org.apache.commons.net"/>
-      <plugin id="org.apache.jasper"/>
-      <plugin id="org.apache.log4j"/>
-      <plugin id="org.apache.lucene"/>
-      <plugin id="org.apache.lucene.analysis"/>
-      <plugin id="org.apache.wsil4j"/>
-      <plugin id="org.apache.xalan"/>
-      <plugin id="org.apache.xerces"/>
-      <plugin id="org.apache.xml.resolver"/>
-      <plugin id="org.apache.xml.serializer"/>
-      <plugin id="org.argeo.slc.ide.branding"/>
-      <plugin id="org.argeo.slc.ide.ui"/>
-      <plugin id="org.eclipse.ant.core"/>
-      <plugin id="org.eclipse.ant.ui"/>
-      <plugin id="org.eclipse.compare"/>
-      <plugin id="org.eclipse.compare.core"/>
-      <plugin id="org.eclipse.compare.win32"/>
-      <plugin id="org.eclipse.core.boot"/>
-      <plugin id="org.eclipse.core.commands"/>
-      <plugin id="org.eclipse.core.contenttype"/>
-      <plugin id="org.eclipse.core.databinding"/>
-      <plugin id="org.eclipse.core.databinding.beans"/>
-      <plugin id="org.eclipse.core.databinding.observable"/>
-      <plugin id="org.eclipse.core.databinding.property"/>
-      <plugin id="org.eclipse.core.expressions"/>
-      <plugin id="org.eclipse.core.filebuffers"/>
-      <plugin id="org.eclipse.core.filesystem"/>
-      <plugin id="org.eclipse.core.filesystem.hpux.PA_RISC" fragment="true"/>
-      <plugin id="org.eclipse.core.filesystem.hpux.ia64_32" fragment="true"/>
-      <plugin id="org.eclipse.core.filesystem.linux.ppc" fragment="true"/>
-      <plugin id="org.eclipse.core.filesystem.linux.x86" fragment="true"/>
-      <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
-      <plugin id="org.eclipse.core.filesystem.qnx.x86" fragment="true"/>
-      <plugin id="org.eclipse.core.filesystem.solaris.sparc" fragment="true"/>
-      <plugin id="org.eclipse.core.filesystem.win32.x86" fragment="true"/>
-      <plugin id="org.eclipse.core.filesystem.win32.x86_64" fragment="true"/>
-      <plugin id="org.eclipse.core.jobs"/>
-      <plugin id="org.eclipse.core.net"/>
-      <plugin id="org.eclipse.core.net.linux.x86" fragment="true"/>
-      <plugin id="org.eclipse.core.net.win32.x86" fragment="true"/>
-      <plugin id="org.eclipse.core.net.win32.x86_64" fragment="true"/>
-      <plugin id="org.eclipse.core.resources"/>
-      <plugin id="org.eclipse.core.resources.compatibility" fragment="true"/>
-      <plugin id="org.eclipse.core.resources.win32.x86" fragment="true"/>
-      <plugin id="org.eclipse.core.runtime"/>
-      <plugin id="org.eclipse.core.runtime.compatibility"/>
-      <plugin id="org.eclipse.core.runtime.compatibility.auth"/>
-      <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
-      <plugin id="org.eclipse.core.variables"/>
-      <plugin id="org.eclipse.cvs"/>
-      <plugin id="org.eclipse.debug.core"/>
-      <plugin id="org.eclipse.debug.ui"/>
-      <plugin id="org.eclipse.draw2d"/>
-      <plugin id="org.eclipse.dstore.core"/>
-      <plugin id="org.eclipse.dstore.extra"/>
-      <plugin id="org.eclipse.ecf"/>
-      <plugin id="org.eclipse.ecf.filetransfer"/>
-      <plugin id="org.eclipse.ecf.identity"/>
-      <plugin id="org.eclipse.ecf.provider.filetransfer"/>
-      <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
-      <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
-      <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
-      <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
-      <plugin id="org.eclipse.emf"/>
-      <plugin id="org.eclipse.emf.ant"/>
-      <plugin id="org.eclipse.emf.cheatsheets"/>
-      <plugin id="org.eclipse.emf.codegen"/>
-      <plugin id="org.eclipse.emf.codegen.ecore"/>
-      <plugin id="org.eclipse.emf.codegen.ecore.ui"/>
-      <plugin id="org.eclipse.emf.codegen.ui"/>
-      <plugin id="org.eclipse.emf.common"/>
-      <plugin id="org.eclipse.emf.common.ui"/>
-      <plugin id="org.eclipse.emf.compare"/>
-      <plugin id="org.eclipse.emf.compare.diff"/>
-      <plugin id="org.eclipse.emf.compare.diff.edit"/>
-      <plugin id="org.eclipse.emf.compare.doc"/>
-      <plugin id="org.eclipse.emf.compare.epatch"/>
-      <plugin id="org.eclipse.emf.compare.match"/>
-      <plugin id="org.eclipse.emf.compare.ui"/>
-      <plugin id="org.eclipse.emf.converter"/>
-      <plugin id="org.eclipse.emf.databinding"/>
-      <plugin id="org.eclipse.emf.databinding.edit"/>
-      <plugin id="org.eclipse.emf.doc"/>
-      <plugin id="org.eclipse.emf.ecore"/>
-      <plugin id="org.eclipse.emf.ecore.change"/>
-      <plugin id="org.eclipse.emf.ecore.change.edit"/>
-      <plugin id="org.eclipse.emf.ecore.edit"/>
-      <plugin id="org.eclipse.emf.ecore.editor"/>
-      <plugin id="org.eclipse.emf.ecore.xmi"/>
-      <plugin id="org.eclipse.emf.edit"/>
-      <plugin id="org.eclipse.emf.edit.ui"/>
-      <plugin id="org.eclipse.emf.example.installer"/>
-      <plugin id="org.eclipse.emf.exporter"/>
-      <plugin id="org.eclipse.emf.importer"/>
-      <plugin id="org.eclipse.emf.importer.ecore"/>
-      <plugin id="org.eclipse.emf.importer.java"/>
-      <plugin id="org.eclipse.emf.importer.rose"/>
-      <plugin id="org.eclipse.emf.mapping"/>
-      <plugin id="org.eclipse.emf.mapping.ecore"/>
-      <plugin id="org.eclipse.emf.mapping.ecore.editor"/>
-      <plugin id="org.eclipse.emf.mapping.ecore2ecore"/>
-      <plugin id="org.eclipse.emf.mapping.ecore2ecore.editor"/>
-      <plugin id="org.eclipse.emf.mapping.ecore2xml"/>
-      <plugin id="org.eclipse.emf.mapping.ecore2xml.ui"/>
-      <plugin id="org.eclipse.emf.mapping.ui"/>
-      <plugin id="org.eclipse.emf.mapping.xsd2ecore"/>
-      <plugin id="org.eclipse.emf.mapping.xsd2ecore.editor"/>
-      <plugin id="org.eclipse.emf.transaction"/>
-      <plugin id="org.eclipse.emf.transaction.ui"/>
-      <plugin id="org.eclipse.emf.validation"/>
-      <plugin id="org.eclipse.emf.validation.ui"/>
-      <plugin id="org.eclipse.emf.validation.ui.ide"/>
-      <plugin id="org.eclipse.emf.workspace"/>
-      <plugin id="org.eclipse.emf.workspace.ui"/>
-      <plugin id="org.eclipse.equinox.app"/>
-      <plugin id="org.eclipse.equinox.cm"/>
-      <plugin id="org.eclipse.equinox.common"/>
-      <plugin id="org.eclipse.equinox.concurrent"/>
-      <plugin id="org.eclipse.equinox.device"/>
-      <plugin id="org.eclipse.equinox.ds"/>
-      <plugin id="org.eclipse.equinox.event"/>
-      <plugin id="org.eclipse.equinox.frameworkadmin"/>
-      <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
-      <plugin id="org.eclipse.equinox.http"/>
-      <plugin id="org.eclipse.equinox.http.jetty"/>
-      <plugin id="org.eclipse.equinox.http.registry"/>
-      <plugin id="org.eclipse.equinox.http.servlet"/>
-      <plugin id="org.eclipse.equinox.http.servletbridge"/>
-      <plugin id="org.eclipse.equinox.io"/>
-      <plugin id="org.eclipse.equinox.ip"/>
-      <plugin id="org.eclipse.equinox.jsp.jasper"/>
-      <plugin id="org.eclipse.equinox.jsp.jasper.registry"/>
-      <plugin id="org.eclipse.equinox.launcher"/>
-      <plugin id="org.eclipse.equinox.launcher.carbon.macosx" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.cocoa.macosx" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.cocoa.macosx.x86_64" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.gtk.linux.ppc" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.gtk.linux.s390" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.gtk.linux.s390x" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.gtk.linux.x86" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.gtk.solaris.sparc" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.gtk.solaris.x86" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.motif.aix.ppc" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.motif.hpux.PA_RISC" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.motif.hpux.ia64_32" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.motif.linux.x86" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.motif.solaris.sparc" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.win32.win32.x86" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.win32.win32.x86_64" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.wpf.win32.x86" fragment="true"/>
-      <plugin id="org.eclipse.equinox.log"/>
-      <plugin id="org.eclipse.equinox.metatype"/>
-      <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
-      <plugin id="org.eclipse.equinox.p2.console"/>
-      <plugin id="org.eclipse.equinox.p2.core"/>
-      <plugin id="org.eclipse.equinox.p2.director"/>
-      <plugin id="org.eclipse.equinox.p2.director.app"/>
-      <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
-      <plugin id="org.eclipse.equinox.p2.engine"/>
-      <plugin id="org.eclipse.equinox.p2.exemplarysetup"/>
-      <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
-      <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
-      <plugin id="org.eclipse.equinox.p2.installer"/>
-      <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
-      <plugin id="org.eclipse.equinox.p2.metadata"/>
-      <plugin id="org.eclipse.equinox.p2.metadata.generator"/>
-      <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
-      <plugin id="org.eclipse.equinox.p2.publisher"/>
-      <plugin id="org.eclipse.equinox.p2.reconciler.dropins"/>
-      <plugin id="org.eclipse.equinox.p2.repository"/>
-      <plugin id="org.eclipse.equinox.p2.repository.tools"/>
-      <plugin id="org.eclipse.equinox.p2.tools"/>
-      <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
-      <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
-      <plugin id="org.eclipse.equinox.p2.ui"/>
-      <plugin id="org.eclipse.equinox.p2.ui.admin"/>
-      <plugin id="org.eclipse.equinox.p2.ui.admin.rcp"/>
-      <plugin id="org.eclipse.equinox.p2.ui.sdk"/>
-      <plugin id="org.eclipse.equinox.p2.ui.sdk.scheduler"/>
-      <plugin id="org.eclipse.equinox.p2.updatechecker"/>
-      <plugin id="org.eclipse.equinox.p2.updatesite"/>
-      <plugin id="org.eclipse.equinox.preferences"/>
-      <plugin id="org.eclipse.equinox.registry"/>
-      <plugin id="org.eclipse.equinox.security"/>
-      <plugin id="org.eclipse.equinox.security.macosx" fragment="true"/>
-      <plugin id="org.eclipse.equinox.security.ui"/>
-      <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
-      <plugin id="org.eclipse.equinox.servletbridge"/>
-      <plugin id="org.eclipse.equinox.simpleconfigurator"/>
-      <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
-      <plugin id="org.eclipse.equinox.supplement"/>
-      <plugin id="org.eclipse.equinox.transforms.hook" fragment="true"/>
-      <plugin id="org.eclipse.equinox.transforms.xslt"/>
-      <plugin id="org.eclipse.equinox.useradmin"/>
-      <plugin id="org.eclipse.equinox.util"/>
-      <plugin id="org.eclipse.equinox.wireadmin"/>
-      <plugin id="org.eclipse.gef"/>
-      <plugin id="org.eclipse.gmf"/>
-      <plugin id="org.eclipse.gmf.bridge"/>
-      <plugin id="org.eclipse.gmf.bridge.trace"/>
-      <plugin id="org.eclipse.gmf.bridge.ui"/>
-      <plugin id="org.eclipse.gmf.bridge.ui.dashboard"/>
-      <plugin id="org.eclipse.gmf.codegen"/>
-      <plugin id="org.eclipse.gmf.codegen.edit"/>
-      <plugin id="org.eclipse.gmf.codegen.ui"/>
-      <plugin id="org.eclipse.gmf.common"/>
-      <plugin id="org.eclipse.gmf.doc"/>
-      <plugin id="org.eclipse.gmf.doc.ui"/>
-      <plugin id="org.eclipse.gmf.ecore.editor"/>
-      <plugin id="org.eclipse.gmf.examples"/>
-      <plugin id="org.eclipse.gmf.examples.ui.pde"/>
-      <plugin id="org.eclipse.gmf.graphdef"/>
-      <plugin id="org.eclipse.gmf.graphdef.codegen"/>
-      <plugin id="org.eclipse.gmf.graphdef.codegen.ui"/>
-      <plugin id="org.eclipse.gmf.graphdef.edit"/>
-      <plugin id="org.eclipse.gmf.map"/>
-      <plugin id="org.eclipse.gmf.map.edit"/>
-      <plugin id="org.eclipse.gmf.runtime.common.core"/>
-      <plugin id="org.eclipse.gmf.runtime.common.ui"/>
-      <plugin id="org.eclipse.gmf.runtime.common.ui.action"/>
-      <plugin id="org.eclipse.gmf.runtime.common.ui.action.ide"/>
-      <plugin id="org.eclipse.gmf.runtime.common.ui.printing"/>
-      <plugin id="org.eclipse.gmf.runtime.common.ui.printing.win32" fragment="true"/>
-      <plugin id="org.eclipse.gmf.runtime.common.ui.services"/>
-      <plugin id="org.eclipse.gmf.runtime.common.ui.services.action"/>
-      <plugin id="org.eclipse.gmf.runtime.common.ui.services.dnd"/>
-      <plugin id="org.eclipse.gmf.runtime.common.ui.services.dnd.ide"/>
-      <plugin id="org.eclipse.gmf.runtime.common.ui.services.properties"/>
-      <plugin id="org.eclipse.gmf.runtime.diagram.core"/>
-      <plugin id="org.eclipse.gmf.runtime.diagram.ui"/>
-      <plugin id="org.eclipse.gmf.runtime.diagram.ui.actions"/>
-      <plugin id="org.eclipse.gmf.runtime.diagram.ui.dnd"/>
-      <plugin id="org.eclipse.gmf.runtime.diagram.ui.geoshapes"/>
-      <plugin id="org.eclipse.gmf.runtime.diagram.ui.printing"/>
-      <plugin id="org.eclipse.gmf.runtime.diagram.ui.printing.render"/>
-      <plugin id="org.eclipse.gmf.runtime.diagram.ui.properties"/>
-      <plugin id="org.eclipse.gmf.runtime.diagram.ui.providers"/>
-      <plugin id="org.eclipse.gmf.runtime.diagram.ui.providers.ide"/>
-      <plugin id="org.eclipse.gmf.runtime.diagram.ui.render"/>
-      <plugin id="org.eclipse.gmf.runtime.diagram.ui.resources.editor"/>
-      <plugin id="org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide"/>
-      <plugin id="org.eclipse.gmf.runtime.draw2d.ui"/>
-      <plugin id="org.eclipse.gmf.runtime.draw2d.ui.render"/>
-      <plugin id="org.eclipse.gmf.runtime.draw2d.ui.render.awt"/>
-      <plugin id="org.eclipse.gmf.runtime.emf.clipboard.core"/>
-      <plugin id="org.eclipse.gmf.runtime.emf.commands.core"/>
-      <plugin id="org.eclipse.gmf.runtime.emf.core"/>
-      <plugin id="org.eclipse.gmf.runtime.emf.type.core"/>
-      <plugin id="org.eclipse.gmf.runtime.emf.type.ui"/>
-      <plugin id="org.eclipse.gmf.runtime.emf.ui"/>
-      <plugin id="org.eclipse.gmf.runtime.emf.ui.properties"/>
-      <plugin id="org.eclipse.gmf.runtime.gef.ui"/>
-      <plugin id="org.eclipse.gmf.runtime.notation"/>
-      <plugin id="org.eclipse.gmf.runtime.notation.edit"/>
-      <plugin id="org.eclipse.gmf.runtime.notation.providers"/>
-      <plugin id="org.eclipse.gmf.sdk"/>
-      <plugin id="org.eclipse.gmf.templates.legacy"/>
-      <plugin id="org.eclipse.gmf.tooldef"/>
-      <plugin id="org.eclipse.gmf.tooldef.edit"/>
-      <plugin id="org.eclipse.gmf.tooling"/>
-      <plugin id="org.eclipse.gmf.validate"/>
-      <plugin id="org.eclipse.gmf.xpand"/>
-      <plugin id="org.eclipse.gmf.xpand.editor"/>
-      <plugin id="org.eclipse.gmf.xpand.migration"/>
-      <plugin id="org.eclipse.gmf.xpand.qvtlibrary"/>
-      <plugin id="org.eclipse.help"/>
-      <plugin id="org.eclipse.help.appserver"/>
-      <plugin id="org.eclipse.help.base"/>
-      <plugin id="org.eclipse.help.ui"/>
-      <plugin id="org.eclipse.help.webapp"/>
-      <plugin id="org.eclipse.jdt"/>
-      <plugin id="org.eclipse.jdt.apt.core"/>
-      <plugin id="org.eclipse.jdt.apt.pluggable.core"/>
-      <plugin id="org.eclipse.jdt.apt.ui"/>
-      <plugin id="org.eclipse.jdt.compiler.apt" fragment="true"/>
-      <plugin id="org.eclipse.jdt.compiler.tool" fragment="true"/>
-      <plugin id="org.eclipse.jdt.core"/>
-      <plugin id="org.eclipse.jdt.core.manipulation"/>
-      <plugin id="org.eclipse.jdt.debug"/>
-      <plugin id="org.eclipse.jdt.debug.ui"/>
-      <plugin id="org.eclipse.jdt.doc.user"/>
-      <plugin id="org.eclipse.jdt.junit"/>
-      <plugin id="org.eclipse.jdt.junit.runtime"/>
-      <plugin id="org.eclipse.jdt.junit4.runtime"/>
-      <plugin id="org.eclipse.jdt.launching"/>
-      <plugin id="org.eclipse.jdt.launching.macosx"/>
-      <plugin id="org.eclipse.jdt.launching.ui.macosx"/>
-      <plugin id="org.eclipse.jdt.ui"/>
-      <plugin id="org.eclipse.jem"/>
-      <plugin id="org.eclipse.jem.beaninfo"/>
-      <plugin id="org.eclipse.jem.beaninfo.vm"/>
-      <plugin id="org.eclipse.jem.beaninfo.vm.common"/>
-      <plugin id="org.eclipse.jem.proxy"/>
-      <plugin id="org.eclipse.jem.util"/>
-      <plugin id="org.eclipse.jem.workbench"/>
-      <plugin id="org.eclipse.jface"/>
-      <plugin id="org.eclipse.jface.databinding"/>
-      <plugin id="org.eclipse.jface.text"/>
-      <plugin id="org.eclipse.jsch.core"/>
-      <plugin id="org.eclipse.jsch.ui"/>
-      <plugin id="org.eclipse.jst.common.annotations.controller"/>
-      <plugin id="org.eclipse.jst.common.annotations.core"/>
-      <plugin id="org.eclipse.jst.common.annotations.ui"/>
-      <plugin id="org.eclipse.jst.common.frameworks"/>
-      <plugin id="org.eclipse.jst.common.project.facet.core"/>
-      <plugin id="org.eclipse.jst.common.project.facet.ui"/>
-      <plugin id="org.eclipse.jst.j2ee"/>
-      <plugin id="org.eclipse.jst.j2ee.core"/>
-      <plugin id="org.eclipse.jst.j2ee.jca"/>
-      <plugin id="org.eclipse.jst.j2ee.web"/>
-      <plugin id="org.eclipse.jst.jee"/>
-      <plugin id="org.eclipse.jst.jee.web"/>
-      <plugin id="org.eclipse.jst.jsf.common"/>
-      <plugin id="org.eclipse.jst.jsf.common.runtime"/>
-      <plugin id="org.eclipse.jst.jsf.common.ui"/>
-      <plugin id="org.eclipse.jst.jsf.core"/>
-      <plugin id="org.eclipse.jst.jsf.doc.user"/>
-      <plugin id="org.eclipse.jst.jsf.facesconfig"/>
-      <plugin id="org.eclipse.jst.jsf.facesconfig.ui"/>
-      <plugin id="org.eclipse.jst.jsf.standard.tagsupport"/>
-      <plugin id="org.eclipse.jst.jsf.ui"/>
-      <plugin id="org.eclipse.jst.jsp.core"/>
-      <plugin id="org.eclipse.jst.jsp.ui"/>
-      <plugin id="org.eclipse.jst.jsp.ui.infopop"/>
-      <plugin id="org.eclipse.jst.server.core"/>
-      <plugin id="org.eclipse.jst.server.generic.core"/>
-      <plugin id="org.eclipse.jst.server.generic.ui"/>
-      <plugin id="org.eclipse.jst.server.ui"/>
-      <plugin id="org.eclipse.jst.server.ui.doc.user"/>
-      <plugin id="org.eclipse.jst.server.ui.infopop"/>
-      <plugin id="org.eclipse.jst.standard.schemas"/>
-      <plugin id="org.eclipse.ltk.core.refactoring"/>
-      <plugin id="org.eclipse.ltk.ui.refactoring"/>
-      <plugin id="org.eclipse.m2m.qvt.oml"/>
-      <plugin id="org.eclipse.m2m.qvt.oml.common"/>
-      <plugin id="org.eclipse.m2m.qvt.oml.cst.parser"/>
-      <plugin id="org.eclipse.m2m.qvt.oml.ecore.imperativeocl"/>
-      <plugin id="org.eclipse.m2m.qvt.oml.emf.util"/>
-      <plugin id="org.eclipse.m2m.qvt.oml.project"/>
-      <plugin id="org.eclipse.m2m.qvt.oml.runtime"/>
-      <plugin id="org.eclipse.mylyn"/>
-      <plugin id="org.eclipse.mylyn.bugzilla.core"/>
-      <plugin id="org.eclipse.mylyn.bugzilla.ide"/>
-      <plugin id="org.eclipse.mylyn.bugzilla.ui"/>
-      <plugin id="org.eclipse.mylyn.commons.core"/>
-      <plugin id="org.eclipse.mylyn.commons.net"/>
-      <plugin id="org.eclipse.mylyn.commons.ui"/>
-      <plugin id="org.eclipse.mylyn.compatibility"/>
-      <plugin id="org.eclipse.mylyn.context.core"/>
-      <plugin id="org.eclipse.mylyn.context.ui"/>
-      <plugin id="org.eclipse.mylyn.discovery.core"/>
-      <plugin id="org.eclipse.mylyn.discovery.ui"/>
-      <plugin id="org.eclipse.mylyn.help.ui"/>
-      <plugin id="org.eclipse.mylyn.ide.ant"/>
-      <plugin id="org.eclipse.mylyn.ide.ui"/>
-      <plugin id="org.eclipse.mylyn.java.tasks"/>
-      <plugin id="org.eclipse.mylyn.java.ui"/>
-      <plugin id="org.eclipse.mylyn.monitor.core"/>
-      <plugin id="org.eclipse.mylyn.monitor.ui"/>
-      <plugin id="org.eclipse.mylyn.pde.ui"/>
-      <plugin id="org.eclipse.mylyn.resources.ui"/>
-      <plugin id="org.eclipse.mylyn.tasks.bugs"/>
-      <plugin id="org.eclipse.mylyn.tasks.core"/>
-      <plugin id="org.eclipse.mylyn.tasks.ui"/>
-      <plugin id="org.eclipse.mylyn.team.cvs"/>
-      <plugin id="org.eclipse.mylyn.team.ui"/>
-      <plugin id="org.eclipse.mylyn.wikitext.confluence.core"/>
-      <plugin id="org.eclipse.mylyn.wikitext.confluence.ui"/>
-      <plugin id="org.eclipse.mylyn.wikitext.core"/>
-      <plugin id="org.eclipse.mylyn.wikitext.help.ui"/>
-      <plugin id="org.eclipse.mylyn.wikitext.mediawiki.core"/>
-      <plugin id="org.eclipse.mylyn.wikitext.mediawiki.ui"/>
-      <plugin id="org.eclipse.mylyn.wikitext.tasks.ui"/>
-      <plugin id="org.eclipse.mylyn.wikitext.textile.core"/>
-      <plugin id="org.eclipse.mylyn.wikitext.textile.ui"/>
-      <plugin id="org.eclipse.mylyn.wikitext.tracwiki.core"/>
-      <plugin id="org.eclipse.mylyn.wikitext.tracwiki.ui"/>
-      <plugin id="org.eclipse.mylyn.wikitext.twiki.core"/>
-      <plugin id="org.eclipse.mylyn.wikitext.twiki.ui"/>
-      <plugin id="org.eclipse.mylyn.wikitext.ui"/>
-      <plugin id="org.eclipse.ocl"/>
-      <plugin id="org.eclipse.ocl.ecore"/>
-      <plugin id="org.eclipse.osgi"/>
-      <plugin id="org.eclipse.osgi.services"/>
-      <plugin id="org.eclipse.osgi.util"/>
-      <plugin id="org.eclipse.pde"/>
-      <plugin id="org.eclipse.pde.api.tools"/>
-      <plugin id="org.eclipse.pde.api.tools.ui"/>
-      <plugin id="org.eclipse.pde.build"/>
-      <plugin id="org.eclipse.pde.core"/>
-      <plugin id="org.eclipse.pde.doc.user"/>
-      <plugin id="org.eclipse.pde.ds.core"/>
-      <plugin id="org.eclipse.pde.ds.ui"/>
-      <plugin id="org.eclipse.pde.junit.runtime"/>
-      <plugin id="org.eclipse.pde.runtime"/>
-      <plugin id="org.eclipse.pde.ua.core"/>
-      <plugin id="org.eclipse.pde.ua.ui"/>
-      <plugin id="org.eclipse.pde.ui"/>
-      <plugin id="org.eclipse.pde.ui.templates"/>
-      <plugin id="org.eclipse.platform"/>
-      <plugin id="org.eclipse.platform.doc.user"/>
-      <plugin id="org.eclipse.rcp"/>
-      <plugin id="org.eclipse.rse"/>
-      <plugin id="org.eclipse.rse.connectorservice.dstore"/>
-      <plugin id="org.eclipse.rse.connectorservice.local"/>
-      <plugin id="org.eclipse.rse.connectorservice.ssh"/>
-      <plugin id="org.eclipse.rse.connectorservice.telnet"/>
-      <plugin id="org.eclipse.rse.core"/>
-      <plugin id="org.eclipse.rse.doc.user"/>
-      <plugin id="org.eclipse.rse.dstore.security"/>
-      <plugin id="org.eclipse.rse.efs"/>
-      <plugin id="org.eclipse.rse.efs.ui"/>
-      <plugin id="org.eclipse.rse.files.ui"/>
-      <plugin id="org.eclipse.rse.importexport"/>
-      <plugin id="org.eclipse.rse.processes.ui"/>
-      <plugin id="org.eclipse.rse.services"/>
-      <plugin id="org.eclipse.rse.services.dstore"/>
-      <plugin id="org.eclipse.rse.services.files.ftp"/>
-      <plugin id="org.eclipse.rse.services.local"/>
-      <plugin id="org.eclipse.rse.services.ssh"/>
-      <plugin id="org.eclipse.rse.services.telnet"/>
-      <plugin id="org.eclipse.rse.shells.ui"/>
-      <plugin id="org.eclipse.rse.subsystems.files.core"/>
-      <plugin id="org.eclipse.rse.subsystems.files.dstore"/>
-      <plugin id="org.eclipse.rse.subsystems.files.ftp"/>
-      <plugin id="org.eclipse.rse.subsystems.files.local"/>
-      <plugin id="org.eclipse.rse.subsystems.files.ssh"/>
-      <plugin id="org.eclipse.rse.subsystems.processes.core"/>
-      <plugin id="org.eclipse.rse.subsystems.processes.dstore"/>
-      <plugin id="org.eclipse.rse.subsystems.processes.local"/>
-      <plugin id="org.eclipse.rse.subsystems.processes.shell.linux"/>
-      <plugin id="org.eclipse.rse.subsystems.shells.core"/>
-      <plugin id="org.eclipse.rse.subsystems.shells.dstore"/>
-      <plugin id="org.eclipse.rse.subsystems.shells.local"/>
-      <plugin id="org.eclipse.rse.subsystems.shells.ssh"/>
-      <plugin id="org.eclipse.rse.subsystems.shells.telnet"/>
-      <plugin id="org.eclipse.rse.subsystems.terminals.core"/>
-      <plugin id="org.eclipse.rse.subsystems.terminals.ssh"/>
-      <plugin id="org.eclipse.rse.terminals.ui"/>
-      <plugin id="org.eclipse.rse.ui"/>
-      <plugin id="org.eclipse.search"/>
-      <plugin id="org.eclipse.swt"/>
-      <plugin id="org.eclipse.swt.carbon.macosx" fragment="true"/>
-      <plugin id="org.eclipse.swt.cocoa.macosx" fragment="true"/>
-      <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
-      <plugin id="org.eclipse.swt.gtk.linux.ppc" fragment="true"/>
-      <plugin id="org.eclipse.swt.gtk.linux.s390" fragment="true"/>
-      <plugin id="org.eclipse.swt.gtk.linux.s390x" fragment="true"/>
-      <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
-      <plugin id="org.eclipse.swt.gtk.solaris.sparc" fragment="true"/>
-      <plugin id="org.eclipse.swt.gtk.solaris.x86" fragment="true"/>
-      <plugin id="org.eclipse.swt.motif.aix.ppc" fragment="true"/>
-      <plugin id="org.eclipse.swt.motif.hpux.PA_RISC" fragment="true"/>
-      <plugin id="org.eclipse.swt.motif.hpux.ia64_32" fragment="true"/>
-      <plugin id="org.eclipse.swt.motif.linux.x86" fragment="true"/>
-      <plugin id="org.eclipse.swt.motif.solaris.sparc" fragment="true"/>
-      <plugin id="org.eclipse.swt.photon.qnx.x86" fragment="true"/>
-      <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
-      <plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>
-      <plugin id="org.eclipse.swt.wpf.win32.x86" fragment="true"/>
-      <plugin id="org.eclipse.team.core"/>
-      <plugin id="org.eclipse.team.cvs.core"/>
-      <plugin id="org.eclipse.team.cvs.ssh"/>
-      <plugin id="org.eclipse.team.cvs.ssh2"/>
-      <plugin id="org.eclipse.team.cvs.ui"/>
-      <plugin id="org.eclipse.team.ui"/>
-      <plugin id="org.eclipse.text"/>
-      <plugin id="org.eclipse.tm.terminal"/>
-      <plugin id="org.eclipse.tm.terminal.serial"/>
-      <plugin id="org.eclipse.tm.terminal.ssh"/>
-      <plugin id="org.eclipse.tm.terminal.telnet"/>
-      <plugin id="org.eclipse.tm.terminal.view"/>
-      <plugin id="org.eclipse.ui"/>
-      <plugin id="org.eclipse.ui.browser"/>
-      <plugin id="org.eclipse.ui.carbon" fragment="true"/>
-      <plugin id="org.eclipse.ui.cheatsheets"/>
-      <plugin id="org.eclipse.ui.cocoa" fragment="true"/>
-      <plugin id="org.eclipse.ui.console"/>
-      <plugin id="org.eclipse.ui.editors"/>
-      <plugin id="org.eclipse.ui.externaltools"/>
-      <plugin id="org.eclipse.ui.forms"/>
-      <plugin id="org.eclipse.ui.ide"/>
-      <plugin id="org.eclipse.ui.ide.application"/>
-      <plugin id="org.eclipse.ui.intro"/>
-      <plugin id="org.eclipse.ui.intro.universal"/>
-      <plugin id="org.eclipse.ui.navigator"/>
-      <plugin id="org.eclipse.ui.navigator.resources"/>
-      <plugin id="org.eclipse.ui.net"/>
-      <plugin id="org.eclipse.ui.presentations.r21"/>
-      <plugin id="org.eclipse.ui.views"/>
-      <plugin id="org.eclipse.ui.views.log"/>
-      <plugin id="org.eclipse.ui.views.properties.tabbed"/>
-      <plugin id="org.eclipse.ui.win32" fragment="true"/>
-      <plugin id="org.eclipse.ui.workbench"/>
-      <plugin id="org.eclipse.ui.workbench.compatibility" fragment="true"/>
-      <plugin id="org.eclipse.ui.workbench.texteditor"/>
-      <plugin id="org.eclipse.update.configurator"/>
-      <plugin id="org.eclipse.update.core"/>
-      <plugin id="org.eclipse.update.core.linux" fragment="true"/>
-      <plugin id="org.eclipse.update.core.win32" fragment="true"/>
-      <plugin id="org.eclipse.update.scheduler"/>
-      <plugin id="org.eclipse.update.ui"/>
-      <plugin id="org.eclipse.wst.command.env"/>
-      <plugin id="org.eclipse.wst.command.env.core"/>
-      <plugin id="org.eclipse.wst.command.env.doc.user"/>
-      <plugin id="org.eclipse.wst.command.env.infopop"/>
-      <plugin id="org.eclipse.wst.command.env.ui"/>
-      <plugin id="org.eclipse.wst.common.core"/>
-      <plugin id="org.eclipse.wst.common.emf"/>
-      <plugin id="org.eclipse.wst.common.emfworkbench.integration"/>
-      <plugin id="org.eclipse.wst.common.environment"/>
-      <plugin id="org.eclipse.wst.common.frameworks"/>
-      <plugin id="org.eclipse.wst.common.frameworks.ui"/>
-      <plugin id="org.eclipse.wst.common.infopop"/>
-      <plugin id="org.eclipse.wst.common.modulecore"/>
-      <plugin id="org.eclipse.wst.common.project.facet.core"/>
-      <plugin id="org.eclipse.wst.common.project.facet.ui"/>
-      <plugin id="org.eclipse.wst.common.snippets"/>
-      <plugin id="org.eclipse.wst.common.ui"/>
-      <plugin id="org.eclipse.wst.common.uriresolver"/>
-      <plugin id="org.eclipse.wst.css.core"/>
-      <plugin id="org.eclipse.wst.css.ui"/>
-      <plugin id="org.eclipse.wst.doc.user"/>
-      <plugin id="org.eclipse.wst.dtd.core"/>
-      <plugin id="org.eclipse.wst.dtd.ui"/>
-      <plugin id="org.eclipse.wst.dtd.ui.infopop"/>
-      <plugin id="org.eclipse.wst.dtdeditor.doc.user"/>
-      <plugin id="org.eclipse.wst.html.core"/>
-      <plugin id="org.eclipse.wst.html.ui"/>
-      <plugin id="org.eclipse.wst.html.ui.infopop"/>
-      <plugin id="org.eclipse.wst.internet.cache"/>
-      <plugin id="org.eclipse.wst.internet.monitor.core"/>
-      <plugin id="org.eclipse.wst.internet.monitor.ui"/>
-      <plugin id="org.eclipse.wst.jsdt.core"/>
-      <plugin id="org.eclipse.wst.jsdt.doc"/>
-      <plugin id="org.eclipse.wst.jsdt.manipulation"/>
-      <plugin id="org.eclipse.wst.jsdt.support.firefox"/>
-      <plugin id="org.eclipse.wst.jsdt.support.ie"/>
-      <plugin id="org.eclipse.wst.jsdt.ui"/>
-      <plugin id="org.eclipse.wst.jsdt.web.core"/>
-      <plugin id="org.eclipse.wst.jsdt.web.support.jsp"/>
-      <plugin id="org.eclipse.wst.jsdt.web.ui"/>
-      <plugin id="org.eclipse.wst.server.core"/>
-      <plugin id="org.eclipse.wst.server.discovery"/>
-      <plugin id="org.eclipse.wst.server.ui"/>
-      <plugin id="org.eclipse.wst.server.ui.doc.user"/>
-      <plugin id="org.eclipse.wst.server.ui.infopop"/>
-      <plugin id="org.eclipse.wst.sse.core"/>
-      <plugin id="org.eclipse.wst.sse.doc.user"/>
-      <plugin id="org.eclipse.wst.sse.ui"/>
-      <plugin id="org.eclipse.wst.sse.ui.infopop"/>
-      <plugin id="org.eclipse.wst.standard.schemas"/>
-      <plugin id="org.eclipse.wst.validation"/>
-      <plugin id="org.eclipse.wst.validation.infopop"/>
-      <plugin id="org.eclipse.wst.validation.ui"/>
-      <plugin id="org.eclipse.wst.web"/>
-      <plugin id="org.eclipse.wst.web.ui"/>
-      <plugin id="org.eclipse.wst.web.ui.infopop"/>
-      <plugin id="org.eclipse.wst.webtools.doc.user"/>
-      <plugin id="org.eclipse.wst.ws"/>
-      <plugin id="org.eclipse.wst.ws.explorer"/>
-      <plugin id="org.eclipse.wst.ws.infopop"/>
-      <plugin id="org.eclipse.wst.ws.parser"/>
-      <plugin id="org.eclipse.wst.ws.service.policy"/>
-      <plugin id="org.eclipse.wst.ws.service.policy.ui"/>
-      <plugin id="org.eclipse.wst.ws.ui"/>
-      <plugin id="org.eclipse.wst.wsdl"/>
-      <plugin id="org.eclipse.wst.wsdl.ui"/>
-      <plugin id="org.eclipse.wst.wsdl.ui.doc.user"/>
-      <plugin id="org.eclipse.wst.wsdl.validation"/>
-      <plugin id="org.eclipse.wst.wsi"/>
-      <plugin id="org.eclipse.wst.wsi.ui"/>
-      <plugin id="org.eclipse.wst.wsi.ui.doc.user"/>
-      <plugin id="org.eclipse.wst.xml.core"/>
-      <plugin id="org.eclipse.wst.xml.ui"/>
-      <plugin id="org.eclipse.wst.xml.ui.infopop"/>
-      <plugin id="org.eclipse.wst.xml.xpath.core"/>
-      <plugin id="org.eclipse.wst.xml.xpath.ui"/>
-      <plugin id="org.eclipse.wst.xml.xpath2.processor"/>
-      <plugin id="org.eclipse.wst.xmleditor.doc.user"/>
-      <plugin id="org.eclipse.wst.xsd.core"/>
-      <plugin id="org.eclipse.wst.xsd.ui"/>
-      <plugin id="org.eclipse.wst.xsdeditor.doc.user"/>
-      <plugin id="org.eclipse.wst.xsl"/>
-      <plugin id="org.eclipse.wst.xsl.core"/>
-      <plugin id="org.eclipse.wst.xsl.debug.ui"/>
-      <plugin id="org.eclipse.wst.xsl.doc"/>
-      <plugin id="org.eclipse.wst.xsl.jaxp.debug"/>
-      <plugin id="org.eclipse.wst.xsl.jaxp.debug.ui"/>
-      <plugin id="org.eclipse.wst.xsl.jaxp.launching"/>
-      <plugin id="org.eclipse.wst.xsl.launching"/>
-      <plugin id="org.eclipse.wst.xsl.saxon"/>
-      <plugin id="org.eclipse.wst.xsl.ui"/>
-      <plugin id="org.eclipse.wst.xsl.xalan"/>
-      <plugin id="org.eclipse.xsd"/>
-      <plugin id="org.eclipse.xsd.cheatsheets"/>
-      <plugin id="org.eclipse.xsd.doc"/>
-      <plugin id="org.eclipse.xsd.ecore.converter"/>
-      <plugin id="org.eclipse.xsd.ecore.exporter"/>
-      <plugin id="org.eclipse.xsd.ecore.importer"/>
-      <plugin id="org.eclipse.xsd.edit"/>
-      <plugin id="org.eclipse.xsd.editor"/>
-      <plugin id="org.eclipse.xsd.example.installer"/>
-      <plugin id="org.eclipse.xsd.mapping"/>
-      <plugin id="org.eclipse.xsd.mapping.editor"/>
-      <plugin id="org.hamcrest.core"/>
-      <plugin id="org.junit"/>
-      <plugin id="org.junit4"/>
-      <plugin id="org.mortbay.jetty.server"/>
-      <plugin id="org.mortbay.jetty.util"/>
-      <plugin id="org.objectweb.asm"/>
-      <plugin id="org.sat4j.core"/>
-      <plugin id="org.sat4j.pb"/>
-      <plugin id="org.tigris.subversion.clientadapter"/>
-      <plugin id="org.tigris.subversion.clientadapter.javahl"/>
-      <plugin id="org.tigris.subversion.clientadapter.svnkit"/>
-      <plugin id="org.tigris.subversion.subclipse.core"/>
-      <plugin id="org.tigris.subversion.subclipse.doc"/>
-      <plugin id="org.tigris.subversion.subclipse.graph"/>
-      <plugin id="org.tigris.subversion.subclipse.mylyn"/>
-      <plugin id="org.tigris.subversion.subclipse.ui"/>
-      <plugin id="org.tmatesoft.svnkit"/>
-      <plugin id="org.uddi4j"/>
-      <plugin id="org.w3c.css.sac"/>
-      <plugin id="org.w3c.dom.events"/>
-      <plugin id="org.w3c.dom.smil"/>
-      <plugin id="org.w3c.dom.svg"/>
-   </plugins>
-
-   <features>
-      <feature id="org.argeo.slc.ide" version="0.12.1.D20100107_1516"/>
-      <feature id="org.eclipse.cvs" version="1.1.101.R35x_v20090811-7E79FEd9KKF5H2YDWFLLBL01A16"/>
-      <feature id="org.eclipse.cvs.source" version="1.1.101.R35x_v20090811-7E79FEd9KKF5H2YDWFLLBL01A16"/>
-      <feature id="org.eclipse.epp.package.rcp.feature" version="1.2.1.20090918-0703"/>
-      <feature id="org.eclipse.epp.usagedata.feature" version="1.1.0.R200906100410"/>
-      <feature id="org.eclipse.equinox.p2.user.ui" version="1.1.1.R35x_v20090811-7u6FbEFYXk1qWdbS0gnpRg2932"/>
-      <feature id="org.eclipse.equinox.p2.user.ui.source" version="1.1.1.R35x_v20090811-7u6FbEFYXk1qWdbS0gnpRg2932"/>
-      <feature id="org.eclipse.help" version="1.1.1.R35x_v20090811-7e7eFAnFEx2XZoYz0uPgIfwD"/>
-      <feature id="org.eclipse.help.source" version="1.1.1.R35x_v20090811-7e7eFAnFEx2XZoYz0uPgIfwD"/>
-      <feature id="org.eclipse.jdt" version="3.5.1.r351_v20090810-0600-7r88FEoFI0WTo6Az-1qFRHm37ChJ"/>
-      <feature id="org.eclipse.jdt.source" version="3.5.1.r351_v20090810-0600-7r88FEoFI0WTo6Az-1qFRHm37ChJ"/>
-      <feature id="org.eclipse.pde" version="3.5.1.R35x_v20090811-7Z7_F9zFDX-aT6Ywvh8_S93"/>
-      <feature id="org.eclipse.pde.source" version="3.5.1.R35x_v20090811-7Z7_F9zFDX-aT6Ywvh8_S93"/>
-      <feature id="org.eclipse.platform" version="3.5.1.R35x_v20090910-9gEeG1_FthkNDSP2odXdThaOu9GFDPn83DGB7"/>
-      <feature id="org.eclipse.platform.source" version="3.5.1.R35x_v20090910-9gEeG1_FthkNDSP2odXdThaOu9GFDPn83DGB7"/>
-      <feature id="org.eclipse.rcp" version="3.5.1.R35x_v20090811-9SA0FxVFqE70OL1ARMrfcO6e7BA6"/>
-      <feature id="org.eclipse.rcp.source" version="3.5.1.R35x_v20090811-9SA0FxVFqE70OL1ARMrfcO6e7BA6"/>
-      <feature id="org.eclipse.wst.common_core.feature" version="3.1.1.v200908102300-7B77FZ3F7RZHIVI9QdN4PM"/>
-      <feature id="org.eclipse.wst.common_ui.feature" version="3.1.1.v200908102300-7B5FRGDhdMNPnndenAjpWJAReO5Q"/>
-      <feature id="org.eclipse.wst.xml_core.feature" version="3.1.1.v200907161031-7C7OFPgF7RZHIXHvT5MhWA"/>
-      <feature id="org.eclipse.wst.xml_ui.feature" version="3.1.1.v200907161031-7H6FM_DxtkM-7aeTHKEBbQqcZOZ2"/>
-      <feature id="org.eclipse.wst.xml_userdoc.feature" version="3.1.1.v200906020459-50FR7AkF77f7MESDKEF"/>
-      <feature id="org.eclipse.mylyn.bugzilla_feature" version="3.2.2.v20090912-0400-e3x"/>
-      <feature id="org.eclipse.mylyn.context_feature" version="3.2.2.v20090912-0400-e3x"/>
-      <feature id="org.eclipse.mylyn.ide_feature" version="3.2.2.v20090912-0400-e3x"/>
-      <feature id="org.eclipse.mylyn.java_feature" version="3.2.2.v20090912-0400-e3x"/>
-      <feature id="org.eclipse.mylyn.pde_feature" version="3.2.2.v20090912-0400-e3x"/>
-      <feature id="org.eclipse.mylyn.sdk_feature" version="3.2.2.v20090912-0400-e3x"/>
-      <feature id="org.eclipse.mylyn.team_feature" version="3.2.2.v20090912-0400-e3x"/>
-      <feature id="org.eclipse.mylyn.wikitext_feature" version="1.1.2.v20090912-0400-e3x"/>
-      <feature id="org.eclipse.mylyn_feature" version="3.2.2.v20090912-0400-e3x"/>
-   </features>
-
-
-</product>
diff --git a/eclipse/plugins/org.argeo.slc.ide.branding/plugin.xml b/eclipse/plugins/org.argeo.slc.ide.branding/plugin.xml
deleted file mode 100644 (file)
index 19b35d1..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-   <extension
-         id="product"
-         point="org.eclipse.core.runtime.products">
-      <product
-            application="org.eclipse.ui.ide.workbench"
-            name="Argeo SLC IDE">
-         <property
-               name="windowImages"
-               value="icons/argeo-icon-100104-256.png,icons/argeo-icon-100104-256.png,icons/argeo-icon-100104-256.png,icons/argeo-icon-100104-256.png,icons/argeo-icon-100104-256.png">
-         </property>
-         <property
-               name="aboutText"
-               value="%productBlurb">
-         </property>
-         <property
-               name="aboutImage"
-               value="eclipse_lg.gif">
-         </property>
-         <property
-               name="startupForegroundColor"
-               value="0066D0">
-         </property>
-         <property
-               name="startupProgressRect"
-               value="0,280,455,15">
-         </property>
-         <property
-               name="startupMessageRect"
-               value="7,220,441,20">
-         </property>
-         <property
-               name="appName"
-               value="Argeo SLC IDE">
-         </property>
-         <property
-               name="preferenceCustomization"
-               value="plugin_customization.ini">
-         </property>
-      </product>
-   </extension>
-</plugin>
diff --git a/eclipse/plugins/org.argeo.slc.ide.branding/plugin_customization.ini b/eclipse/plugins/org.argeo.slc.ide.branding/plugin_customization.ini
deleted file mode 100644 (file)
index 5344da0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP=true
-org.eclipse.ui/defaultPerspectiveId=org.argeo.slc.ide.ui.slcPerspective
diff --git a/eclipse/plugins/org.argeo.slc.ide.branding/slc-ide.target b/eclipse/plugins/org.argeo.slc.ide.branding/slc-ide.target
deleted file mode 100644 (file)
index cbd5555..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?pde version="3.5"?>
-
-<target name="SLC IDE">
-<locations>
-<location path="${system_property:user.home}/dev/tools/eclipse-3.5.1-delta-pack" type="Directory"/>
-<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
-<unit id="org.tmatesoft.svnkit.feature.group" version="1.3.1.6109"/>
-<unit id="com.sun.jna.feature.group" version="3.1.0"/>
-<unit id="com.collabnet.subversion.merge.feature.feature.group" version="1.10.0"/>
-<unit id="org.tigris.subversion.subclipse.feature.group" version="1.6.5"/>
-<unit id="org.tigris.subversion.subclipse.mylyn.feature.group" version="3.0.0"/>
-<unit id="org.tigris.subversion.clientadapter.feature.feature.group" version="1.6.4.1"/>
-<unit id="org.tigris.subversion.clientadapter.javahl.feature.feature.group" version="1.6.6"/>
-<unit id="org.tigris.subversion.subclipse.graph.feature.feature.group" version="1.0.7"/>
-<unit id="org.tigris.subversion.clientadapter.svnkit.feature.feature.group" version="1.6.4"/>
-<repository location="http://subclipse.tigris.org/update_1.6.x"/>
-</location>
-<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
-<unit id="org.eclipse.cvs.feature.group" version="1.1.101.R35x_v20090811-7E79FEd9KKF5H2YDWFLLBL01A16"/>
-<unit id="org.eclipse.mylyn.ide_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
-<unit id="org.eclipse.mylyn.java_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
-<unit id="org.eclipse.mylyn.pde_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
-<unit id="org.eclipse.mylyn.team_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
-<unit id="org.eclipse.mylyn.bugzilla_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
-<unit id="org.eclipse.mylyn_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
-<unit id="org.eclipse.mylyn.context_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
-<unit id="org.eclipse.mylyn.wikitext_feature.feature.group" version="1.1.2.v20090912-0400-e3x"/>
-<unit id="org.eclipse.equinox.sdk.feature.group" version="3.5.1.r351_v20090901-7G7MAA7lQiEeE7LKsaYgOK58fdAa"/>
-<unit id="org.eclipse.pde.feature.group" version="3.5.1.R35x_v20090811-7Z7_F9zFDX-aT6Ywvh8_S93"/>
-<unit id="org.eclipse.rse.feature.group" version="3.1.1.v200907301400-7L5AE8wqaHPUdsOqKFUpxnbxGiz-"/>
-<unit id="org.eclipse.tm.terminal.sdk.feature.group" version="3.0.1.v200907301400-7N-FBaC5OqdP-0Zr1iqaZNOEG"/>
-<unit id="org.eclipse.emf.sdk.feature.group" version="2.5.0.v200906151043"/>
-<unit id="org.eclipse.emf.compare.sdk.feature.group" version="1.0.1.v200909161031"/>
-<unit id="org.eclipse.gmf.sdk.feature.group" version="2.2.1.v20090814-1000-7C7F1BLxlfAqjMDHunFV5S-_YY-Q"/>
-<unit id="org.eclipse.xsd.sdk.feature.group" version="2.5.0.v200906151043"/>
-<unit id="org.eclipse.jdt.feature.group" version="3.5.1.r351_v20090810-0600-7r88FEoFI0WTo6Az-1qFRHm37ChJ"/>
-<unit id="org.eclipse.wst.xml_ui.feature.feature.group" version="3.1.1.v200907161031-7H6FM_DxtkM-7aeTHKEBbQqcZOZ2"/>
-<unit id="org.eclipse.wst.jsdt.feature.feature.group" version="1.1.2.v200908101420-77-FGCCcNBC-BhLcE_Pm"/>
-<unit id="org.eclipse.wst.common.fproj.feature.group" version="3.1.1.v200908111817-37718s733L3J555J5H"/>
-<unit id="org.eclipse.jst.common.fproj.enablement.jdt.feature.group" version="3.1.1.v200908111817-37718s733L3J555J5H"/>
-<unit id="org.eclipse.wst.web_ui.feature.feature.group" version="3.1.1.v200908120400-7R77FSpEVw2xXR0CtKvX6bG6a2qU"/>
-<unit id="org.eclipse.wst.xsl.feature.feature.group" version="1.0.2.v200908271520-7R7T8sFIhIehWg454rq_U1"/>
-<unit id="org.eclipse.jst.server_ui.feature.feature.group" version="3.1.1.v20090817-7A2FBa9xFaGovXGKcCWMK2355"/>
-<unit id="org.eclipse.jst.web_ui.feature.feature.group" version="3.1.1.v200908121609-7E77FBfDlwYa_9sdy2q77doi14gl"/>
-<repository location="http://download.eclipse.org/releases/galileo"/>
-</location>
-</locations>
-<implicitDependencies>
-<plugin id="org.eclipse.wst.xml.ui"/>
-</implicitDependencies>
-</target>
diff --git a/eclipse/plugins/org.argeo.slc.ide.branding/splash.bmp b/eclipse/plugins/org.argeo.slc.ide.branding/splash.bmp
deleted file mode 100644 (file)
index ee502f3..0000000
Binary files a/eclipse/plugins/org.argeo.slc.ide.branding/splash.bmp and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/.classpath b/eclipse/plugins/org.argeo.slc.ide.ui/.classpath
deleted file mode 100644 (file)
index b0a38d8..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="src" path="src/main/java"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/.project b/eclipse/plugins/org.argeo.slc.ide.ui/.project
deleted file mode 100644 (file)
index ad44979..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<projectDescription>\r
-       <name>org.argeo.slc.ide.ui</name>\r
-       <comment></comment>\r
-       <projects>\r
-       </projects>\r
-       <buildSpec>\r
-               <buildCommand>\r
-                       <name>org.eclipse.jdt.core.javabuilder</name>\r
-                       <arguments>\r
-                       </arguments>\r
-               </buildCommand>\r
-               <buildCommand>\r
-                       <name>org.eclipse.pde.ManifestBuilder</name>\r
-                       <arguments>\r
-                       </arguments>\r
-               </buildCommand>\r
-               <buildCommand>\r
-                       <name>org.eclipse.pde.SchemaBuilder</name>\r
-                       <arguments>\r
-                       </arguments>\r
-               </buildCommand>\r
-       </buildSpec>\r
-       <natures>\r
-               <nature>org.eclipse.pde.PluginNature</nature>\r
-               <nature>org.eclipse.jdt.core.javanature</nature>\r
-       </natures>\r
-</projectDescription>\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.argeo.slc.ide.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 05eb256..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#Fri Aug 29 11:26:23 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.argeo.slc.ide.ui/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 0ba5aa7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SLC IDE UI
-Bundle-SymbolicName: org.argeo.slc.ide.ui;singleton:=true
-Bundle-Version: 1.1.3.SNAPSHOT
-Bundle-Activator: org.argeo.slc.ide.ui.SlcIdeUiPlugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.debug.core,
- org.eclipse.jdt.launching,
- org.eclipse.debug.ui,
- org.eclipse.jdt.core,
- org.eclipse.ui.console,
- org.eclipse.jdt.debug.ui,
- org.eclipse.ui.ide,
- org.eclipse.core.variables,
- org.eclipse.pde.build,
- org.eclipse.pde.ui;bundle-version="3.4.0",
- org.eclipse.jdt.ui;bundle-version="3.4.2"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Vendor: Argeo
-Bundle-ActivationPolicy: lazy
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/build.properties b/eclipse/plugins/org.argeo.slc.ide.ui/build.properties
deleted file mode 100644 (file)
index 3cfd516..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/main/java/\r
-bin.includes = META-INF/,\\r
-               .,\\r
-               plugin.xml,\\r
-               icons/\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/icons/argeo-icon-100104-256.png b/eclipse/plugins/org.argeo.slc.ide.ui/icons/argeo-icon-100104-256.png
deleted file mode 100644 (file)
index a9af088..0000000
Binary files a/eclipse/plugins/org.argeo.slc.ide.ui/icons/argeo-icon-100104-256.png and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/icons/eclipse-launch.gif b/eclipse/plugins/org.argeo.slc.ide.ui/icons/eclipse-launch.gif
deleted file mode 100644 (file)
index 4b42e57..0000000
Binary files a/eclipse/plugins/org.argeo.slc.ide.ui/icons/eclipse-launch.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/icons/slc-launch.gif b/eclipse/plugins/org.argeo.slc.ide.ui/icons/slc-launch.gif
deleted file mode 100644 (file)
index b8ca14a..0000000
Binary files a/eclipse/plugins/org.argeo.slc.ide.ui/icons/slc-launch.gif and /dev/null differ
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/plugin.xml b/eclipse/plugins/org.argeo.slc.ide.ui/plugin.xml
deleted file mode 100644 (file)
index 158d007..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<?eclipse version="3.2"?>\r
-<plugin>\r
-<extension \r
-       point="org.eclipse.ui.preferencePages"> \r
-      <page \r
-         id="org.argeo.slc.ide.ui.mainPreferencePage" \r
-         name="SLC" \r
-         class="org.argeo.slc.ide.ui.SlcMainPreferencePage"> \r
-       </page> \r
-</extension> \r
-<extension\r
-      point="org.eclipse.ui.perspectives">\r
-   <perspective\r
-         class="org.argeo.slc.ide.ui.SlcPerspectiveFactory"\r
-         icon="icons/argeo-icon-100104-256.png"\r
-         id="org.argeo.slc.ide.ui.slcPerspective"\r
-         name="SLC">\r
-   </perspective>\r
-</extension>\r
-<extension\r
-      point="org.eclipse.debug.ui.launchShortcuts">\r
-   <shortcut\r
-         class="org.argeo.slc.ide.ui.launch.osgi.EclipseBootLaunchShortcut"\r
-         icon="icons/eclipse-launch.gif"\r
-         id="org.argeo.slc.ide.ui.eclipseBootLaunchShortcut"\r
-         label="Eclipse Boot (RCP)"\r
-         modes="run,debug">\r
-         <contextualLaunch>\r
-            <enablement>\r
-            <with variable="selection">\r
-               <count value="1"/>\r
-               <iterate>\r
-                 <or>\r
-                   <test property="org.eclipse.debug.ui.matchesPattern" value="*.properties"/>\r
-                   <test property="org.eclipse.debug.ui.matchesPattern" value="config.ini"/>\r
-                 </or>\r
-                </iterate>\r
-             </with>\r
-           </enablement>\r
-         </contextualLaunch>         \r
-   </shortcut>\r
-   <shortcut\r
-         class="org.argeo.slc.ide.ui.launch.osgi.OsgiBootLaunchShortcut"\r
-         icon="icons/slc-launch.gif"\r
-         id="org.argeo.slc.ide.ui.osgiBootLaunchShortcut"\r
-         label="OSGi Boot (Equinox, RAP)"\r
-         modes="run,debug">\r
-         <contextualLaunch>\r
-            <enablement>\r
-            <with variable="selection">\r
-               <count value="1"/>\r
-               <iterate>\r
-                 <or>\r
-                   <test property="org.eclipse.debug.ui.matchesPattern" value="*.properties"/>\r
-                   <test property="org.eclipse.debug.ui.matchesPattern" value="config.ini"/>\r
-                 </or>\r
-                </iterate>\r
-             </with>\r
-           </enablement>\r
-         </contextualLaunch>         \r
-   </shortcut>\r
-</extension>\r
-  <extension\r
-         point="org.eclipse.debug.core.launchConfigurationTypes">\r
-      <launchConfigurationType\r
-            id="org.argeo.slc.ide.ui.OsgiBootEquinoxLauncher"\r
-            name="OSGi Boot Equinox"\r
-            delegate="org.argeo.slc.ide.ui.launch.osgi.OsgiBootEquinoxLaunchConfiguration"\r
-            modes="run, debug"\r
-            sourceLocatorId="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"\r
-            sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer"/>\r
-      <launchConfigurationType\r
-            id="org.argeo.slc.ide.ui.EclipseBootLauncher"\r
-            name="Eclipse Boot"\r
-            delegate="org.argeo.slc.ide.ui.launch.osgi.EclipseBootLaunchConfiguration"\r
-            modes="run, debug"\r
-            sourceLocatorId="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"\r
-            sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer"/>\r
-   </extension>\r
-  <extension\r
-         point="org.eclipse.debug.ui.launchConfigurationTabGroups">\r
-      <launchConfigurationTabGroup\r
-            type="org.argeo.slc.ide.ui.OsgiBootEquinoxLauncher"\r
-            class="org.argeo.slc.ide.ui.launch.osgi.OsgiBootLauncherTabGroup"\r
-            id="org.argeo.slc.ide.ui.OsgiBootLauncherTabGroup">\r
-      </launchConfigurationTabGroup>\r
-      <launchConfigurationTabGroup\r
-            type="org.argeo.slc.ide.ui.EclipseBootLauncher"\r
-            class="org.argeo.slc.ide.ui.launch.osgi.EclipseBootLauncherTabGroup"\r
-            id="org.argeo.slc.ide.ui.EclipseBootLauncherTabGroup">\r
-      </launchConfigurationTabGroup>\r
-  </extension>\r
-   <extension\r
-         point="org.eclipse.debug.ui.launchConfigurationTypeImages">\r
-      <launchConfigurationTypeImage\r
-            icon="icons/slc-launch.gif"\r
-            configTypeID="org.argeo.slc.ide.ui.OsgiBootEquinoxLauncher"\r
-            id="org.argeo.slc.ide.ui.OsgiBootEquinoxLauncherImage">\r
-      </launchConfigurationTypeImage>\r
-      <launchConfigurationTypeImage\r
-            icon="icons/eclipse-launch.gif"\r
-            configTypeID="org.argeo.slc.ide.ui.EclipseBootLauncher"\r
-            id="org.argeo.slc.ide.ui.EclipseBootLauncherImage">\r
-      </launchConfigurationTypeImage>\r
-   </extension>\r
-</plugin>\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/DeployedSlcSystem.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/DeployedSlcSystem.java
deleted file mode 100644 (file)
index 8992432..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.argeo.slc.ide.ui;\r
-\r
-import java.io.File;\r
-import java.io.IOException;\r
-import java.util.List;\r
-import java.util.Vector;\r
-\r
-import org.eclipse.core.runtime.CoreException;\r
-import org.eclipse.jdt.launching.IVMInstall;\r
-import org.eclipse.jdt.launching.JavaRuntime;\r
-\r
-public class DeployedSlcSystem implements SlcSystem {\r
-       private File baseDir;\r
-       private String relLibDir = "lib";\r
-\r
-       public DeployedSlcSystem(String baseDirPath) {\r
-               try {\r
-                       this.baseDir = new File(baseDirPath).getCanonicalFile();\r
-               } catch (IOException e) {\r
-                       throw new RuntimeException("Cannot get path for " + baseDirPath, e);\r
-               }\r
-       }\r
-\r
-       public String[] getClasspath() throws CoreException {\r
-               List<String> classpath = new Vector<String>();\r
-               File libDir = new File(baseDir.getPath() + File.separator + relLibDir);\r
-               File[] files = libDir.listFiles();\r
-               for (File file : files) {\r
-                       try {\r
-                               classpath.add(file.getCanonicalPath());\r
-                       } catch (IOException e) {\r
-                               throw new RuntimeException("Cannot get path for " + file, e);\r
-                       }\r
-               }\r
-               return classpath.toArray(new String[classpath.size()]);\r
-       }\r
-\r
-       public IVMInstall getVmInstall() throws CoreException {\r
-               return JavaRuntime.getDefaultVMInstall();\r
-       }\r
-\r
-       public String getAntHome() {\r
-               return baseDir.getPath();\r
-       }\r
-\r
-       public String getJavaLibraryPath() {\r
-               return baseDir.getPath() + File.separator + "bin";\r
-       }\r
-\r
-}\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/EmbeddedSlcSystem.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/EmbeddedSlcSystem.java
deleted file mode 100644 (file)
index e2414e0..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.argeo.slc.ide.ui;
-
-import org.argeo.slc.ide.ui.launch.preferences.SlcLaunchPreferencePage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-
-public class EmbeddedSlcSystem implements SlcSystem {
-       private final IJavaProject project;
-
-       public EmbeddedSlcSystem(IJavaProject project) {
-               this.project = project;
-       }
-
-       public String[] getClasspath() throws CoreException {
-               return JavaRuntime.computeDefaultRuntimeClassPath(project);
-       }
-
-       public String getJavaLibraryPath() {
-               String javaLibPath = SlcIdeUiPlugin.getDefault()
-                               .getPreferenceStore().getString(
-                                               SlcLaunchPreferencePage.PREF_SLC_RUNTIME_LOCATION);
-               if (javaLibPath == null || javaLibPath.equals(""))
-                       return null;
-               else
-                       return javaLibPath;
-       }
-
-       public IVMInstall getVmInstall() throws CoreException {
-               return JavaRuntime.getVMInstall(project);
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcIdeUiPlugin.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcIdeUiPlugin.java
deleted file mode 100644 (file)
index 088b4f4..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-package org.argeo.slc.ide.ui;\r
-\r
-import java.net.URL;\r
-\r
-import org.eclipse.core.resources.IResource;\r
-import org.eclipse.core.runtime.CoreException;\r
-import org.eclipse.debug.core.DebugEvent;\r
-import org.eclipse.debug.core.DebugPlugin;\r
-import org.eclipse.debug.core.IDebugEventSetListener;\r
-import org.eclipse.debug.core.ILaunch;\r
-import org.eclipse.debug.core.model.IProcess;\r
-import org.eclipse.jface.resource.ImageDescriptor;\r
-import org.eclipse.jface.resource.ImageRegistry;\r
-import org.eclipse.swt.graphics.Image;\r
-import org.eclipse.ui.plugin.AbstractUIPlugin;\r
-import org.osgi.framework.BundleContext;\r
-\r
-/**\r
- * The activator class controls the plug-in life cycle\r
- */\r
-public class SlcIdeUiPlugin extends AbstractUIPlugin {\r
-\r
-       // The plug-in ID\r
-       public static final String ID = "org.argeo.slc.ide.ui";\r
-\r
-       // The shared instance\r
-       private static SlcIdeUiPlugin plugin;\r
-\r
-       /**\r
-        * The constructor\r
-        */\r
-       public SlcIdeUiPlugin() {\r
-       }\r
-\r
-       @Override\r
-       public void start(BundleContext context) throws Exception {\r
-               super.start(context);\r
-               plugin = this;\r
-               DebugPlugin.getDefault()\r
-                               .addDebugEventListener(new DebugEventListener());\r
-       }\r
-\r
-       @Override\r
-       public void stop(BundleContext context) throws Exception {\r
-               plugin = null;\r
-               super.stop(context);\r
-       }\r
-\r
-       /**\r
-        * Returns the shared instance\r
-        * \r
-        * @return the shared instance\r
-        */\r
-       public static SlcIdeUiPlugin getDefault() {\r
-               return plugin;\r
-       }\r
-\r
-       public Image getImage(String relativeURL) {\r
-               ImageRegistry imageRegistry = getImageRegistry();\r
-               Image image = imageRegistry.get(relativeURL);\r
-               if (image == null) {\r
-                       URL imageURL = getBundle().getEntry(relativeURL);\r
-                       ImageDescriptor descriptor = ImageDescriptor\r
-                                       .createFromURL(imageURL);\r
-                       image = descriptor.createImage();\r
-                       imageRegistry.put(relativeURL, image);\r
-               }\r
-               return image;\r
-       }\r
-\r
-       protected static class DebugEventListener implements IDebugEventSetListener {\r
-               public void handleDebugEvents(DebugEvent[] events) {\r
-                       if (events == null)\r
-                               return;\r
-\r
-                       for (int i = 0; i < events.length; i++) {\r
-                               DebugEvent event = events[i];\r
-                               if (event == null)\r
-                                       continue;\r
-                               Object source = event.getSource();\r
-                               if (source instanceof IProcess\r
-                                               && event.getKind() == DebugEvent.TERMINATE) {\r
-                                       IProcess process = (IProcess) source;\r
-                                       if (process == null)\r
-                                               continue;\r
-                                       ILaunch launch = process.getLaunch();\r
-                                       if (launch != null)\r
-                                               refreshOsgiBootLaunch(launch);\r
-\r
-                               }\r
-                       }\r
-               }\r
-\r
-               protected void refreshOsgiBootLaunch(ILaunch launch) {\r
-                       try {\r
-                               if (launch == null)\r
-                                       return;\r
-                               IResource[] resources = launch.getLaunchConfiguration()\r
-                                               .getMappedResources();\r
-                               if (resources == null)\r
-                                       return;\r
-                               if (resources.length > 0) {\r
-                                       IResource propertiesFile = resources[0];\r
-                                       if (propertiesFile.getParent() == null)\r
-                                               return;\r
-                                       propertiesFile.getParent().refreshLocal(\r
-                                                       IResource.DEPTH_INFINITE, null);\r
-                                       // System.out.println("Refreshed "\r
-                                       // + propertiesFile.getParent());\r
-                               }\r
-                       } catch (CoreException e) {\r
-                               e.printStackTrace();\r
-                       }\r
-\r
-               }\r
-\r
-       }\r
-\r
-}\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcMainPreferencePage.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcMainPreferencePage.java
deleted file mode 100644 (file)
index d091715..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.argeo.slc.ide.ui;\r
-\r
-import org.eclipse.jface.preference.FieldEditorPreferencePage;\r
-import org.eclipse.ui.IWorkbench;\r
-import org.eclipse.ui.IWorkbenchPreferencePage;\r
-\r
-public class SlcMainPreferencePage extends FieldEditorPreferencePage implements\r
-               IWorkbenchPreferencePage {\r
-       public SlcMainPreferencePage() {\r
-//             IPreferenceStore store = SlcIdePlugin.getDefault().getPreferenceStore();\r
-//             setPreferenceStore(store);\r
-               setDescription("Argeo SLC Preferences");\r
-       }\r
-\r
-       @Override\r
-       protected void createFieldEditors() {\r
-//             addField(new DirectoryFieldEditor(PREF_SLC_RUNTIME_LOCATION,\r
-//                             "SLC Runtime", getFieldEditorParent()));\r
-//             addField(new DirectoryFieldEditor(PREF_EMBEDDED_JAVA_LIBRARY_PATH,\r
-//                             "Embedded Java Library Path", getFieldEditorParent()));\r
-       }\r
-\r
-       public void init(IWorkbench workbench) {\r
-       }\r
-\r
-}\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcPerspectiveFactory.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcPerspectiveFactory.java
deleted file mode 100644 (file)
index 7c0084e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.argeo.slc.ide.ui;\r
-\r
-import org.eclipse.jdt.ui.JavaUI;\r
-import org.eclipse.ui.IFolderLayout;\r
-import org.eclipse.ui.IPageLayout;\r
-import org.eclipse.ui.IPerspectiveFactory;\r
-import org.eclipse.ui.console.IConsoleConstants;\r
-\r
-public class SlcPerspectiveFactory implements IPerspectiveFactory {\r
-\r
-       public void createInitialLayout(IPageLayout layout) {\r
-               // Get the editor area.\r
-               String editorArea = layout.getEditorArea();\r
-\r
-               IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 0.25f,\r
-                       editorArea);\r
-               topLeft.addView(JavaUI.ID_PACKAGES);\r
-\r
-               IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.66f,\r
-                               editorArea);\r
-               bottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);\r
-               bottom.addView(IPageLayout.ID_TASK_LIST);\r
-               \r
-               layout.addActionSet("org.eclipse.debug.ui.launchActionSet");\r
-       }\r
-\r
-}\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcSystem.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcSystem.java
deleted file mode 100644 (file)
index ff797c6..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.argeo.slc.ide.ui;\r
-\r
-import org.eclipse.core.runtime.CoreException;\r
-import org.eclipse.jdt.launching.IVMInstall;\r
-\r
-public interface SlcSystem {\r
-       public String[] getClasspath() throws CoreException;\r
-       public String getJavaLibraryPath();\r
-       public IVMInstall getVmInstall() throws CoreException;\r
-}\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLaunchConfiguration.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLaunchConfiguration.java
deleted file mode 100644 (file)
index c45005f..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.argeo.slc.ide.ui.launch.osgi;
-
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.argeo.slc.ide.ui.SlcIdeUiPlugin;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.pde.launching.EclipseApplicationLaunchConfiguration;
-
-/** OSGiBoot launch configuration. */
-public class EclipseBootLaunchConfiguration extends
-               EclipseApplicationLaunchConfiguration {
-       public final static String ID = SlcIdeUiPlugin.ID + ".EclipseBootLauncher";
-
-       @Override
-       public void launch(ILaunchConfiguration configuration, String mode,
-                       ILaunch launch, IProgressMonitor monitor) throws CoreException {
-               super.launch(configuration, mode, launch, monitor);
-
-               // System.out.println("targetBundles="
-               // + configuration.getAttribute(
-               // IPDELauncherConstants.SELECTED_TARGET_PLUGINS, ""));
-               // System.out.println("workspaceBundles="
-               // + configuration.getAttribute(
-               // IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS, ""));
-
-               // Refresh resources before launching
-               final IFile propertiesFile = (IFile) configuration.getMappedResources()[0];
-               propertiesFile.getParent().refreshLocal(IResource.DEPTH_INFINITE,
-                               monitor);
-       }
-
-       @SuppressWarnings("unchecked")
-       @Override
-       protected void preLaunchCheck(ILaunchConfiguration configuration,
-                       ILaunch launch, IProgressMonitor monitor) throws CoreException {
-               ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy();
-               OsgiLaunchHelper.updateLaunchConfiguration(wc, true);
-               wc.doSave();
-               Map<String, ?> attrs = new TreeMap<String, Object>(
-                               (Map<String, String>) wc.getAttributes());
-               OsgiLaunchHelper.debug("WC " + wc);
-               for (String key : attrs.keySet())
-                       OsgiLaunchHelper.debug(key + "=" + attrs.get(key));
-
-               super.preLaunchCheck(configuration, launch, monitor);
-
-               // Note that if a Java project contains a build.properties it has to
-               // declare the sources otherwise it will be skipped in the generation of
-               // the dev.properties file!
-
-               // for(Object bundleId:fAllBundles.keySet()){
-               // System.out.println(bundleId+"="+fAllBundles.get(bundleId));
-               // }
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLaunchShortcut.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLaunchShortcut.java
deleted file mode 100644 (file)
index aa7f861..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.argeo.slc.ide.ui.launch.osgi;
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.pde.ui.launcher.EclipseLaunchShortcut;
-
-/**
- * Launch shortcut simplifying the launch of an Eclipse application (typically
- * an RCP).
- */
-public class EclipseBootLaunchShortcut extends EclipseLaunchShortcut implements
-               OsgiLauncherConstants {
-       private StringBuffer name = null;
-       private IFile propertiesFile = null;
-
-       @Override
-       protected String getLaunchConfigurationTypeName() {
-               return EclipseBootLaunchConfiguration.ID;
-       }
-
-       @Override
-       public void launch(ISelection selection, String mode) {
-               // we assume that only one file is selected
-               IStructuredSelection sSelection = (IStructuredSelection) selection;
-               Iterator<?> it = sSelection.iterator();
-               propertiesFile = (IFile) it.next();
-
-               name = new StringBuffer(OsgiLaunchHelper.extractName(propertiesFile));
-
-               super.launch(selection, mode);
-       }
-
-       @Override
-       protected void initializeConfiguration(ILaunchConfigurationWorkingCopy wc) {
-               IResource[] resources = { propertiesFile };
-               wc.setMappedResources(resources);
-               super.initializeConfiguration(wc);
-
-               OsgiLaunchHelper.setDefaults(wc, true);
-               wc.setAttribute(
-                               IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
-                               OsgiLaunchHelper.findWorkingDirectory(propertiesFile));
-
-               OsgiLaunchHelper.updateLaunchConfiguration(wc, true);
-       }
-
-       protected String getName(ILaunchConfigurationType type) {
-               if (name != null && !name.toString().trim().equals(""))
-                       return DebugPlugin.getDefault().getLaunchManager()
-                                       .generateLaunchConfigurationName(name.toString());
-               else
-                       return DebugPlugin.getDefault().getLaunchManager()
-                                       .generateLaunchConfigurationName("SLC");
-       }
-
-       @Override
-       protected boolean isGoodMatch(ILaunchConfiguration configuration) {
-               if (name != null) {
-                       return name.toString().equals(configuration.getName());
-               }
-               return super.isGoodMatch(configuration);
-       }
-}
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLauncherTabGroup.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLauncherTabGroup.java
deleted file mode 100644 (file)
index 53794ed..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.argeo.slc.ide.ui.launch.osgi;
-
-import org.eclipse.debug.ui.CommonTab;
-import org.eclipse.debug.ui.EnvironmentTab;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.pde.ui.launcher.EclipseLauncherTabGroup;
-import org.eclipse.pde.ui.launcher.MainTab;
-import org.eclipse.pde.ui.launcher.OSGiSettingsTab;
-import org.eclipse.pde.ui.launcher.PluginsTab;
-import org.eclipse.pde.ui.launcher.TracingTab;
-
-/** Definition of the set of tabs used in Eclipse Boot launch configuration UI. */
-public class EclipseBootLauncherTabGroup extends EclipseLauncherTabGroup {
-
-       @Override
-       public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
-               ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
-                               new OsgiBootMainTab(true),
-                               new MainTab(),
-                               new PluginsTab(),
-                               // new PluginsTab() {
-                               // private boolean activating = false;
-                               //
-                               // @Override
-                               // public void performApply(
-                               // ILaunchConfigurationWorkingCopy config) {
-                               // super.performApply(config);
-                               // if (activating) {
-                               // try {
-                               // config.doSave();
-                               // } catch (CoreException e) {
-                               // e.printStackTrace();
-                               // }
-                               // activating = false;
-                               // }
-                               // }
-                               //
-                               // @Override
-                               // public void activated(
-                               // ILaunchConfigurationWorkingCopy workingCopy) {
-                               // activating = true;
-                               // }
-                               // },
-                               new OSGiSettingsTab(), new EnvironmentTab(), new TracingTab(),
-                               new CommonTab() };
-               setTabs(tabs);
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootEquinoxLaunchConfiguration.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootEquinoxLaunchConfiguration.java
deleted file mode 100644 (file)
index 19cdee1..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.argeo.slc.ide.ui.launch.osgi;
-
-import org.argeo.slc.ide.ui.SlcIdeUiPlugin;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.pde.launching.EquinoxLaunchConfiguration;
-
-/** OSGiBoot launch configuration. */
-public class OsgiBootEquinoxLaunchConfiguration extends
-               EquinoxLaunchConfiguration {
-       public final static String ID = SlcIdeUiPlugin.ID
-                       + ".OsgiBootEquinoxLauncher";
-
-       @Override
-       public void launch(ILaunchConfiguration configuration, String mode,
-                       ILaunch launch, IProgressMonitor monitor) throws CoreException {
-               super.launch(configuration, mode, launch, monitor);
-
-//             System.out.println("targetBundles="
-//                             + configuration.getAttribute(
-//                                             IPDELauncherConstants.TARGET_BUNDLES, ""));
-//             System.out.println("workspaceBundles="
-//                             + configuration.getAttribute(
-//                                             IPDELauncherConstants.WORKSPACE_BUNDLES, ""));
-
-               // Refresh resources before launching
-               final IFile propertiesFile = (IFile) configuration.getMappedResources()[0];
-               propertiesFile.getParent().refreshLocal(IResource.DEPTH_INFINITE,
-                               monitor);
-       }
-
-       @Override
-       protected void preLaunchCheck(ILaunchConfiguration configuration,
-                       ILaunch launch, IProgressMonitor monitor) throws CoreException {
-               // System.out.println("Launching... " + launch);
-               ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy();
-               OsgiLaunchHelper.updateLaunchConfiguration(wc, false);
-               wc.doSave();
-               super.preLaunchCheck(configuration, launch, monitor);
-
-               // Note that if a Java project contains a build.properties it has to
-               // declare the sources otherwise it will be skipped in the generation of
-               // the dev.properties file!
-
-               // for(Object bundleId:fAllBundles.keySet()){
-               // System.out.println(bundleId+"="+fAllBundles.get(bundleId));
-               // }
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLaunchShortcut.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLaunchShortcut.java
deleted file mode 100644 (file)
index b73b612..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.argeo.slc.ide.ui.launch.osgi;
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.pde.ui.launcher.OSGiLaunchShortcut;
-
-/** Launch shortcut simplifying the launch of a pure OSGi runtime */
-public class OsgiBootLaunchShortcut extends OSGiLaunchShortcut implements
-               OsgiLauncherConstants {
-       private StringBuffer name = null;
-       private IFile propertiesFile = null;
-
-       @Override
-       protected String getLaunchConfigurationTypeName() {
-               return OsgiBootEquinoxLaunchConfiguration.ID;
-       }
-
-       @Override
-       public void launch(ISelection selection, String mode) {
-               // we assume that only one file is selected
-               IStructuredSelection sSelection = (IStructuredSelection) selection;
-               Iterator<?> it = sSelection.iterator();
-               propertiesFile = (IFile) it.next();
-
-               name = new StringBuffer(OsgiLaunchHelper.extractName(propertiesFile));
-
-               super.launch(selection, mode);
-       }
-
-       @Override
-       protected void initializeConfiguration(ILaunchConfigurationWorkingCopy wc) {
-               IResource[] resources = { propertiesFile };
-               wc.setMappedResources(resources);
-               super.initializeConfiguration(wc);
-
-               OsgiLaunchHelper.setDefaults(wc, true);
-
-               wc.setAttribute(
-                               IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
-                               OsgiLaunchHelper.findWorkingDirectory(propertiesFile));
-
-               OsgiLaunchHelper.updateLaunchConfiguration(wc, false);
-       }
-
-       protected String getName(ILaunchConfigurationType type) {
-               if (name != null && !name.toString().trim().equals(""))
-                       return DebugPlugin.getDefault().getLaunchManager()
-                                       .generateLaunchConfigurationName(name.toString());
-               else
-                       return DebugPlugin.getDefault().getLaunchManager()
-                                       .generateLaunchConfigurationName("SLC");
-       }
-
-       @Override
-       protected boolean isGoodMatch(ILaunchConfiguration configuration) {
-               if (name != null) {
-                       return name.toString().equals(configuration.getName());
-               }
-               return super.isGoodMatch(configuration);
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLauncherTabGroup.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLauncherTabGroup.java
deleted file mode 100644 (file)
index 0195aa8..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.argeo.slc.ide.ui.launch.osgi;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.CommonTab;
-import org.eclipse.debug.ui.EnvironmentTab;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.pde.ui.launcher.BundlesTab;
-import org.eclipse.pde.ui.launcher.OSGiLauncherTabGroup;
-import org.eclipse.pde.ui.launcher.OSGiSettingsTab;
-import org.eclipse.pde.ui.launcher.TracingTab;
-
-/** Definition of the set of tabs used in OSGi Boot launch configuration UI. */
-public class OsgiBootLauncherTabGroup extends OSGiLauncherTabGroup {
-
-       @Override
-       public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
-               ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
-                               new OsgiBootMainTab(false),
-                               new BundlesTab() {
-                                       private boolean activating = false;
-
-                                       @Override
-                                       public void performApply(
-                                                       ILaunchConfigurationWorkingCopy config) {
-                                               super.performApply(config);
-                                               if (activating) {
-                                                       try {
-                                                               config.doSave();
-                                                       } catch (CoreException e) {
-                                                               e.printStackTrace();
-                                                       }
-                                                       activating = false;
-                                               }
-                                       }
-
-                                       @Override
-                                       public void activated(
-                                                       ILaunchConfigurationWorkingCopy workingCopy) {
-                                               activating = true;
-                                       }
-                               }, new OSGiSettingsTab(), new EnvironmentTab(),
-                               new TracingTab(), new CommonTab() };
-               setTabs(tabs);
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootMainTab.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootMainTab.java
deleted file mode 100644 (file)
index 5e5ae50..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-package org.argeo.slc.ide.ui.launch.osgi;
-
-import org.argeo.slc.ide.ui.SlcIdeUiPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-/** Main tab of OSGiBoot launch configuration UI. */
-public class OsgiBootMainTab extends AbstractLaunchConfigurationTab implements
-               OsgiLauncherConstants {
-       private Listener listener = new Listener();
-
-       private Button syncBundles;
-       private Button clearDataDirectory;
-
-       private Button addJvmPaths;
-       private Text additionalVmArgs;
-
-       private Text additionalProgramArgs;
-
-       private final Boolean isEclipse;
-
-       public OsgiBootMainTab(Boolean isEclipse) {
-               super();
-               this.isEclipse = isEclipse;
-       }
-
-       public void createControl(Composite parent) {
-               Composite container = new Composite(parent, SWT.NONE);
-               container.setLayout(new GridLayout());
-               container.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-               createAdditionalProgramArgs(container);
-               createAdditionalVmArgumentBlock(container);
-               createAdvanced(container);
-               Dialog.applyDialogFont(container);
-               setControl(container);
-       }
-
-       /** Init UI for programs arguments */
-       protected void createAdditionalProgramArgs(Composite parent) {
-               Group container = new Group(parent, SWT.NONE);
-               container.setText("Additional Program Arguments");
-               GridLayout layout = new GridLayout();
-               layout.numColumns = 2;
-               container.setLayout(layout);
-               container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-               additionalProgramArgs = new Text(container, SWT.MULTI | SWT.WRAP
-                               | SWT.BORDER | SWT.V_SCROLL);
-               GridData gd = new GridData(GridData.FILL_BOTH);
-               gd.heightHint = 60;
-               gd.widthHint = 100;
-               gd.horizontalSpan = 2;
-               additionalProgramArgs.setLayoutData(gd);
-               additionalProgramArgs.addModifyListener(listener);
-       }
-
-       /** Init UI for VM arguments */
-       protected void createAdditionalVmArgumentBlock(Composite parent) {
-               Group container = new Group(parent, SWT.NONE);
-               container.setText("Additional VM Arguments");
-               GridLayout layout = new GridLayout();
-               layout.numColumns = 2;
-               container.setLayout(layout);
-               container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-               additionalVmArgs = new Text(container, SWT.MULTI | SWT.WRAP
-                               | SWT.BORDER | SWT.V_SCROLL);
-               GridData gd = new GridData(GridData.FILL_BOTH);
-               gd.heightHint = 60;
-               gd.widthHint = 100;
-               gd.horizontalSpan = 2;
-               additionalVmArgs.setLayoutData(gd);
-               additionalVmArgs.addModifyListener(listener);
-
-       }
-
-       /** Init UI for Advanced section */
-       protected void createAdvanced(Composite parent) {
-               Group container = new Group(parent, SWT.NONE);
-               container.setText("Advanced");
-               GridLayout layout = new GridLayout();
-               layout.numColumns = 2;
-               container.setLayout(layout);
-               container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-               syncBundles = new Button(container, SWT.CHECK);
-               syncBundles.addSelectionListener(listener);
-               new Label(container, SWT.NONE)
-                               .setText("Keep bundles in line with target platform and workspace (recommended)");
-               clearDataDirectory = new Button(container, SWT.CHECK);
-               clearDataDirectory.addSelectionListener(listener);
-               new Label(container, SWT.NONE)
-                               .setText("Clear data directory before launch");
-
-               addJvmPaths = new Button(container, SWT.CHECK);
-               addJvmPaths.addSelectionListener(listener);
-               new Label(container, SWT.NONE)
-                               .setText("Add workspace JVM paths as non-standard system properties");
-
-       }
-
-       public String getName() {
-               return "OSGi Boot";
-       }
-
-       @Override
-       public Image getImage() {
-               return SlcIdeUiPlugin.getDefault().getImage("icons/slc-launch.gif");
-       }
-
-       public void initializeFrom(ILaunchConfiguration configuration) {
-               // System.out.println("initializeFrom");
-               try {
-                       syncBundles.setSelection(configuration.getAttribute(
-                                       ATTR_SYNC_BUNDLES, true));
-                       clearDataDirectory.setSelection(configuration.getAttribute(
-                                       ATTR_CLEAR_DATA_DIRECTORY, false));
-
-                       additionalProgramArgs.setText(configuration.getAttribute(
-                                       ATTR_ADDITIONAL_PROGRAM_ARGS, ""));
-                       addJvmPaths.setSelection(configuration.getAttribute(
-                                       ATTR_ADD_JVM_PATHS, false));
-                       additionalVmArgs.setText(configuration.getAttribute(
-                                       ATTR_ADDITIONAL_VM_ARGS, ""));
-                       // readProperties(configuration);
-               } catch (CoreException e) {
-                       e.printStackTrace();
-               }
-       }
-
-       public void performApply(ILaunchConfigurationWorkingCopy configuration) {
-               // System.out.println("performApply");
-               configuration.setAttribute(ATTR_SYNC_BUNDLES,
-                               syncBundles.getSelection());
-               configuration.setAttribute(ATTR_CLEAR_DATA_DIRECTORY,
-                               clearDataDirectory.getSelection());
-
-               configuration.setAttribute(ATTR_ADDITIONAL_PROGRAM_ARGS,
-                               additionalProgramArgs.getText());
-               configuration.setAttribute(ATTR_ADDITIONAL_VM_ARGS,
-                               additionalVmArgs.getText());
-               configuration.setAttribute(ATTR_ADD_JVM_PATHS,
-                               addJvmPaths.getSelection());
-               // writeProperties(configuration);
-
-               OsgiLaunchHelper.updateLaunchConfiguration(configuration, isEclipse);
-       }
-
-       public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
-               // System.out.println("setDefaults");
-               configuration.setAttribute(ATTR_SYNC_BUNDLES, true);
-               configuration.setAttribute(ATTR_CLEAR_DATA_DIRECTORY, false);
-               configuration.setAttribute(ATTR_ADD_JVM_PATHS, false);
-               configuration.setAttribute(ATTR_ADDITIONAL_VM_ARGS, "-Xmx128m");
-               configuration.setAttribute(ATTR_ADDITIONAL_PROGRAM_ARGS, "-console");
-       }
-
-       @Override
-       public void activated(ILaunchConfigurationWorkingCopy workingCopy) {
-               initializeFrom(workingCopy);
-               try {
-                       workingCopy.doSave();
-               } catch (CoreException e) {
-                       e.printStackTrace();
-               }
-       }
-
-       @Override
-       public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) {
-               // do nothing
-       }
-
-       class Listener extends SelectionAdapter implements ModifyListener {
-               public void widgetSelected(SelectionEvent e) {
-                       // Object source = e.getSource();
-                       // setDirty(true);
-                       updateLaunchConfigurationDialog();
-               }
-
-               public void modifyText(ModifyEvent e) {
-                       // System.out.println("modifyText : " + e);
-                       // setDirty(true);
-                       updateLaunchConfigurationDialog();
-               }
-       }
-
-       // private void readProperties(ILaunchConfiguration configuration) {
-       // BufferedReader reader = null;
-       // try {
-       // IFile propertiesFile = (IFile) configuration.getMappedResources()[0];
-       // propertiesFile.refreshLocal(IResource.DEPTH_ONE, null);
-       // reader = new BufferedReader(new InputStreamReader(propertiesFile
-       // .getContents()));
-       // String line = null;
-       // StringBuffer buf = new StringBuffer("");
-       // while ((line = reader.readLine()) != null) {
-       // buf.append(line);
-       // buf.append("\n");
-       // }
-       // propertiesText.setText(buf.toString());
-       // } catch (CoreException e) {
-       // ErrorDialog.openError(Display.getCurrent().getActiveShell(),
-       // "Error", "Cannot read properties", e.getStatus());
-       // return;
-       // } catch (Exception e) {
-       // ErrorDialog.openError(Display.getCurrent().getActiveShell(),
-       // "Error", "Cannot read properties",
-       // new Status(IStatus.ERROR, SlcIdeUiPlugin.ID,
-       // e.getMessage(), e));
-       // return;
-       // } finally {
-       // if (reader != null)
-       // try {
-       // reader.close();
-       // } catch (IOException e) {
-       // // silent
-       // }
-       // }
-       //
-       // }
-       //
-       // private void writeProperties(ILaunchConfiguration configuration) {
-       // InputStream in = null;
-       // IFile propertiesFile = null;
-       // try {
-       // propertiesFile = (IFile) configuration.getMappedResources()[0];
-       // in = new ByteArrayInputStream(propertiesText.getText().getBytes());
-       // propertiesFile.setContents(in, true, true, null);
-       // propertiesFile.refreshLocal(IResource.DEPTH_ONE, null);
-       // } catch (CoreException e) {
-       // ErrorDialog.openError(Display.getCurrent().getActiveShell(),
-       // "Error", "Cannot write properties", e.getStatus());
-       // return;
-       // } catch (Exception e) {
-       // ErrorDialog.openError(Display.getCurrent().getActiveShell(),
-       // "Error", "Cannot write properties",
-       // new Status(IStatus.ERROR, SlcIdeUiPlugin.ID,
-       // e.getMessage(), e));
-       // return;
-       // } finally {
-       // if (in != null)
-       // try {
-       // in.close();
-       // } catch (IOException e) {
-       // // silent
-       // }
-       // }
-       //
-       // }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLaunchHelper.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLaunchHelper.java
deleted file mode 100644 (file)
index 54566b5..0000000
+++ /dev/null
@@ -1,550 +0,0 @@
-package org.argeo.slc.ide.ui.launch.osgi;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
-
-import org.argeo.slc.ide.ui.SlcIdeUiPlugin;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.variables.IStringVariableManager;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.IVMInstall2;
-import org.eclipse.jdt.launching.IVMInstallType;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.core.plugin.PluginRegistry;
-import org.eclipse.pde.internal.build.IPDEBuildConstants;
-import org.eclipse.pde.launching.IPDELauncherConstants;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Most of the actual logic is concentrated in this class which manipulates
- * {@link ILaunchConfigurationWorkingCopy}. Static method are used since the
- * shortcut and launch configuration classes are already extending PDE classes.
- */
-@SuppressWarnings("restriction")
-public class OsgiLaunchHelper implements OsgiLauncherConstants {
-       private static Boolean debug = true;
-
-       private final static String DEFAULT_DATA_DIR = "data";
-       private final static String DEFAULT_EXEC_DIR = "exec";
-       private final static String DEFAULT_VMARGS = "-Xmx256m";
-       private final static String DEFAULT_PROGRAM_ARGS = "-console";
-
-       /** Sets default values on this configuration. */
-       public static void setDefaults(ILaunchConfigurationWorkingCopy wc,
-                       Boolean isEclipse) {
-               try {
-                       if (isEclipse) {
-                               wc.setAttribute(IPDELauncherConstants.USE_DEFAULT, false);
-                               wc.setAttribute(IPDELauncherConstants.USE_PRODUCT, false);
-                       }
-
-                       wc.setAttribute(ATTR_ADD_JVM_PATHS, false);
-                       wc.setAttribute(ATTR_ADDITIONAL_VM_ARGS, DEFAULT_VMARGS);
-                       wc.setAttribute(ATTR_ADDITIONAL_PROGRAM_ARGS, DEFAULT_PROGRAM_ARGS);
-
-                       // Defaults
-                       String originalVmArgs = wc.getAttribute(
-                                       IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, "");
-                       wc.setAttribute(ATTR_DEFAULT_VM_ARGS, originalVmArgs);
-                       wc.setAttribute(IPDELauncherConstants.CONFIG_CLEAR_AREA, true);
-               } catch (CoreException e) {
-                       Shell shell = Display.getCurrent().getActiveShell();
-                       ErrorDialog.openError(shell, "Error",
-                                       "Cannot execute initalize configuration", e.getStatus());
-               }
-       }
-
-       /** Find the working directory based on this properties file. */
-       public static String findWorkingDirectory(IFile propertiesFile) {
-               try {
-                       IProject project = propertiesFile.getProject();
-                       IPath parent = propertiesFile.getProjectRelativePath()
-                                       .removeLastSegments(1);
-                       IFolder execFolder = project.getFolder(parent
-                                       .append(DEFAULT_EXEC_DIR));
-                       if (!execFolder.exists())
-                               execFolder.create(true, true, null);
-                       IFolder launchFolder = project.getFolder(execFolder
-                                       .getProjectRelativePath().append(
-                                                       extractName(propertiesFile)));
-                       if (!launchFolder.exists())
-                               launchFolder.create(true, true, null);
-                       return "${workspace_loc:"
-                                       + launchFolder.getFullPath().toString().substring(1) + "}";
-               } catch (Exception e) {
-                       e.printStackTrace();
-                       throw new RuntimeException("Cannot create working directory", e);
-               }
-       }
-
-       /** Extract the launch configuration name from the properties file. */
-       public static String extractName(IFile propertiesFile) {
-               IPath path = propertiesFile.getFullPath();
-               IPath pathNoExt = path.removeFileExtension();
-               return pathNoExt.segment(pathNoExt.segmentCount() - 1);
-
-       }
-
-       /** Expects properties file to be set as mapped resources */
-       public static void updateLaunchConfiguration(
-                       ILaunchConfigurationWorkingCopy wc, Boolean isEclipse) {
-               try {
-                       // Finds the properties file and load it
-                       IFile propertiesFile = (IFile) wc.getMappedResources()[0];
-                       propertiesFile.refreshLocal(IResource.DEPTH_ONE, null);
-                       Properties properties = readProperties(propertiesFile);
-
-                       // Extract information from the properties file
-                       List<String> bundlesToStart = new ArrayList<String>();
-                       Map<String, String> systemPropertiesToAppend = new HashMap<String, String>();
-                       String applicationId = interpretProperties(properties,
-                                       bundlesToStart, systemPropertiesToAppend);
-
-                       if (applicationId != null)
-                               wc.setAttribute(IPDELauncherConstants.APPLICATION,
-                                               applicationId);
-                       else {
-                               if (isEclipse)
-                                       throw new Exception("No application defined,"
-                                                       + " please set the 'eclipse.application' property"
-                                                       + " in the properties file");
-                       }
-
-                       // Define directories
-                       File workingDir = getWorkingDirectory(wc);
-                       File dataDir = new File(workingDir, DEFAULT_DATA_DIR);
-
-                       // Update the launch configuration accordingly
-                       updateLaunchConfiguration(wc, bundlesToStart,
-                                       systemPropertiesToAppend, dataDir.getAbsolutePath(),
-                                       isEclipse);
-               } catch (Exception e) {
-                       e.printStackTrace();
-                       Shell shell = SlcIdeUiPlugin.getDefault().getWorkbench()
-                                       .getActiveWorkbenchWindow().getShell();
-                       // Shell shell= Display.getCurrent().getActiveShell();
-                       ErrorDialog.openError(shell, "Error",
-                                       "Cannot prepare launch configuration",
-                                       new Status(IStatus.ERROR, SlcIdeUiPlugin.ID,
-                                                       e.getMessage(), e));
-                       return;
-               }
-       }
-
-       /**
-        * Actually modifies the launch configuration in order to reflect the
-        * current state read from the properties file and the launch configuration
-        * UI.
-        */
-       protected static void updateLaunchConfiguration(
-                       ILaunchConfigurationWorkingCopy wc, List<String> bundlesToStart,
-                       Map<String, String> systemPropertiesToAppend, String dataDir,
-                       Boolean isEclipse) throws CoreException {
-               // Convert bundle lists
-               final String targetBundles;
-               final String wkSpaceBundles;
-               if (wc.getAttribute(ATTR_SYNC_BUNDLES, true)) {
-                       StringBuffer tBuf = new StringBuffer();
-                       for (IPluginModelBase model : PluginRegistry.getExternalModels()) {
-                               tBuf.append(model.getBundleDescription().getSymbolicName());
-                               tBuf.append(',');
-                       }
-                       targetBundles = tBuf.toString();
-                       StringBuffer wBuf = new StringBuffer();
-                       models: for (IPluginModelBase model : PluginRegistry
-                                       .getWorkspaceModels()) {
-                               if (model.getBundleDescription() == null) {
-                                       System.err.println("No bundle description for " + model);
-                                       continue models;
-                               }
-                               wBuf.append(model.getBundleDescription().getSymbolicName());
-                               wBuf.append(',');
-                       }
-                       wkSpaceBundles = wBuf.toString();
-               } else {
-                       targetBundles = wc.getAttribute(targetBundlesAttr(isEclipse), "");
-                       wkSpaceBundles = wc.getAttribute(workspaceBundlesAttr(isEclipse),
-                                       "");
-               }
-               wc.setAttribute(targetBundlesAttr(isEclipse),
-                               convertBundleList(bundlesToStart, targetBundles));
-
-               wc.setAttribute(workspaceBundlesAttr(isEclipse),
-                               convertBundleList(bundlesToStart, wkSpaceBundles));
-
-               // Update other default information
-               wc.setAttribute(IPDELauncherConstants.DEFAULT_AUTO_START, false);
-
-               // VM arguments (system properties)
-               String defaultVmArgs = wc.getAttribute(
-                               OsgiLauncherConstants.ATTR_DEFAULT_VM_ARGS, "");
-               StringBuffer vmArgs = new StringBuffer(defaultVmArgs);
-
-               // Data dir system property
-               if (dataDir != null) {
-                       addSysProperty(vmArgs, OsgiLauncherConstants.ARGEO_OSGI_DATA_DIR,
-                                       dataDir);
-                       if (isEclipse) {
-                               wc.setAttribute(IPDELauncherConstants.LOCATION, dataDir);
-                       }
-               }
-
-               // Add locations of JVMs
-               if (wc.getAttribute(ATTR_ADD_JVM_PATHS, false))
-                       addVms(vmArgs);
-
-               // Add other system properties
-               for (String key : systemPropertiesToAppend.keySet())
-                       addSysProperty(vmArgs, key, systemPropertiesToAppend.get(key));
-
-               vmArgs.append(" ").append(wc.getAttribute(ATTR_ADDITIONAL_VM_ARGS, ""));
-
-               wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
-                               vmArgs.toString());
-
-               // Program arguments
-               StringBuffer progArgs = new StringBuffer("");
-               if (dataDir != null) {
-                       progArgs.append("-data ");
-                       progArgs.append(surroundSpaces(dataDir));
-
-                       if (wc.getAttribute(ATTR_CLEAR_DATA_DIRECTORY, false)) {
-                               File dataDirFile = new File(dataDir);
-                               deleteDir(dataDirFile);
-                               dataDirFile.mkdirs();
-                       }
-               }
-               String additionalProgramArgs = wc.getAttribute(
-                               OsgiLauncherConstants.ATTR_ADDITIONAL_PROGRAM_ARGS, "");
-               progArgs.append(' ').append(additionalProgramArgs);
-               wc.setAttribute(
-                               IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
-                               progArgs.toString());
-       }
-
-       /** The launch configuration attribute to use for target bundles */
-       protected static String targetBundlesAttr(Boolean isEclipse) {
-               return isEclipse ? IPDELauncherConstants.SELECTED_TARGET_PLUGINS
-                               : IPDELauncherConstants.TARGET_BUNDLES;
-       }
-
-       /** The launch configuration attribute to use for workspace bundles */
-       protected static String workspaceBundlesAttr(Boolean isEclipse) {
-               return isEclipse ? IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS
-                               : IPDELauncherConstants.WORKSPACE_BUNDLES;
-       }
-
-       /**
-        * Interprets special properties and register the others as system
-        * properties to append.
-        * 
-        * @return the application id defined by
-        *         {@link OsgiLauncherConstants#ECLIPSE_APPLICATION}, or null if not
-        *         found
-        */
-       protected static String interpretProperties(Properties properties,
-                       List<String> bundlesToStart,
-                       Map<String, String> systemPropertiesToAppend) {
-               String argeoOsgiStart = properties
-                               .getProperty(OsgiLauncherConstants.ARGEO_OSGI_START);
-               if (argeoOsgiStart != null) {
-                       StringTokenizer st = new StringTokenizer(argeoOsgiStart, ",");
-                       while (st.hasMoreTokens())
-                               bundlesToStart.add(st.nextToken());
-               }
-
-               String applicationId = null;
-               propKeys: for (Object keyObj : properties.keySet()) {
-                       String key = keyObj.toString();
-                       if (OsgiLauncherConstants.ARGEO_OSGI_START.equals(key))
-                               continue propKeys;
-                       else if (OsgiLauncherConstants.ARGEO_OSGI_BUNDLES.equals(key))
-                               continue propKeys;
-                       else if (OsgiLauncherConstants.ARGEO_OSGI_LOCATIONS.equals(key))
-                               continue propKeys;
-                       else if (OsgiLauncherConstants.OSGI_BUNDLES.equals(key))
-                               continue propKeys;
-                       else if (OsgiLauncherConstants.ECLIPSE_APPLICATION.equals(key))
-                               applicationId = properties.getProperty(key);
-                       else
-                               systemPropertiesToAppend.put(key, properties.getProperty(key));
-               }
-               return applicationId;
-       }
-
-       /** Adds a regular system property. */
-       protected static void addSysProperty(StringBuffer vmArgs, String key,
-                       String value) {
-               surroundSpaces(value);
-               String str = "-D" + key + "=" + value;
-               vmArgs.append(' ').append(str);
-       }
-
-       /** Adds JVMS registered in the workspace as special system properties. */
-       protected static void addVms(StringBuffer vmArgs) {
-               addVmSysProperty(vmArgs, "default", JavaRuntime.getDefaultVMInstall());
-               IVMInstallType[] vmTypes = JavaRuntime.getVMInstallTypes();
-               for (IVMInstallType vmType : vmTypes) {
-                       for (IVMInstall vmInstall : vmType.getVMInstalls()) {
-                               // printVm("", vmInstall);
-                               // properties based on name
-                               addVmSysProperty(vmArgs, vmInstall.getName(), vmInstall);
-                               if (vmInstall instanceof IVMInstall2) {
-                                       // properties based on version
-                                       IVMInstall2 vmInstall2 = (IVMInstall2) vmInstall;
-                                       String version = vmInstall2.getJavaVersion();
-                                       addVmSysProperty(vmArgs, version, vmInstall);
-
-                                       List<String> tokens = new ArrayList<String>();
-                                       StringTokenizer st = new StringTokenizer(version, ".");
-                                       while (st.hasMoreTokens())
-                                               tokens.add(st.nextToken());
-                                       if (tokens.size() >= 2)
-                                               addVmSysProperty(vmArgs,
-                                                               tokens.get(0) + "." + tokens.get(1), vmInstall);
-                               }
-                       }
-               }
-
-       }
-
-       /** Adds a special system property pointing to one of the registered JVMs. */
-       protected static void addVmSysProperty(StringBuffer vmArgs, String suffix,
-                       IVMInstall vmInstall) {
-               addSysProperty(vmArgs, OsgiLauncherConstants.VMS_PROPERTY_PREFIX + "."
-                               + suffix, vmInstall.getInstallLocation().getPath());
-       }
-
-       /** Surround the string with quotes if it contains spaces. */
-       protected static String surroundSpaces(String str) {
-               if (str.indexOf(' ') >= 0)
-                       return '\"' + str + '\"';
-               else
-                       return str;
-       }
-
-       /**
-        * Reformat the bundle list in order to reflect which bundles have to be
-        * started.
-        */
-       protected static String convertBundleList(List<String> bundlesToStart,
-                       String original) {
-               debug("Original bundle list: " + original);
-
-               StringTokenizer stComa = new StringTokenizer(original, ",");
-               // sort by bundle symbolic name
-               Set<String> bundleIds = new TreeSet<String>();
-               bundles: while (stComa.hasMoreTokens()) {
-
-                       String bundleId = stComa.nextToken();
-                       if (bundleId.indexOf('*') >= 0)
-                               throw new RuntimeException(
-                                               "Bundle id "
-                                                               + bundleId
-                                                               + " not properly formatted, clean your workspace projects");
-
-                       int indexAt = bundleId.indexOf('@');
-                       if (indexAt >= 0) {
-                               bundleId = bundleId.substring(0, indexAt);
-                       }
-
-                       // We can now rely on bundleId value
-
-                       if (bundleId.endsWith(".source")) {
-                               debug("Skip source bundle " + bundleId);
-                               continue bundles;
-                       } else if (bundleId
-                                       .equals(IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR)) {
-                               // skip simple configurator in order to avoid side-effects
-                               continue bundles;
-                       }
-                       bundleIds.add(bundleId);
-               }
-
-               StringBuffer bufBundles = new StringBuffer(1024);
-               boolean first = true;
-               for (String bundleId : bundleIds) {
-                       if (first)
-                               first = false;
-                       else
-                               bufBundles.append(',');
-                       boolean modified = false;
-                       if (bundlesToStart.contains(bundleId)) {
-                               bufBundles.append(bundleId).append('@').append("default:true");
-                               modified = true;
-                               debug("Will start " + bundleId);
-                       }
-
-                       if (!modified)
-                               bufBundles.append(bundleId);
-
-               }
-               String output = bufBundles.toString();
-               return output;
-       }
-
-       // UTILITIES
-       /** Recursively deletes a directory tree. */
-       private static void deleteDir(File dir) {
-               File[] files = dir.listFiles();
-               for (File file : files) {
-                       if (file.isDirectory())
-                               deleteDir(file);
-                       else
-                               file.delete();
-               }
-               dir.delete();
-       }
-
-       /** Loads a properties file. */
-       private static Properties readProperties(IFile file) throws CoreException {
-               Properties props = new Properties();
-
-               InputStream in = null;
-               try {
-                       in = file.getContents();
-                       props.load(in);
-               } catch (Exception e) {
-                       throw new CoreException(new Status(IStatus.ERROR,
-                                       SlcIdeUiPlugin.ID, "Cannot read properties file", e));
-               } finally {
-                       if (in != null)
-                               try {
-                                       in.close();
-                               } catch (IOException e) {
-                                       // silent
-                               }
-               }
-               return props;
-       }
-
-       // Hacked from
-       // org.eclipse.pde.internal.ui.launcher.LaunchArgumentsHelper.getWorkingDirectory(ILaunchConfiguration)
-       private static File getWorkingDirectory(ILaunchConfiguration configuration)
-                       throws CoreException {
-               String working;
-               try {
-                       working = configuration.getAttribute(
-                                       IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
-                                       new File(".").getCanonicalPath()); //$NON-NLS-1$
-               } catch (IOException e) {
-                       working = "${workspace_loc}/../"; //$NON-NLS-1$
-               }
-               File dir;
-               try {
-                       dir = new File(getSubstitutedString(working));
-               } catch (Exception e) {
-                       // the directory was most probably deleted
-                       IFile propertiesFile = (IFile) configuration.getMappedResources()[0];
-                       working = findWorkingDirectory(propertiesFile);
-                       dir = new File(getSubstitutedString(working));
-               }
-               if (!dir.exists())
-                       dir.mkdirs();
-               return dir;
-       }
-
-       // Hacked from
-       // org.eclipse.pde.internal.ui.launcher.LaunchArgumentsHelper.getSubstitutedString(String)
-       private static String getSubstitutedString(String text)
-                       throws CoreException {
-               if (text == null)
-                       return ""; //$NON-NLS-1$
-               IStringVariableManager mgr = VariablesPlugin.getDefault()
-                               .getStringVariableManager();
-               return mgr.performStringSubstitution(text);
-       }
-
-       /**
-        * Not used anymore, but kept because this routine may be useful in the
-        * future.
-        */
-       protected void addSelectedProjects(StringBuffer name, ISelection selection,
-                       List<String> bundlesToStart) {
-               Assert.isNotNull(selection);
-
-               Map<String, IPluginModelBase> bundleProjects = new HashMap<String, IPluginModelBase>();
-               for (IPluginModelBase modelBase : PluginRegistry.getWorkspaceModels()) {
-                       IProject bundleProject = modelBase.getUnderlyingResource()
-                                       .getProject();
-                       bundleProjects.put(bundleProject.getName(), modelBase);
-               }
-
-               IStructuredSelection sSelection = (IStructuredSelection) selection;
-               for (Iterator<?> it = sSelection.iterator(); it.hasNext();) {
-                       Object obj = it.next();
-                       if (obj instanceof IProject) {
-                               IProject project = (IProject) obj;
-                               if (bundleProjects.containsKey(project.getName())) {
-                                       IPluginModelBase modelBase = bundleProjects.get(project
-                                                       .getName());
-
-                                       BundleDescription bundleDescription = null;
-                                       if (modelBase.isFragmentModel()) {
-                                               BundleDescription[] hosts = modelBase
-                                                               .getBundleDescription().getHost().getHosts();
-                                               for (BundleDescription bd : hosts) {
-                                                       if (debug)
-                                                               System.out.println("Host for "
-                                                                               + modelBase.getBundleDescription()
-                                                                                               .getSymbolicName() + ": "
-                                                                               + bd.getSymbolicName());
-                                                       bundleDescription = bd;
-                                               }
-                                       } else {
-                                               bundleDescription = modelBase.getBundleDescription();
-                                       }
-
-                                       if (bundleDescription != null) {
-                                               String symbolicName = bundleDescription
-                                                               .getSymbolicName();
-                                               String bundleName = bundleDescription.getName();
-
-                                               bundlesToStart.add(symbolicName);
-
-                                               if (name.length() > 0)
-                                                       name.append(" ");
-                                               if (bundleName != null)
-                                                       name.append(bundleName);
-                                               else
-                                                       name.append(symbolicName);
-                                       }
-                               }
-                       }
-               }
-       }
-
-       static void debug(Object obj) {
-               if (debug)
-                       System.out.println(obj);
-       }
-
-}
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLauncherConstants.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLauncherConstants.java
deleted file mode 100644 (file)
index 8ada527..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.argeo.slc.ide.ui.launch.osgi;
-
-import org.argeo.slc.ide.ui.SlcIdeUiPlugin;
-
-/** Constants used by OSGi launch. */
-public interface OsgiLauncherConstants {
-
-       public final static String OSGI_BUNDLES = "osgi.bundles";
-       public final static String ECLIPSE_APPLICATION = "eclipse.application";
-
-       public final static String ARGEO_OSGI_START = "argeo.osgi.start";
-       public final static String ARGEO_OSGI_BUNDLES = "argeo.osgi.bundles";
-       public final static String ARGEO_OSGI_LOCATIONS = "argeo.osgi.locations";
-       public final static String ARGEO_OSGI_DATA_DIR = "argeo.osgi.data.dir";
-       public final static String VMS_PROPERTY_PREFIX = "slc.launch.vm";
-
-       // Configuration
-       public final static String ATTR_SYNC_BUNDLES = SlcIdeUiPlugin.ID
-                       + ".syncBundles";
-       public final static String ATTR_CLEAR_DATA_DIRECTORY = SlcIdeUiPlugin.ID
-                       + ".clearDataDirectory";
-
-       public final static String ATTR_DEFAULT_VM_ARGS = SlcIdeUiPlugin.ID
-                       + ".defaultVmArgs";
-       public final static String ATTR_ADDITIONAL_PROGRAM_ARGS = SlcIdeUiPlugin.ID
-                       + ".additionalProgramArgs";
-       public final static String ATTR_ADDITIONAL_VM_ARGS = SlcIdeUiPlugin.ID
-                       + ".additionalVmArgs";
-       public final static String ATTR_ADD_JVM_PATHS = SlcIdeUiPlugin.ID
-                       + ".addJvmPaths";
-       public final static String ATTR_DATADIR = SlcIdeUiPlugin.ID + ".dataDir";
-}
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/preferences/SlcLaunchPreferencePage.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/preferences/SlcLaunchPreferencePage.java
deleted file mode 100644 (file)
index 24c6757..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.argeo.slc.ide.ui.launch.preferences;\r
-\r
-import org.argeo.slc.ide.ui.SlcIdeUiPlugin;\r
-import org.eclipse.jface.preference.DirectoryFieldEditor;\r
-import org.eclipse.jface.preference.FieldEditorPreferencePage;\r
-import org.eclipse.ui.IWorkbench;\r
-import org.eclipse.ui.IWorkbenchPreferencePage;\r
-\r
-public class SlcLaunchPreferencePage extends FieldEditorPreferencePage implements\r
-               IWorkbenchPreferencePage {\r
-       public final static String PREF_SLC_RUNTIME_LOCATION = SlcIdeUiPlugin.ID\r
-                       + ".slcRuntimeLocation";\r
-       public final static String PREF_EMBEDDED_JAVA_LIBRARY_PATH = SlcIdeUiPlugin.ID\r
-                       + ".embeddedJavaLibraryPath";\r
-\r
-       public SlcLaunchPreferencePage() {\r
-//             IPreferenceStore store = SlcUiLaunchPlugin.getDefault()\r
-//                             .getPreferenceStore();\r
-//             setPreferenceStore(store);\r
-               setDescription("Argeo SLC Launch Preferences");\r
-       }\r
-\r
-       @Override\r
-       protected void createFieldEditors() {\r
-               addField(new DirectoryFieldEditor(PREF_SLC_RUNTIME_LOCATION,\r
-                               "SLC Runtime", getFieldEditorParent()));\r
-               addField(new DirectoryFieldEditor(PREF_EMBEDDED_JAVA_LIBRARY_PATH,\r
-                               "Embedded Java Library Path", getFieldEditorParent()));\r
-       }\r
-\r
-       public void init(IWorkbench workbench) {\r
-       }\r
-\r
-}\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchConfigurationTab.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchConfigurationTab.java
deleted file mode 100644 (file)
index f73a8ca..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-package org.argeo.slc.ide.ui.launch.script;\r
-\r
-import org.eclipse.core.resources.IResource;\r
-import org.eclipse.core.resources.ResourcesPlugin;\r
-import org.eclipse.core.runtime.CoreException;\r
-import org.eclipse.debug.core.ILaunchConfiguration;\r
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;\r
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;\r
-import org.eclipse.jface.window.Window;\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.events.ModifyEvent;\r
-import org.eclipse.swt.events.ModifyListener;\r
-import org.eclipse.swt.events.SelectionEvent;\r
-import org.eclipse.swt.events.SelectionListener;\r
-import org.eclipse.swt.layout.GridData;\r
-import org.eclipse.swt.layout.GridLayout;\r
-import org.eclipse.swt.widgets.Button;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Label;\r
-import org.eclipse.swt.widgets.Text;\r
-import org.eclipse.ui.dialogs.ResourceSelectionDialog;\r
-\r
-public class SlcScriptLaunchConfigurationTab extends\r
-               AbstractLaunchConfigurationTab {\r
-\r
-       private Text scriptTF;\r
-       private Text propertiesTF;\r
-       private Text runtimeTF;\r
-       private Text targetsTF;\r
-       private Button pre093B;\r
-\r
-       public void createControl(Composite parent) {\r
-               Composite body = new Composite(parent, SWT.NONE);\r
-               setControl(body);\r
-               body.setLayout(new GridLayout(1, false));\r
-               body.setFont(parent.getFont());\r
-\r
-               createLabel(body, "Script location");\r
-               scriptTF = createSingleText(body);\r
-               createWorkspaceButton(body);\r
-\r
-               createLabel(body, "Runtime");\r
-               runtimeTF = createSingleText(body);\r
-\r
-               createLabel(body, "Targets");\r
-               targetsTF = createSingleText(body);\r
-\r
-               createLabel(body, "Properties");\r
-               propertiesTF = createMultipleText(body, 10);\r
-\r
-               pre093B = createCheckBox(body, "Pre SLC v0.9.3");\r
-       }\r
-\r
-       public String getName() {\r
-               return "SLC";\r
-       }\r
-\r
-       public void initializeFrom(ILaunchConfiguration configuration) {\r
-               try {\r
-                       scriptTF.setText(configuration.getAttribute(\r
-                                       SlcScriptUtils.ATTR_SCRIPT, ""));\r
-\r
-                       boolean pre093 = configuration.getAttribute(\r
-                                       SlcScriptUtils.ATTR_PRE093, false);\r
-\r
-                       propertiesTF.setText(configuration.getAttribute(\r
-                                       SlcScriptUtils.ATTR_PROPERTIES, ""));\r
-                       runtimeTF.setText(configuration.getAttribute(\r
-                                       SlcScriptUtils.ATTR_RUNTIME, ""));\r
-                       targetsTF.setText(configuration.getAttribute(\r
-                                       SlcScriptUtils.ATTR_TARGETS, ""));\r
-                       pre093B.setSelection(pre093);\r
-               } catch (CoreException e) {\r
-                       throw new RuntimeException("Cannot initialize tab", e);\r
-               }\r
-\r
-       }\r
-\r
-       public void performApply(ILaunchConfigurationWorkingCopy configuration) {\r
-               configuration.setAttribute(SlcScriptUtils.ATTR_SCRIPT, scriptTF\r
-                               .getText());\r
-               configuration.setAttribute(SlcScriptUtils.ATTR_PROPERTIES, propertiesTF\r
-                               .getText());\r
-               configuration.setAttribute(SlcScriptUtils.ATTR_RUNTIME, runtimeTF\r
-                               .getText());\r
-               configuration.setAttribute(SlcScriptUtils.ATTR_TARGETS, targetsTF\r
-                               .getText());\r
-               configuration.setAttribute(SlcScriptUtils.ATTR_PRE093, pre093B\r
-                               .getSelection());\r
-       }\r
-\r
-       public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {\r
-               configuration.setAttribute(SlcScriptUtils.ATTR_SCRIPT, "");\r
-               configuration.setAttribute(SlcScriptUtils.ATTR_PROPERTIES, "");\r
-               configuration.setAttribute(SlcScriptUtils.ATTR_RUNTIME, "");\r
-               configuration.setAttribute(SlcScriptUtils.ATTR_TARGETS, "");\r
-               configuration.setAttribute(SlcScriptUtils.ATTR_PRE093, false);\r
-       }\r
-\r
-       // UI Utils\r
-       protected Label createLabel(Composite parent, String text) {\r
-               Label t = new Label(parent, SWT.NONE | SWT.WRAP);\r
-               t.setText(text);\r
-               t.setFont(parent.getFont());\r
-               GridData gd = new GridData(GridData.FILL_HORIZONTAL);\r
-               gd.horizontalSpan = 1;\r
-               t.setLayoutData(gd);\r
-               return t;\r
-       }\r
-\r
-       protected Text createSingleText(Composite parent) {\r
-               Text t = new Text(parent, SWT.SINGLE | SWT.BORDER);\r
-               t.setFont(parent.getFont());\r
-               GridData gd = new GridData(GridData.FILL_HORIZONTAL);\r
-               gd.horizontalSpan = 1;\r
-               t.setLayoutData(gd);\r
-               t.addModifyListener(modifyListener);\r
-               return t;\r
-       }\r
-\r
-       protected Text createMultipleText(Composite parent, int verticalSpan) {\r
-               Text t = new Text(parent, SWT.MULTI | SWT.BORDER);\r
-               t.setFont(parent.getFont());\r
-               GridData gd = new GridData(GridData.FILL, GridData.FILL, true, true);\r
-               gd.horizontalSpan = 1;\r
-               gd.verticalSpan = verticalSpan;\r
-               t.setLayoutData(gd);\r
-               t.addModifyListener(modifyListener);\r
-               return t;\r
-       }\r
-\r
-       protected Button createCheckBox(Composite parent, String label) {\r
-               Button b = new Button(parent, SWT.CHECK);\r
-               b.setFont(parent.getFont());\r
-               b.setText(label);\r
-               b.addSelectionListener(selectionListener);\r
-               return b;\r
-\r
-       }\r
-\r
-       protected Button createWorkspaceButton(Composite parent) {\r
-               Button b = new Button(parent, SWT.PUSH);\r
-               b.setFont(parent.getFont());\r
-               b.setText("Workspace...");\r
-               b.addSelectionListener(new SelectionListener() {\r
-                       public void widgetDefaultSelected(SelectionEvent e) {\r
-                       }\r
-\r
-                       public void widgetSelected(SelectionEvent e) {\r
-                               handleWorkspaceLocationButtonSelected();\r
-                       }\r
-               });\r
-               return b;\r
-       }\r
-\r
-       protected void handleWorkspaceLocationButtonSelected() {\r
-               ResourceSelectionDialog dialog;\r
-               dialog = new ResourceSelectionDialog(getShell(), ResourcesPlugin\r
-                               .getWorkspace().getRoot(), "Select a file");\r
-               if (dialog.open() == Window.OK) {\r
-                       Object[] results = dialog.getResult();\r
-                       if (results == null || results.length < 1) {\r
-                               return;\r
-                       }\r
-                       IResource resource = (IResource) results[0];\r
-                       scriptTF.setText(SlcScriptUtils\r
-                                       .convertToWorkspaceLocation(resource));\r
-                       updateLaunchConfigurationDialog();\r
-               }\r
-       }\r
-\r
-       // LISTENERS\r
-       /**\r
-        * Modify listener that simply updates the owning launch configuration\r
-        * dialog.\r
-        */\r
-       private ModifyListener modifyListener = new ModifyListener() {\r
-               public void modifyText(ModifyEvent evt) {\r
-                       updateLaunchConfigurationDialog();\r
-               }\r
-       };\r
-       private SelectionListener selectionListener = new SelectionListener() {\r
-               public void widgetDefaultSelected(SelectionEvent e) {\r
-               }\r
-\r
-               public void widgetSelected(SelectionEvent e) {\r
-                       updateLaunchConfigurationDialog();\r
-               }\r
-       };\r
-\r
-}\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchConfigurationTabGroup.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchConfigurationTabGroup.java
deleted file mode 100644 (file)
index e7d54a3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.argeo.slc.ide.ui.launch.script;\r
-\r
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;\r
-import org.eclipse.debug.ui.CommonTab;\r
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;\r
-import org.eclipse.debug.ui.ILaunchConfigurationTab;\r
-\r
-public class SlcScriptLaunchConfigurationTabGroup extends\r
-               AbstractLaunchConfigurationTabGroup {\r
-\r
-       public void createTabs(ILaunchConfigurationDialog dialog, String mode) {\r
-               ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {\r
-                               new SlcScriptLaunchConfigurationTab(), new CommonTab() };\r
-               setTabs(tabs);\r
-       }\r
-}\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchDelegate.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchDelegate.java
deleted file mode 100644 (file)
index 75d8ce7..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-package org.argeo.slc.ide.ui.launch.script;\r
-\r
-import java.io.ByteArrayInputStream;\r
-import java.io.IOException;\r
-import java.util.List;\r
-import java.util.Properties;\r
-import java.util.Vector;\r
-\r
-import org.argeo.slc.ide.ui.DeployedSlcSystem;\r
-import org.argeo.slc.ide.ui.EmbeddedSlcSystem;\r
-import org.argeo.slc.ide.ui.SlcSystem;\r
-import org.argeo.slc.ide.ui.SlcIdeUiPlugin;\r
-import org.argeo.slc.ide.ui.launch.preferences.SlcLaunchPreferencePage;\r
-import org.eclipse.core.resources.IFile;\r
-import org.eclipse.core.resources.IProject;\r
-import org.eclipse.core.resources.ResourcesPlugin;\r
-import org.eclipse.core.runtime.CoreException;\r
-import org.eclipse.core.runtime.IPath;\r
-import org.eclipse.core.runtime.IProgressMonitor;\r
-import org.eclipse.core.runtime.IStatus;\r
-import org.eclipse.core.runtime.Path;\r
-import org.eclipse.core.runtime.Status;\r
-import org.eclipse.core.variables.IStringVariableManager;\r
-import org.eclipse.core.variables.VariablesPlugin;\r
-import org.eclipse.debug.core.DebugPlugin;\r
-import org.eclipse.debug.core.ILaunch;\r
-import org.eclipse.debug.core.ILaunchConfiguration;\r
-import org.eclipse.debug.core.ILaunchManager;\r
-import org.eclipse.jdt.core.IJavaProject;\r
-import org.eclipse.jdt.core.IType;\r
-import org.eclipse.jdt.core.JavaCore;\r
-import org.eclipse.jdt.core.JavaModelException;\r
-import org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate;\r
-import org.eclipse.jdt.launching.IVMRunner;\r
-import org.eclipse.jdt.launching.VMRunnerConfiguration;\r
-import org.eclipse.jface.dialogs.ErrorDialog;\r
-import org.eclipse.swt.widgets.Shell;\r
-\r
-public class SlcScriptLaunchDelegate extends\r
-               AbstractJavaLaunchConfigurationDelegate {\r
-       public static final String ID = "org.argeo.slc.launch.slcScriptLaunchType";\r
-\r
-       public final static String ANT_MAIN = "org.apache.tools.ant.Main";\r
-       public final static String SLC_MAIN = "org.argeo.slc.cli.SlcMain";\r
-\r
-       @SuppressWarnings("deprecation")\r
-       public void launch(ILaunchConfiguration configuration, String mode,\r
-                       ILaunch launch, IProgressMonitor monitor) throws CoreException {\r
-               if (!saveBeforeLaunch(configuration, mode, monitor))\r
-                       return;\r
-\r
-               String scriptLocation = configuration.getAttribute(\r
-                               SlcScriptUtils.ATTR_SCRIPT, "");\r
-               if (scriptLocation.equals(""))\r
-                       abort("Script has to be provided", null, 1);\r
-\r
-               IStringVariableManager manager = VariablesPlugin.getDefault()\r
-                               .getStringVariableManager();\r
-               scriptLocation = manager.performStringSubstitution(scriptLocation);\r
-               IPath path = new Path(scriptLocation);\r
-               IFile[] files = ResourcesPlugin.getWorkspace().getRoot()\r
-                               .findFilesForLocation(path);\r
-\r
-               if (files.length == 0)\r
-                       abort("Coulkd not find related file", null, 1);\r
-\r
-               IFile file = (IFile) files[0];\r
-               DebugPlugin\r
-                               .logMessage("Launching " + file.getLocation().toFile(), null);\r
-\r
-               boolean pre093 = configuration.getAttribute(SlcScriptUtils.ATTR_PRE093,\r
-                               false);\r
-\r
-               // Retrieve SLC Runtime\r
-               SlcSystem slcSystem = findSlcSystem(file, pre093);\r
-               if (slcSystem == null)\r
-                       return;\r
-\r
-               IVMRunner vmRunner = slcSystem.getVmInstall().getVMRunner(mode);\r
-               final VMRunnerConfiguration vmConfig;\r
-               if (pre093) {\r
-                       vmConfig = createPre093Config(slcSystem, file, mode);\r
-               } else {\r
-                       vmConfig = createConfig(slcSystem, file, mode, configuration);\r
-               }\r
-               vmRunner.run(vmConfig, launch, monitor);\r
-       }\r
-\r
-       protected SlcSystem findSlcSystem(IFile file, boolean pre093)\r
-                       throws CoreException {\r
-               SlcSystem slcSystem = null;\r
-\r
-               IProject project = file.getProject();\r
-               if (project.getNature("org.eclipse.jdt.core.javanature") != null) {\r
-                       IJavaProject javaProject = JavaCore.create(project);\r
-                       if (checkProjectForEmbedded(javaProject, pre093)) {\r
-                               slcSystem = new EmbeddedSlcSystem(javaProject);\r
-                       }\r
-               }\r
-\r
-               if (slcSystem == null) {\r
-                       String slcRuntimePath = SlcIdeUiPlugin.getDefault()\r
-                                       .getPreferenceStore().getString(\r
-                                                       SlcLaunchPreferencePage.PREF_SLC_RUNTIME_LOCATION);\r
-                       if (slcRuntimePath == null || slcRuntimePath.equals("")) {\r
-                               showError("SLC Runtime path is not set. Set it in Windows > Preferences > SLC");\r
-                               return null;\r
-                       }\r
-\r
-                       slcSystem = new DeployedSlcSystem(slcRuntimePath);\r
-               }\r
-\r
-               return slcSystem;\r
-       }\r
-\r
-       protected boolean checkProjectForEmbedded(IJavaProject project,\r
-                       boolean pre093) {\r
-               try {\r
-                       IType mainType = null;\r
-                       if (pre093)\r
-                               mainType = project.findType(ANT_MAIN);\r
-                       else\r
-                               mainType = project.findType(SLC_MAIN);\r
-\r
-                       if (mainType == null)\r
-                               return false;\r
-                       else\r
-                               return true;\r
-               } catch (JavaModelException e) {\r
-                       e.printStackTrace();\r
-                       return false;\r
-               }\r
-       }\r
-\r
-       // Regular SLC\r
-       protected VMRunnerConfiguration createConfig(SlcSystem deployedSlc,\r
-                       IFile file, String mode, ILaunchConfiguration configuration)\r
-                       throws CoreException {\r
-               VMRunnerConfiguration vmConfig = new VMRunnerConfiguration(SLC_MAIN,\r
-                               deployedSlc.getClasspath());\r
-               vmConfig.setVMArguments(getVmArguments(deployedSlc));\r
-               vmConfig.setWorkingDirectory(file.getLocation().toFile().getParent());\r
-               vmConfig.setProgramArguments(getProgramArguments(deployedSlc, file,\r
-                               mode, configuration));\r
-               return vmConfig;\r
-       }\r
-\r
-       protected String[] getVmArguments(SlcSystem deployedSlc) {\r
-               List<String> list = new Vector<String>();\r
-               if (deployedSlc.getJavaLibraryPath() != null)\r
-                       list.add("-Djava.library.path=" + deployedSlc.getJavaLibraryPath());\r
-               return list.toArray(new String[list.size()]);\r
-       }\r
-\r
-       protected String[] getProgramArguments(SlcSystem deployedSlc, IFile file,\r
-                       String mode, ILaunchConfiguration configuration)\r
-                       throws CoreException {\r
-               List<String> list = new Vector<String>();\r
-\r
-               list.add("--mode");\r
-               list.add("single");\r
-\r
-               // Script\r
-               list.add("--script");\r
-               list.add(file.getLocation().toFile().getAbsolutePath());\r
-\r
-               // Runtime\r
-               String runtime = configuration.getAttribute(\r
-                               SlcScriptUtils.ATTR_RUNTIME, "");\r
-               if (!runtime.equals("")) {\r
-                       list.add("--runtime");\r
-                       list.add(runtime);\r
-               }\r
-\r
-               // Targets\r
-               String targets = configuration.getAttribute(\r
-                               SlcScriptUtils.ATTR_TARGETS, "");\r
-               if (!targets.equals("")) {\r
-                       list.add("--targets");\r
-                       list.add(targets);\r
-               }\r
-\r
-               // Properties\r
-               Properties properties = new Properties();\r
-               String str = configuration.getAttribute(SlcScriptUtils.ATTR_PROPERTIES,\r
-                               "");\r
-               ByteArrayInputStream in = new ByteArrayInputStream(str.getBytes());\r
-               try {\r
-                       properties.load(in);\r
-               } catch (IOException e) {\r
-                       throw new RuntimeException("Cannot read properties", e);\r
-               } finally {\r
-                       if (in != null)\r
-                               try {\r
-                                       in.close();\r
-                               } catch (IOException e) {\r
-                                       // silent\r
-                               }\r
-               }\r
-\r
-               for (Object key : properties.keySet()) {\r
-                       list.add("-p");\r
-                       StringBuffer buf = new StringBuffer("");\r
-                       buf.append(key).append('=').append(properties.get(key));\r
-                       list.add(buf.toString());\r
-               }\r
-\r
-               // Debug mode\r
-               if (mode.equals(ILaunchManager.DEBUG_MODE)) {\r
-                       list.add("--property");\r
-                       list.add("log4j.logger.org.argeo.slc=DEBUG");\r
-               }\r
-               return list.toArray(new String[list.size()]);\r
-       }\r
-\r
-       // Pre SLC v0.9.3\r
-       protected VMRunnerConfiguration createPre093Config(SlcSystem deployedSlc,\r
-                       IFile file, String mode) throws CoreException {\r
-               VMRunnerConfiguration vmConfig = new VMRunnerConfiguration(ANT_MAIN,\r
-                               deployedSlc.getClasspath());\r
-               vmConfig.setVMArguments(getPre093VmArguments(deployedSlc));\r
-               vmConfig.setWorkingDirectory(file.getLocation().toFile().getParent());\r
-               vmConfig.setProgramArguments(getPre093ProgramArguments(deployedSlc,\r
-                               file, mode));\r
-               return vmConfig;\r
-       }\r
-\r
-       protected String[] getPre093VmArguments(SlcSystem deployedSlc) {\r
-               List<String> list = new Vector<String>();\r
-               // list.add("-Dant.home=" + deployedSlc.getAntHome());\r
-               if (deployedSlc.getJavaLibraryPath() != null)\r
-                       list.add("-Djava.library.path=" + deployedSlc.getJavaLibraryPath());\r
-               return list.toArray(new String[list.size()]);\r
-       }\r
-\r
-       protected String[] getPre093ProgramArguments(SlcSystem deployedSlc,\r
-                       IFile file, String mode) {\r
-               List<String> list = new Vector<String>();\r
-               list.add("-f");\r
-               list.add(file.getLocation().toFile().getAbsolutePath());\r
-               if (mode.equals(ILaunchManager.DEBUG_MODE)) {\r
-                       list.add("-d");\r
-               }\r
-               return list.toArray(new String[list.size()]);\r
-       }\r
-\r
-       // Utilities\r
-       private static void showError(String message) {\r
-               Shell shell = SlcIdeUiPlugin.getDefault().getWorkbench()\r
-                               .getActiveWorkbenchWindow().getShell();\r
-\r
-               IStatus status = new Status(IStatus.ERROR, SlcIdeUiPlugin.ID,\r
-                               message);\r
-               ErrorDialog.openError(shell, "Error", "Cannot launch SLC script",\r
-                               status);\r
-       }\r
-\r
-}\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchShortcut.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchShortcut.java
deleted file mode 100644 (file)
index dfb0044..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-package org.argeo.slc.ide.ui.launch.script;\r
-\r
-import org.argeo.slc.ide.ui.SlcIdeUiPlugin;\r
-import org.eclipse.core.resources.IFile;\r
-import org.eclipse.core.runtime.CoreException;\r
-import org.eclipse.core.runtime.IPath;\r
-import org.eclipse.core.runtime.IStatus;\r
-import org.eclipse.core.runtime.Status;\r
-import org.eclipse.debug.core.DebugPlugin;\r
-import org.eclipse.debug.core.ILaunchConfiguration;\r
-import org.eclipse.debug.core.ILaunchConfigurationType;\r
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;\r
-import org.eclipse.debug.core.ILaunchManager;\r
-import org.eclipse.debug.ui.DebugUITools;\r
-import org.eclipse.debug.ui.IDebugUIConstants;\r
-import org.eclipse.debug.ui.ILaunchShortcut;\r
-import org.eclipse.jface.dialogs.ErrorDialog;\r
-import org.eclipse.jface.viewers.ISelection;\r
-import org.eclipse.jface.viewers.IStructuredSelection;\r
-import org.eclipse.swt.widgets.Shell;\r
-import org.eclipse.ui.IEditorPart;\r
-\r
-public class SlcScriptLaunchShortcut implements ILaunchShortcut {\r
-       private boolean showDialog = false;\r
-\r
-       public void launch(ISelection selection, String mode) {\r
-               try {\r
-                       if (!(selection instanceof IStructuredSelection)) {\r
-                               throw new RuntimeException("Unknown selection "\r
-                                               + selection.getClass());\r
-                       }\r
-                       IStructuredSelection sSelection = (IStructuredSelection) selection;\r
-                       if (sSelection.size() != 1) {\r
-                               throw new RuntimeException("Can only launch one SLC script.");\r
-                       }\r
-                       Object obj = sSelection.iterator().next();\r
-                       if (!(obj instanceof IFile)) {\r
-                               throw new RuntimeException("Can only launch files.");\r
-                       }\r
-                       IFile file = ((IFile) obj);\r
-\r
-                       ILaunchManager manager = DebugPlugin.getDefault()\r
-                                       .getLaunchManager();\r
-                       ILaunchConfigurationType type = manager\r
-                                       .getLaunchConfigurationType(SlcScriptLaunchDelegate.ID);\r
-\r
-                       // Find or create config\r
-                       String configLocation = SlcScriptUtils\r
-                                       .convertToWorkspaceLocation(file);\r
-                       ILaunchConfiguration config = findLaunchConfiguration(\r
-                                       configLocation, manager.getLaunchConfigurations(type));\r
-                       if (config == null) {\r
-                               ILaunchConfigurationWorkingCopy wc = type.newInstance(null,\r
-                                               generateName(file));\r
-                               wc.setAttribute(SlcScriptUtils.ATTR_SCRIPT, configLocation);\r
-                               wc.setMappedResources(new IFile[] { file });\r
-                               config = wc.doSave();\r
-                       }\r
-\r
-                       // Launch\r
-                       launch(config, mode);\r
-               } catch (CoreException e) {\r
-                       Shell shell = SlcIdeUiPlugin.getDefault().getWorkbench()\r
-                                       .getActiveWorkbenchWindow().getShell();\r
-                       ErrorDialog.openError(shell, "Error",\r
-                                       "Cannot execute SLC launch shortcut", e.getStatus());\r
-               }\r
-\r
-       }\r
-\r
-       protected String generateName(IFile file) {\r
-               IPath relativePath = file.getProjectRelativePath();\r
-               String name = relativePath.toString();\r
-               int idx = name.lastIndexOf(".xml");\r
-               if (idx > 0)\r
-                       name = name.substring(0, idx);\r
-\r
-               if (name.startsWith("src/main/slc/root/"))\r
-                       name = name.substring("src/main/slc/root/".length());\r
-               else if (name.startsWith("src/main/slc/"))\r
-                       name = name.substring("src/main/slc/".length());\r
-\r
-               name = name.replace('/', '.');// otherwise not properly saved\r
-               return name;\r
-       }\r
-\r
-       protected ILaunchConfiguration findLaunchConfiguration(\r
-                       String configLocation, ILaunchConfiguration[] configs)\r
-                       throws CoreException {\r
-               for (ILaunchConfiguration config : configs) {\r
-                       String loc = config.getAttribute(SlcScriptUtils.ATTR_SCRIPT, "");\r
-                       if (loc.equals(configLocation)) {\r
-                               return config;\r
-                       }\r
-               }\r
-               return null;\r
-       }\r
-\r
-       protected void launch(ILaunchConfiguration configuration, String mode)\r
-                       throws CoreException {\r
-               if (showDialog) {\r
-                       IStatus status = new Status(IStatus.INFO, SlcIdeUiPlugin.ID,\r
-                                       "Configure SLC Launch");\r
-                       String groupId;\r
-                       if (mode.equals(ILaunchManager.DEBUG_MODE)) {\r
-                               groupId = IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP;\r
-                       } else {\r
-                               groupId = IDebugUIConstants.ID_RUN_LAUNCH_GROUP;\r
-                       }\r
-                       DebugUITools.openLaunchConfigurationDialog(SlcIdeUiPlugin\r
-                                       .getDefault().getWorkbench().getActiveWorkbenchWindow()\r
-                                       .getShell(), configuration, groupId, status);\r
-               } else {\r
-                       DebugUITools.launch(configuration, mode);\r
-               }\r
-\r
-       }\r
-\r
-       public void launch(IEditorPart editor, String mode) {\r
-               // not (yet) implemented\r
-       }\r
-\r
-       public void setShowDialog(boolean showDialog) {\r
-               this.showDialog = showDialog;\r
-       }\r
-\r
-}\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchShortcutWithDialog.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchShortcutWithDialog.java
deleted file mode 100644 (file)
index 9e8dd3e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.argeo.slc.ide.ui.launch.script;\r
-\r
-\r
-public class SlcScriptLaunchShortcutWithDialog extends SlcScriptLaunchShortcut {\r
-\r
-       public SlcScriptLaunchShortcutWithDialog() {\r
-               super();\r
-               setShowDialog(true);\r
-       }\r
-\r
-}\r
diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptUtils.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptUtils.java
deleted file mode 100644 (file)
index 9a5bc42..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.argeo.slc.ide.ui.launch.script;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.variables.VariablesPlugin;
-
-public class SlcScriptUtils {
-
-       public final static String ATTR_SCRIPT = "script";
-       public final static String ATTR_PROPERTIES = "properties";
-       public final static String ATTR_RUNTIME = "runtime";
-       public final static String ATTR_TARGETS = "targets";
-       public final static String ATTR_PRE093 = "pre093";
-
-       public static String convertToWorkspaceLocation(IResource resource) {
-               return VariablesPlugin.getDefault().getStringVariableManager()
-                               .generateVariableExpression("workspace_loc",
-                                               resource.getFullPath().toString());
-       }
-
-       private SlcScriptUtils() {
-
-       }
-}
diff --git a/eclipse/plugins/pom.xml b/eclipse/plugins/pom.xml
deleted file mode 100644 (file)
index 259d848..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc</groupId>
-               <artifactId>eclipse</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-       </parent>
-       <groupId>org.argeo.slc.eclipse</groupId>
-       <artifactId>plugins</artifactId>
-       <name>SLC Eclipse Plugins</name>
-       <packaging>pom</packaging>
-
-       <modules>
-               <module>org.argeo.slc.client.ui</module>
-               <module>org.argeo.slc.client.ui.dist</module>
-               <module>org.argeo.slc.client.rcp</module>
-               <module>org.argeo.slc.client.rap</module>
-       </modules>
-       <build>
-               <resources>
-                       <resource>
-                               <directory>.</directory>
-                               <includes>
-                                       <include>plugin.xml</include>
-                                       <include>META-INF/**</include>
-                                       <include>icons/**</include>
-                               </includes>
-                       </resource>
-               </resources>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-source-plugin</artifactId>
-                               <configuration>
-                                       <!-- Prevents source jars to contain misleading data -->
-                                       <excludes>
-                                               <exclude>plugin.xml</exclude>
-                                               <exclude>META-INF/MANIFEST.MF</exclude>
-                                       </excludes>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-</project>
diff --git a/features/org.argeo.slc.ide/.project b/features/org.argeo.slc.ide/.project
new file mode 100644 (file)
index 0000000..bcaa481
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.ide</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.FeatureBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.FeatureNature</nature>
+       </natures>
+</projectDescription>
diff --git a/features/org.argeo.slc.ide/build.properties b/features/org.argeo.slc.ide/build.properties
new file mode 100644 (file)
index 0000000..e137249
--- /dev/null
@@ -0,0 +1,2 @@
+bin.includes = feature.xml,\
+               icons/
diff --git a/features/org.argeo.slc.ide/category.xml b/features/org.argeo.slc.ide/category.xml
new file mode 100644 (file)
index 0000000..b5d9946
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+   <feature url="features/org.argeo.slc.ide_0.13.1.D20110413_1126.jar" id="org.argeo.slc.ide" version="0.13.1.D20110413_1126">
+      <category name="slcIDE"/>
+   </feature>
+   <category-def name="slcIDE" label="SLC IDE">
+      <description>
+         SLC IDE
+      </description>
+   </category-def>
+</site>
diff --git a/features/org.argeo.slc.ide/feature.xml b/features/org.argeo.slc.ide/feature.xml
new file mode 100644 (file)
index 0000000..bb176d1
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.argeo.slc.ide"
+      label="Argeo Java IDE"
+      version="0.13.1.D20110904_1415"
+      provider-name="Argeo"
+      plugin="org.argeo.slc.ide.branding"
+      image="icons/argeo-icon-100104-256.png">
+
+   <description url="http://www.argeo.org/projects/slc/">
+      Argeo SLC IDE
+   </description>
+
+   <copyright url="http://www.argeo.org">
+      Copyright 2010 Mathieu Baudier - Argeo SASU
+   </copyright>
+
+   <license url="http://www.apache.org/licenses/LICENSE-2.0.txt">
+      SLC - Systems Life Cycle framework
+
+Copyright 2010 Mathieu Baudier - Argeo SASU
+
+Licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;);
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an &amp;quot;AS IS&amp;quot;
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+or implied.
+
+See the License for the specific language governing permissions
+and limitations under the License.
+   </license>
+
+   <url>
+      <update label="Argeo SLC IDE (Devpt)" url="http://www.argeo.org/projects/slc/update/ide-dev"/>
+   </url>
+
+   <requires>
+      <import plugin="org.eclipse.ui"/>
+      <import plugin="org.eclipse.core.runtime"/>
+      <import plugin="org.eclipse.debug.core"/>
+      <import plugin="org.eclipse.jdt.launching"/>
+      <import plugin="org.eclipse.debug.ui"/>
+      <import plugin="org.eclipse.jdt.core"/>
+      <import plugin="org.eclipse.ui.console"/>
+      <import plugin="org.eclipse.jdt.debug.ui"/>
+      <import plugin="org.eclipse.ui.ide"/>
+      <import plugin="org.eclipse.core.variables"/>
+      <import plugin="org.eclipse.pde.build"/>
+      <import plugin="org.eclipse.pde.ui" version="3.4.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.jdt.ui" version="3.4.2" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.ui" version="3.5.1" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.osgi" version="3.5.1" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.core.runtime" version="3.5.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.jdt.ui" version="3.5.1" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.ui.console" version="3.4.0" match="greaterOrEqual"/>
+   </requires>
+
+   <plugin
+         id="org.argeo.slc.ide.ui"
+         download-size="0"
+         install-size="0"
+         version="0.13.1.D20110904_1415"
+         unpack="false"/>
+
+   <plugin
+         id="org.argeo.slc.ide.branding"
+         download-size="0"
+         install-size="0"
+         version="0.13.1.D20110904_1415"
+         unpack="false"/>
+
+</feature>
diff --git a/features/org.argeo.slc.ide/icons/argeo-icon-100104-256.png b/features/org.argeo.slc.ide/icons/argeo-icon-100104-256.png
new file mode 100644 (file)
index 0000000..a9af088
Binary files /dev/null and b/features/org.argeo.slc.ide/icons/argeo-icon-100104-256.png differ
diff --git a/integration-tests/org.argeo.slc.it.jackrabbit/.classpath b/integration-tests/org.argeo.slc.it.jackrabbit/.classpath
deleted file mode 100644 (file)
index c5931a0..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src/main/java"/>
-       <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/integration-tests/org.argeo.slc.it.jackrabbit/.project b/integration-tests/org.argeo.slc.it.jackrabbit/.project
deleted file mode 100644 (file)
index aeb02fc..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.it.jackrabbit</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-       </natures>
-</projectDescription>
diff --git a/integration-tests/org.argeo.slc.it.jackrabbit/.settings/org.eclipse.jdt.core.prefs b/integration-tests/org.argeo.slc.it.jackrabbit/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 5890d6b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#Sat Feb 11 18:14:08 CET 2012
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/integration-tests/org.argeo.slc.it.jackrabbit/.settings/org.eclipse.pde.core.prefs b/integration-tests/org.argeo.slc.it.jackrabbit/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644 (file)
index 07670bc..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#Sat Feb 11 18:14:08 CET 2012
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/integration-tests/org.argeo.slc.it.jackrabbit/META-INF/MANIFEST.MF b/integration-tests/org.argeo.slc.it.jackrabbit/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 1af4fb4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Jackrabbit
-Bundle-SymbolicName: org.argeo.slc.it.jackrabbit
-Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/integration-tests/org.argeo.slc.it.jackrabbit/build.properties b/integration-tests/org.argeo.slc.it.jackrabbit/build.properties
deleted file mode 100644 (file)
index 5fc538b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/main/java/
-output.. = target/classes/
-bin.includes = META-INF/,\
-               .
diff --git a/integration-tests/org.argeo.slc.it.webapp/.classpath b/integration-tests/org.argeo.slc.it.webapp/.classpath
deleted file mode 100644 (file)
index b8c9753..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-       <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-       <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/integration-tests/org.argeo.slc.it.webapp/.project b/integration-tests/org.argeo.slc.it.webapp/.project
deleted file mode 100644 (file)
index 5d25193..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.it.webapp</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/integration-tests/org.argeo.slc.it.webapp/.settings/org.eclipse.jdt.core.prefs b/integration-tests/org.argeo.slc.it.webapp/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index a1fe815..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#Tue Jun 02 18:41:08 CEST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/integration-tests/org.argeo.slc.it.webapp/META-INF/MANIFEST.MF b/integration-tests/org.argeo.slc.it.webapp/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index bf80939..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SLC Integration Tests
-Bundle-SymbolicName: org.argeo.slc.it.webapp
-Bundle-Version: 0.13.1.SNAPSHOT
-Import-Package: junit.framework;version="3.8.2",
- org.argeo.slc,
- org.argeo.slc.msg,
- org.argeo.slc.runtime,
- org.argeo.slc.server,
- org.argeo.slc.server.client,
- org.argeo.slc.server.unit
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/integration-tests/org.argeo.slc.it.webapp/pom.xml b/integration-tests/org.argeo.slc.it.webapp/pom.xml
deleted file mode 100644 (file)
index 1c86dba..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc</groupId>
-               <artifactId>integration-tests</artifactId>
-               <version>0.13.1-SNAPSHOT</version>
-       </parent>
-       <groupId>org.argeo.slc.it</groupId>
-       <artifactId>org.argeo.slc.it.webapp</artifactId>
-       <packaging>jar</packaging>
-       <name>SLC Integration Tests Web Application</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.argeo.maven.plugins</groupId>
-                               <artifactId>maven-argeo-osgi-plugin</artifactId>
-                               <version>${version.maven-argeo-osgi}</version>
-                               <configuration>
-                                       <useDependencies>false</useDependencies>
-                                       <argsToAppend>
-                                               <arg>-clean</arg>
-                                       </argsToAppend>
-                                       <systemProperties>
-                                               <argeo.osgi.bundles>
-                                                       ${basedir}/../../demo/site;in=*;ex=target;ex=pom.xml;ex=.*,
-                                                       ${project.build.directory}/lib;in=*.jar,
-                                               </argeo.osgi.bundles>
-                                               <!-- <argeo.osgi.bundles> ${basedir}/../../demo/site;in=*;ex=target;ex=pom.xml;ex=.*, 
-                                                       ${basedir}/../../modules/server;in=*;ex=target;ex=pom.xml;ex=.*, ${basedir}/../../modules/agent;in=*;ex=target;ex=pom.xml;ex=.* 
-                                                       </argeo.osgi.bundles> -->
-
-                                               <argeo.osgi.start>
-                                                       org.springframework.osgi.extender,
-                                                       org.argeo.slc.server.main,
-                                                       org.argeo.slc.server.h2,
-                                                       org.argeo.slc.server.hibernate,
-                                                       org.argeo.slc.ria,
-                                                       org.argeo.slc.agent,
-                                                       org.argeo.slc.agent.jms,
-                                                       org.argeo.slc.demo.minimal,
-                                                       org.argeo.slc.demo.basic,
-                                                       org.argeo.slc.demo.ant                                          
-                                               </argeo.osgi.start>
-                                               <argeo.server.port.http>7080</argeo.server.port.http>
-                                       </systemProperties>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <id>equinox-start</id>
-                                               <phase>pre-integration-test</phase>
-                                               <goals>
-                                                       <goal>equinox</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <wait>false</wait>
-                                               </configuration>
-                                       </execution>
-                                       <execution>
-                                               <id>equinox-shutdown</id>
-                                               <phase>post-integration-test</phase>
-                                               <goals>
-                                                       <goal>equinox-shutdown</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-surefire-plugin</artifactId>
-                               <configuration>
-                                       <skipTests>true</skipTests>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <id>surefire-it</id>
-                                               <phase>integration-test</phase>
-                                               <goals>
-                                                       <goal>test</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <skipTests>false</skipTests>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-dependency-plugin</artifactId>
-                               <executions>
-                                       <execution>
-                                               <id>copy-dependencies</id>
-                                               <phase>process-resources</phase>
-                                               <goals>
-                                                       <goal>copy-dependencies</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <includeTypes>jar</includeTypes>
-                                                       <outputDirectory>${project.build.directory}/lib</outputDirectory>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <artifactId>maven-jar-plugin</artifactId>
-                               <configuration>
-                                       <archive>
-                                               <manifestFile>META-INF/MANIFEST.MF</manifestFile>
-                                       </archive>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-       <dependencies>
-               <dependency>
-                       <groupId>org.argeo.slc.dep</groupId>
-                       <artifactId>org.argeo.slc.dep.sdk.rcp</artifactId>
-                       <version>${version.slc}</version>
-               </dependency>
-               <!-- Unit Tests -->
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.unit</artifactId>
-                       <scope>test</scope>
-                       <version>${version.slc}</version>
-               </dependency>
-       </dependencies>
-</project>
\ No newline at end of file
diff --git a/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/ScenarioWsIntegrationTest.java b/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/ScenarioWsIntegrationTest.java
deleted file mode 100644 (file)
index 460edd0..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.argeo.slc.ws;
-
-import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createMinimalConsistentTreeTestResult;
-import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createSimpleResultPartError;
-import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createSimpleResultPartFailed;
-import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createSimpleResultPartPassed;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.core.test.SimpleResultPart;
-import org.argeo.slc.core.test.tree.TreeTestResult;
-import org.argeo.slc.msg.process.SlcExecutionRequest;
-import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
-import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
-import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;
-import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;
-import org.argeo.slc.msg.test.tree.ResultPartRequest;
-import org.argeo.slc.process.SlcExecution;
-import org.argeo.slc.process.SlcExecutionStep;
-import org.argeo.slc.unit.AbstractSpringTestCase;
-import org.argeo.slc.unit.process.SlcExecutionTestUtils;
-import org.springframework.ws.client.core.WebServiceTemplate;
-
-public class ScenarioWsIntegrationTest extends AbstractSpringTestCase {
-       private Log log = LogFactory.getLog(getClass());
-
-       private WebServiceTemplate template;
-
-       public void setUp() {
-               template = getBean(WebServiceTemplate.class);
-       }
-
-       public void testSinglePathScenario() {
-               // Create SLC execution
-               SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution();
-               log.info("Send create SlcExecutionRequest for SlcExecution #"
-                               + slcExec.getUuid());
-               template.marshalSendAndReceive(new SlcExecutionRequest(slcExec));
-
-               // Add SLC execution step
-               SlcExecutionStep step = new SlcExecutionStep("JUnit step");
-               slcExec.getSteps().add(step);
-               log.info("Send SlcExecutionStepsRequest for SlcExecution #"
-                               + slcExec.getUuid());
-               template.marshalSendAndReceive(new SlcExecutionStepsRequest(slcExec
-                               .getUuid(), step));
-
-               // Create test result
-               TreeTestResult ttr = createMinimalConsistentTreeTestResult(slcExec);
-               ttr.addResultPart(createSimpleResultPartPassed());
-               log.info("Send CreateTreeTestResultRequest for result #"
-                               + ttr.getUuid());
-               template.marshalSendAndReceive(new CreateTreeTestResultRequest(ttr));
-
-               // Add failed part
-               SimpleResultPart failedPart = createSimpleResultPartFailed();
-               ttr.addResultPart(failedPart);
-               log.info("Send ResultPartRequest for result #" + ttr.getUuid());
-               template.marshalSendAndReceive(new ResultPartRequest(ttr, null,
-                               failedPart));
-
-               // Add error part
-               SimpleResultPart errorPart = createSimpleResultPartError();
-               ttr.addResultPart(errorPart);
-               log.info("Send ResultPartRequest for result #" + ttr.getUuid());
-               template.marshalSendAndReceive(new ResultPartRequest(ttr, null,
-                               errorPart));
-
-               // Close result
-               ttr.close();
-               log
-                               .info("Send CloseTreeTestResultRequest for result #"
-                                               + ttr.getUuid());
-               template.marshalSendAndReceive(new CloseTreeTestResultRequest(ttr
-                               .getUuid(), ttr.getCloseDate()));
-
-               // Notify SLC execution FINISHED
-               slcExec.setStatus(SlcExecution.STATUS_FINISHED);
-               log.info("Send SlcExecutionStatusRequest for SlcExecution #"
-                               + slcExec.getUuid());
-               template.marshalSendAndReceive(new SlcExecutionStatusRequest(slcExec
-                               .getUuid(), slcExec.getStatus()));
-       }
-
-}
diff --git a/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/SlcAntWsIntegrationTest.java b/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/SlcAntWsIntegrationTest.java
deleted file mode 100644 (file)
index 136c2d8..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*\r
- * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.argeo.slc.ws;\r
-\r
-import org.argeo.slc.ant.unit.MinimalAntClasspathTestCase;\r
-\r
-public class SlcAntWsIntegrationTest extends MinimalAntClasspathTestCase {\r
-       public void testSimpleRun() {\r
-               execute("/org/argeo/slc/ant/build.xml");\r
-       }\r
-\r
-}\r
diff --git a/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/SlcExecutionWsIntegrationTest.java b/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/SlcExecutionWsIntegrationTest.java
deleted file mode 100644 (file)
index 2f5d05b..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.argeo.slc.ws;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.springframework.ws.client.core.WebServiceTemplate;
-import org.springframework.ws.soap.client.SoapFaultClientException;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.argeo.slc.msg.process.SlcExecutionRequest;
-import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
-import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
-import org.argeo.slc.process.SlcExecution;
-import org.argeo.slc.process.SlcExecutionStep;
-import org.argeo.slc.unit.AbstractSpringTestCase;
-import org.argeo.slc.unit.process.SlcExecutionTestUtils;
-import org.argeo.slc.ws.client.WebServiceUtils;
-
-public class SlcExecutionWsIntegrationTest extends AbstractSpringTestCase {
-       private Log log = LogFactory.getLog(getClass());
-
-       private WebServiceTemplate template;
-
-       public void setUp() {
-               template = getBean(WebServiceTemplate.class);
-       }
-
-       public void testSlcExecutionRequests() {
-               SlcExecution slcExec = createAndSendSlcExecution();
-
-               slcExec.setUser("otherUser");
-               log.info("Send update SlcExecutionRequest for SlcExecution #"
-                               + slcExec.getUuid());
-               template.marshalSendAndReceive(new SlcExecutionRequest(slcExec));
-       }
-
-       public void testSlcExecutionStatusRequest() {
-               SlcExecution slcExec = createAndSendSlcExecution();
-
-               slcExec.setStatus(SlcExecution.STATUS_FINISHED);
-               log.info("Send SlcExecutionStatusRequest for SlcExecution #"
-                               + slcExec.getUuid());
-               template.marshalSendAndReceive(new SlcExecutionStatusRequest(slcExec
-                               .getUuid(), slcExec.getStatus()));
-       }
-
-       public void testSendSlcExecutionStepRequest() {
-               SlcExecution slcExec = createAndSendSlcExecution();
-
-               SlcExecutionStep step1 = new SlcExecutionStep(
-                               "Logline\nAnother log line.");
-               SlcExecutionStep step2 = new SlcExecutionStep(
-                               "Logline2\nAnother log line2.");
-               List<SlcExecutionStep> steps = new Vector<SlcExecutionStep>();
-               steps.add(step1);
-               steps.add(step2);
-
-               log.info("Send SlcExecutionStepsRequest for SlcExecution #"
-                               + slcExec.getUuid());
-               try {
-                       template.marshalSendAndReceive(new SlcExecutionStepsRequest(slcExec
-                                       .getUuid(), steps));
-               } catch (SoapFaultClientException e) {
-                       WebServiceUtils.manageSoapException(e);
-                       throw e;
-               }
-       }
-
-       protected SlcExecution createAndSendSlcExecution() {
-               SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution();
-
-               log.info("Send create SlcExecutionRequest for SlcExecution #"
-                               + slcExec.getUuid());
-               template.marshalSendAndReceive(new SlcExecutionRequest(slcExec));
-               return slcExec;
-       }
-}
diff --git a/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/TreeTestResultWsIntegrationTest.java b/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/TreeTestResultWsIntegrationTest.java
deleted file mode 100644 (file)
index 4b846ac..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.argeo.slc.ws;
-
-import org.springframework.ws.client.core.WebServiceTemplate;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createCompleteTreeTestResult;
-import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createSimpleResultPartRequest;
-
-import org.argeo.slc.core.test.tree.TreeTestResult;
-import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;
-import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;
-import org.argeo.slc.msg.test.tree.ResultPartRequest;
-import org.argeo.slc.unit.AbstractSpringTestCase;
-
-public class TreeTestResultWsIntegrationTest extends AbstractSpringTestCase {
-       private Log log = LogFactory.getLog(getClass());
-
-       private WebServiceTemplate template;
-
-       public void setUp() {
-               template = getBean(WebServiceTemplate.class);
-       }
-
-       public void testCreateTreeTestResultRequest() {
-               createAndSendTreeTestResult(true);
-       }
-
-       public void testResultPartRequest() {
-               TreeTestResult ttr = createAndSendTreeTestResult(true);
-
-               ResultPartRequest req = createSimpleResultPartRequest(ttr);
-
-               log.info("Send ResultPartRequest for result " + req.getResultUuid());
-               template.marshalSendAndReceive(req);
-       }
-
-       public void testCloseTreeTestResultRequest() {
-               TreeTestResult ttr = createAndSendTreeTestResult(false);
-
-               ttr.close();
-               CloseTreeTestResultRequest req = new CloseTreeTestResultRequest(ttr
-                               .getUuid(), ttr.getCloseDate());
-               log.info("Send CloseTreeTestResultRequest for result "
-                               + req.getResultUuid());
-               template.marshalSendAndReceive(req);
-       }
-
-       protected TreeTestResult createAndSendTreeTestResult(boolean close) {
-               TreeTestResult ttr = createCompleteTreeTestResult();
-               log.info("Send CreateTreeTestResultRequest for result #"
-                               + ttr.getUuid());
-               template.marshalSendAndReceive(new CreateTreeTestResultRequest(ttr));
-
-               if (close)
-                       ttr.close();
-               return ttr;
-       }
-}
diff --git a/integration-tests/org.argeo.slc.it.webapp/src/test/java/org/argeo/slc/it/webapp/AgentTest.java b/integration-tests/org.argeo.slc.it.webapp/src/test/java/org/argeo/slc/it/webapp/AgentTest.java
deleted file mode 100644 (file)
index f5f0201..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.argeo.slc.it.webapp;
-
-import java.net.InetAddress;
-
-import org.argeo.slc.runtime.SlcAgentDescriptor;
-import org.argeo.slc.server.unit.AbstractHttpClientTestCase;
-
-public class AgentTest extends AbstractHttpClientTestCase {
-       public void testListAgents() throws Exception {
-               SlcAgentDescriptor slcAgentDescriptor = getHttpClient()
-                               .waitForOneAgent();
-               assertEquals(InetAddress.getLocalHost().getHostName(),
-                               slcAgentDescriptor.getHost());
-       }
-
-}
diff --git a/integration-tests/org.argeo.slc.it.webapp/src/test/java/org/argeo/slc/it/webapp/SimpleScenarioTest.java b/integration-tests/org.argeo.slc.it.webapp/src/test/java/org/argeo/slc/it/webapp/SimpleScenarioTest.java
deleted file mode 100644 (file)
index e6d5cab..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.argeo.slc.it.webapp;
-
-import org.argeo.slc.Condition;
-import org.argeo.slc.msg.ObjectList;
-import org.argeo.slc.server.client.SlcServerHttpClient;
-import org.argeo.slc.server.unit.AbstractHttpClientTestCase;
-
-public class SimpleScenarioTest extends AbstractHttpClientTestCase {
-       public void testSimpleScenario() throws Exception {
-               String moduleName = "org.argeo.slc.demo.basic";
-               getHttpClient().startFlowDefault(moduleName, "main", null);
-
-               getHttpClient().callServiceSafe(SlcServerHttpClient.LIST_RESULTS, null,
-                               new Condition<ObjectList>() {
-
-                                       public Boolean check(ObjectList obj) {
-                                               return obj.getObjects().size() == 3;
-                                       }
-                               }, null);
-
-               getHttpClient().callServiceSafe(SlcServerHttpClient.LIST_RESULTS, null,
-                               new Condition<ObjectList>() {
-
-                                       public Boolean check(ObjectList obj) {
-                                               return obj.getObjects().size() == 3;
-                                       }
-                               }, null);
-       }
-}
diff --git a/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ant/build.xml b/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ant/build.xml
deleted file mode 100644 (file)
index a90fbde..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--\r
-\r
-    Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-\r
-<project default="test">\r
-\r
-       <target name="test">\r
-               <echo message="Hello World!" />\r
-\r
-               <slc.test>\r
-                       <testDefinition bean="testDef" />\r
-                       <testData bean="testData1" />\r
-               </slc.test>\r
-\r
-               <slc.test>
-                       <testDefinition bean="testDef" />
-                       <testData bean="testData.context1" />
-               </slc.test>
-
-               <slc.test path="/testRoot/testContext">
-                       <testDefinition bean="testDef" />
-                       <testData bean="testData.context1" />
-               </slc.test>
-
-               <slc.closeResult>
-                       <result bean="testResult" />
-               </slc.closeResult>\r
-       </target>\r
-</project>
\ No newline at end of file
diff --git a/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ant/nonDepContext.xml b/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ant/nonDepContext.xml
deleted file mode 100644 (file)
index 07f09b0..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
-    Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <import\r
-               resource="classpath:/org/argeo/slc/core/test/spring/applicationContext.xml" />\r
-\r
-       <bean name="testDef"\r
-               class="org.argeo.slc.core.test.BasicTestDefinition" scope="prototype" />\r
-\r
-       <bean name="testData1"\r
-               class="org.argeo.slc.core.test.BasicTestData">\r
-               <property name="expected">\r
-                       <value>toto</value>\r
-               </property>\r
-               <property name="reached">\r
-                       <value>toto</value>\r
-               </property>\r
-       </bean>\r
-\r
-       <bean id="testData.context1" parent="context.template">\r
-               <property name="values">\r
-                       <map>\r
-                               <entry key="reference" value="20" />\r
-                               <entry key="varIntern" value="60" />\r
-                       </map>\r
-               </property>\r
-               <property name="expectedValues">\r
-                       <map>\r
-                               <entry key="reference" value="21" />\r
-                               <entry key="varIntern" value="60" />\r
-                       </map>\r
-               </property>\r
-       </bean>\r
-\r
-       <bean id="context.template"\r
-               class="org.argeo.slc.core.test.context.DefaultContextTestData"\r
-               abstract="true">\r
-       </bean>\r
-\r
-</beans>
\ No newline at end of file
diff --git a/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ws/applicationContext.xml b/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ws/applicationContext.xml
deleted file mode 100644 (file)
index bd70b4b..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<!--
-
-    Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-            http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-       <import
-               resource="classpath:/org/argeo/slc/ws/client/spring/applicationContext.xml" />
-       <import resource="classpath:/org/argeo/slc/ant/nonDepContext.xml" />
-
-       <bean name="executionBuildListener"
-               class="org.argeo.slc.ant.SlcExecutionBuildListener">
-               <property name="notifiers">
-                       <list>
-                               <ref bean="slcDefault.ws.client.slcExecutionNotifier" />
-                       </list>
-               </property>
-       </bean>
-
-       <bean id="testResult"
-               parent="slcDefault.test.basicTreeTestResult">
-               <property name="listeners">
-                       <list merge="true">
-                               <ref
-                                       bean="slcDefault.ws.client.treeTestResultWsNotfier" />
-                       </list>
-               </property>
-       </bean>
-</beans>
diff --git a/integration-tests/org.argeo.slc.it.webapp/src/test/resources/log4j.properties b/integration-tests/org.argeo.slc.it.webapp/src/test/resources/log4j.properties
deleted file mode 100644 (file)
index bd20b8e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-log4j.rootLogger=WARN, console\r
-\r
-## Levels\r
-# SLC\r
-log4j.logger.org.argeo=DEBUG\r
-\r
-## Appenders\r
-# A1 is set to be a ConsoleAppender.\r
-log4j.appender.console=org.apache.log4j.ConsoleAppender\r
-\r
-# A1 uses PatternLayout.\r
-log4j.appender.console.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} %m - %c%n\r
-\r
diff --git a/integration-tests/org.argeo.slc.it.webapp/src/test/resources/org/argeo/slc/it/webapp/applicationContext.xml b/integration-tests/org.argeo.slc.it.webapp/src/test/resources/org/argeo/slc/it/webapp/applicationContext.xml
deleted file mode 100644 (file)
index 0e01c02..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-            http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xmlns:tx="http://www.springframework.org/schema/tx"
-       xsi:schemaLocation="
-        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
-       default-lazy-init="true">
-
-       <import resource="classpath:org/argeo/slc/server/client/spring.xml" />
-
-       <!-- Http client -->
-       <bean id="serverHttpClient" parent="slcTemplate.serverHttpClient">
-               <property name="baseUrl" value="http://localhost:7080/org.argeo.slc.webapp/" />
-       </bean>
-
-</beans>
\ No newline at end of file
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
deleted file mode 100644 (file)
index 51d5311..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc</groupId>
-               <artifactId>argeo-slc</artifactId>
-               <version>0.13.1-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <groupId>org.argeo.slc</groupId>
-       <artifactId>integration-tests</artifactId>
-       <packaging>pom</packaging>
-       <name>SLC Integration Tests</name>
-       <profiles>
-               <profile>
-                       <id>withIT</id>
-                       <activation>
-                               <activeByDefault>true</activeByDefault>
-                       </activation>
-                       <modules>
-                               <module>org.argeo.slc.it.webapp</module>
-                       </modules>
-               </profile>
-               <profile>
-                       <id>withoutIT</id>
-               </profile>
-       </profiles>
-</project>
diff --git a/legacy/integration-tests/org.argeo.slc.it.jackrabbit/.classpath b/legacy/integration-tests/org.argeo.slc.it.jackrabbit/.classpath
new file mode 100644 (file)
index 0000000..c5931a0
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/legacy/integration-tests/org.argeo.slc.it.jackrabbit/.project b/legacy/integration-tests/org.argeo.slc.it.jackrabbit/.project
new file mode 100644 (file)
index 0000000..aeb02fc
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.it.jackrabbit</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/integration-tests/org.argeo.slc.it.jackrabbit/.settings/org.eclipse.jdt.core.prefs b/legacy/integration-tests/org.argeo.slc.it.jackrabbit/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..5890d6b
--- /dev/null
@@ -0,0 +1,8 @@
+#Sat Feb 11 18:14:08 CET 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/legacy/integration-tests/org.argeo.slc.it.jackrabbit/.settings/org.eclipse.pde.core.prefs b/legacy/integration-tests/org.argeo.slc.it.jackrabbit/.settings/org.eclipse.pde.core.prefs
new file mode 100644 (file)
index 0000000..07670bc
--- /dev/null
@@ -0,0 +1,4 @@
+#Sat Feb 11 18:14:08 CET 2012
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/legacy/integration-tests/org.argeo.slc.it.jackrabbit/META-INF/MANIFEST.MF b/legacy/integration-tests/org.argeo.slc.it.jackrabbit/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..1af4fb4
--- /dev/null
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Jackrabbit
+Bundle-SymbolicName: org.argeo.slc.it.jackrabbit
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/legacy/integration-tests/org.argeo.slc.it.jackrabbit/build.properties b/legacy/integration-tests/org.argeo.slc.it.jackrabbit/build.properties
new file mode 100644 (file)
index 0000000..5fc538b
--- /dev/null
@@ -0,0 +1,4 @@
+source.. = src/main/java/
+output.. = target/classes/
+bin.includes = META-INF/,\
+               .
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/.classpath b/legacy/integration-tests/org.argeo.slc.it.webapp/.classpath
new file mode 100644 (file)
index 0000000..b8c9753
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+       <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/.project b/legacy/integration-tests/org.argeo.slc.it.webapp/.project
new file mode 100644 (file)
index 0000000..5d25193
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.it.webapp</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/.settings/org.eclipse.jdt.core.prefs b/legacy/integration-tests/org.argeo.slc.it.webapp/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..a1fe815
--- /dev/null
@@ -0,0 +1,12 @@
+#Tue Jun 02 18:41:08 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/META-INF/MANIFEST.MF b/legacy/integration-tests/org.argeo.slc.it.webapp/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..bf80939
--- /dev/null
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: SLC Integration Tests
+Bundle-SymbolicName: org.argeo.slc.it.webapp
+Bundle-Version: 0.13.1.SNAPSHOT
+Import-Package: junit.framework;version="3.8.2",
+ org.argeo.slc,
+ org.argeo.slc.msg,
+ org.argeo.slc.runtime,
+ org.argeo.slc.server,
+ org.argeo.slc.server.client,
+ org.argeo.slc.server.unit
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/pom.xml b/legacy/integration-tests/org.argeo.slc.it.webapp/pom.xml
new file mode 100644 (file)
index 0000000..1c86dba
--- /dev/null
@@ -0,0 +1,128 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>integration-tests</artifactId>
+               <version>0.13.1-SNAPSHOT</version>
+       </parent>
+       <groupId>org.argeo.slc.it</groupId>
+       <artifactId>org.argeo.slc.it.webapp</artifactId>
+       <packaging>jar</packaging>
+       <name>SLC Integration Tests Web Application</name>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.argeo.maven.plugins</groupId>
+                               <artifactId>maven-argeo-osgi-plugin</artifactId>
+                               <version>${version.maven-argeo-osgi}</version>
+                               <configuration>
+                                       <useDependencies>false</useDependencies>
+                                       <argsToAppend>
+                                               <arg>-clean</arg>
+                                       </argsToAppend>
+                                       <systemProperties>
+                                               <argeo.osgi.bundles>
+                                                       ${basedir}/../../demo/site;in=*;ex=target;ex=pom.xml;ex=.*,
+                                                       ${project.build.directory}/lib;in=*.jar,
+                                               </argeo.osgi.bundles>
+                                               <!-- <argeo.osgi.bundles> ${basedir}/../../demo/site;in=*;ex=target;ex=pom.xml;ex=.*, 
+                                                       ${basedir}/../../modules/server;in=*;ex=target;ex=pom.xml;ex=.*, ${basedir}/../../modules/agent;in=*;ex=target;ex=pom.xml;ex=.* 
+                                                       </argeo.osgi.bundles> -->
+
+                                               <argeo.osgi.start>
+                                                       org.springframework.osgi.extender,
+                                                       org.argeo.slc.server.main,
+                                                       org.argeo.slc.server.h2,
+                                                       org.argeo.slc.server.hibernate,
+                                                       org.argeo.slc.ria,
+                                                       org.argeo.slc.agent,
+                                                       org.argeo.slc.agent.jms,
+                                                       org.argeo.slc.demo.minimal,
+                                                       org.argeo.slc.demo.basic,
+                                                       org.argeo.slc.demo.ant                                          
+                                               </argeo.osgi.start>
+                                               <argeo.server.port.http>7080</argeo.server.port.http>
+                                       </systemProperties>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <id>equinox-start</id>
+                                               <phase>pre-integration-test</phase>
+                                               <goals>
+                                                       <goal>equinox</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <wait>false</wait>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <id>equinox-shutdown</id>
+                                               <phase>post-integration-test</phase>
+                                               <goals>
+                                                       <goal>equinox-shutdown</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-surefire-plugin</artifactId>
+                               <configuration>
+                                       <skipTests>true</skipTests>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <id>surefire-it</id>
+                                               <phase>integration-test</phase>
+                                               <goals>
+                                                       <goal>test</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <skipTests>false</skipTests>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-dependency-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>copy-dependencies</id>
+                                               <phase>process-resources</phase>
+                                               <goals>
+                                                       <goal>copy-dependencies</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <includeTypes>jar</includeTypes>
+                                                       <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <artifactId>maven-jar-plugin</artifactId>
+                               <configuration>
+                                       <archive>
+                                               <manifestFile>META-INF/MANIFEST.MF</manifestFile>
+                                       </archive>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+       <dependencies>
+               <dependency>
+                       <groupId>org.argeo.slc.dep</groupId>
+                       <artifactId>org.argeo.slc.dep.sdk.rcp</artifactId>
+                       <version>${version.slc}</version>
+               </dependency>
+               <!-- Unit Tests -->
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.unit</artifactId>
+                       <scope>test</scope>
+                       <version>${version.slc}</version>
+               </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/ScenarioWsIntegrationTest.java b/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/ScenarioWsIntegrationTest.java
new file mode 100644 (file)
index 0000000..460edd0
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.argeo.slc.ws;
+
+import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createMinimalConsistentTreeTestResult;
+import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createSimpleResultPartError;
+import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createSimpleResultPartFailed;
+import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createSimpleResultPartPassed;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.core.test.SimpleResultPart;
+import org.argeo.slc.core.test.tree.TreeTestResult;
+import org.argeo.slc.msg.process.SlcExecutionRequest;
+import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
+import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
+import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;
+import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;
+import org.argeo.slc.msg.test.tree.ResultPartRequest;
+import org.argeo.slc.process.SlcExecution;
+import org.argeo.slc.process.SlcExecutionStep;
+import org.argeo.slc.unit.AbstractSpringTestCase;
+import org.argeo.slc.unit.process.SlcExecutionTestUtils;
+import org.springframework.ws.client.core.WebServiceTemplate;
+
+public class ScenarioWsIntegrationTest extends AbstractSpringTestCase {
+       private Log log = LogFactory.getLog(getClass());
+
+       private WebServiceTemplate template;
+
+       public void setUp() {
+               template = getBean(WebServiceTemplate.class);
+       }
+
+       public void testSinglePathScenario() {
+               // Create SLC execution
+               SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution();
+               log.info("Send create SlcExecutionRequest for SlcExecution #"
+                               + slcExec.getUuid());
+               template.marshalSendAndReceive(new SlcExecutionRequest(slcExec));
+
+               // Add SLC execution step
+               SlcExecutionStep step = new SlcExecutionStep("JUnit step");
+               slcExec.getSteps().add(step);
+               log.info("Send SlcExecutionStepsRequest for SlcExecution #"
+                               + slcExec.getUuid());
+               template.marshalSendAndReceive(new SlcExecutionStepsRequest(slcExec
+                               .getUuid(), step));
+
+               // Create test result
+               TreeTestResult ttr = createMinimalConsistentTreeTestResult(slcExec);
+               ttr.addResultPart(createSimpleResultPartPassed());
+               log.info("Send CreateTreeTestResultRequest for result #"
+                               + ttr.getUuid());
+               template.marshalSendAndReceive(new CreateTreeTestResultRequest(ttr));
+
+               // Add failed part
+               SimpleResultPart failedPart = createSimpleResultPartFailed();
+               ttr.addResultPart(failedPart);
+               log.info("Send ResultPartRequest for result #" + ttr.getUuid());
+               template.marshalSendAndReceive(new ResultPartRequest(ttr, null,
+                               failedPart));
+
+               // Add error part
+               SimpleResultPart errorPart = createSimpleResultPartError();
+               ttr.addResultPart(errorPart);
+               log.info("Send ResultPartRequest for result #" + ttr.getUuid());
+               template.marshalSendAndReceive(new ResultPartRequest(ttr, null,
+                               errorPart));
+
+               // Close result
+               ttr.close();
+               log
+                               .info("Send CloseTreeTestResultRequest for result #"
+                                               + ttr.getUuid());
+               template.marshalSendAndReceive(new CloseTreeTestResultRequest(ttr
+                               .getUuid(), ttr.getCloseDate()));
+
+               // Notify SLC execution FINISHED
+               slcExec.setStatus(SlcExecution.STATUS_FINISHED);
+               log.info("Send SlcExecutionStatusRequest for SlcExecution #"
+                               + slcExec.getUuid());
+               template.marshalSendAndReceive(new SlcExecutionStatusRequest(slcExec
+                               .getUuid(), slcExec.getStatus()));
+       }
+
+}
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/SlcAntWsIntegrationTest.java b/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/SlcAntWsIntegrationTest.java
new file mode 100644 (file)
index 0000000..136c2d8
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package org.argeo.slc.ws;\r
+\r
+import org.argeo.slc.ant.unit.MinimalAntClasspathTestCase;\r
+\r
+public class SlcAntWsIntegrationTest extends MinimalAntClasspathTestCase {\r
+       public void testSimpleRun() {\r
+               execute("/org/argeo/slc/ant/build.xml");\r
+       }\r
+\r
+}\r
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/SlcExecutionWsIntegrationTest.java b/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/SlcExecutionWsIntegrationTest.java
new file mode 100644 (file)
index 0000000..2f5d05b
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.argeo.slc.ws;
+
+import java.util.List;
+import java.util.Vector;
+
+import org.springframework.ws.client.core.WebServiceTemplate;
+import org.springframework.ws.soap.client.SoapFaultClientException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.argeo.slc.msg.process.SlcExecutionRequest;
+import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
+import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
+import org.argeo.slc.process.SlcExecution;
+import org.argeo.slc.process.SlcExecutionStep;
+import org.argeo.slc.unit.AbstractSpringTestCase;
+import org.argeo.slc.unit.process.SlcExecutionTestUtils;
+import org.argeo.slc.ws.client.WebServiceUtils;
+
+public class SlcExecutionWsIntegrationTest extends AbstractSpringTestCase {
+       private Log log = LogFactory.getLog(getClass());
+
+       private WebServiceTemplate template;
+
+       public void setUp() {
+               template = getBean(WebServiceTemplate.class);
+       }
+
+       public void testSlcExecutionRequests() {
+               SlcExecution slcExec = createAndSendSlcExecution();
+
+               slcExec.setUser("otherUser");
+               log.info("Send update SlcExecutionRequest for SlcExecution #"
+                               + slcExec.getUuid());
+               template.marshalSendAndReceive(new SlcExecutionRequest(slcExec));
+       }
+
+       public void testSlcExecutionStatusRequest() {
+               SlcExecution slcExec = createAndSendSlcExecution();
+
+               slcExec.setStatus(SlcExecution.STATUS_FINISHED);
+               log.info("Send SlcExecutionStatusRequest for SlcExecution #"
+                               + slcExec.getUuid());
+               template.marshalSendAndReceive(new SlcExecutionStatusRequest(slcExec
+                               .getUuid(), slcExec.getStatus()));
+       }
+
+       public void testSendSlcExecutionStepRequest() {
+               SlcExecution slcExec = createAndSendSlcExecution();
+
+               SlcExecutionStep step1 = new SlcExecutionStep(
+                               "Logline\nAnother log line.");
+               SlcExecutionStep step2 = new SlcExecutionStep(
+                               "Logline2\nAnother log line2.");
+               List<SlcExecutionStep> steps = new Vector<SlcExecutionStep>();
+               steps.add(step1);
+               steps.add(step2);
+
+               log.info("Send SlcExecutionStepsRequest for SlcExecution #"
+                               + slcExec.getUuid());
+               try {
+                       template.marshalSendAndReceive(new SlcExecutionStepsRequest(slcExec
+                                       .getUuid(), steps));
+               } catch (SoapFaultClientException e) {
+                       WebServiceUtils.manageSoapException(e);
+                       throw e;
+               }
+       }
+
+       protected SlcExecution createAndSendSlcExecution() {
+               SlcExecution slcExec = SlcExecutionTestUtils.createSimpleSlcExecution();
+
+               log.info("Send create SlcExecutionRequest for SlcExecution #"
+                               + slcExec.getUuid());
+               template.marshalSendAndReceive(new SlcExecutionRequest(slcExec));
+               return slcExec;
+       }
+}
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/TreeTestResultWsIntegrationTest.java b/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java-old/org/argeo/slc/ws/TreeTestResultWsIntegrationTest.java
new file mode 100644 (file)
index 0000000..4b846ac
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.argeo.slc.ws;
+
+import org.springframework.ws.client.core.WebServiceTemplate;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createCompleteTreeTestResult;
+import static org.argeo.slc.unit.test.tree.TreeTestResultTestUtils.createSimpleResultPartRequest;
+
+import org.argeo.slc.core.test.tree.TreeTestResult;
+import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;
+import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;
+import org.argeo.slc.msg.test.tree.ResultPartRequest;
+import org.argeo.slc.unit.AbstractSpringTestCase;
+
+public class TreeTestResultWsIntegrationTest extends AbstractSpringTestCase {
+       private Log log = LogFactory.getLog(getClass());
+
+       private WebServiceTemplate template;
+
+       public void setUp() {
+               template = getBean(WebServiceTemplate.class);
+       }
+
+       public void testCreateTreeTestResultRequest() {
+               createAndSendTreeTestResult(true);
+       }
+
+       public void testResultPartRequest() {
+               TreeTestResult ttr = createAndSendTreeTestResult(true);
+
+               ResultPartRequest req = createSimpleResultPartRequest(ttr);
+
+               log.info("Send ResultPartRequest for result " + req.getResultUuid());
+               template.marshalSendAndReceive(req);
+       }
+
+       public void testCloseTreeTestResultRequest() {
+               TreeTestResult ttr = createAndSendTreeTestResult(false);
+
+               ttr.close();
+               CloseTreeTestResultRequest req = new CloseTreeTestResultRequest(ttr
+                               .getUuid(), ttr.getCloseDate());
+               log.info("Send CloseTreeTestResultRequest for result "
+                               + req.getResultUuid());
+               template.marshalSendAndReceive(req);
+       }
+
+       protected TreeTestResult createAndSendTreeTestResult(boolean close) {
+               TreeTestResult ttr = createCompleteTreeTestResult();
+               log.info("Send CreateTreeTestResultRequest for result #"
+                               + ttr.getUuid());
+               template.marshalSendAndReceive(new CreateTreeTestResultRequest(ttr));
+
+               if (close)
+                       ttr.close();
+               return ttr;
+       }
+}
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java/org/argeo/slc/it/webapp/AgentTest.java b/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java/org/argeo/slc/it/webapp/AgentTest.java
new file mode 100644 (file)
index 0000000..f5f0201
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.argeo.slc.it.webapp;
+
+import java.net.InetAddress;
+
+import org.argeo.slc.runtime.SlcAgentDescriptor;
+import org.argeo.slc.server.unit.AbstractHttpClientTestCase;
+
+public class AgentTest extends AbstractHttpClientTestCase {
+       public void testListAgents() throws Exception {
+               SlcAgentDescriptor slcAgentDescriptor = getHttpClient()
+                               .waitForOneAgent();
+               assertEquals(InetAddress.getLocalHost().getHostName(),
+                               slcAgentDescriptor.getHost());
+       }
+
+}
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java/org/argeo/slc/it/webapp/SimpleScenarioTest.java b/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/java/org/argeo/slc/it/webapp/SimpleScenarioTest.java
new file mode 100644 (file)
index 0000000..e6d5cab
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.argeo.slc.it.webapp;
+
+import org.argeo.slc.Condition;
+import org.argeo.slc.msg.ObjectList;
+import org.argeo.slc.server.client.SlcServerHttpClient;
+import org.argeo.slc.server.unit.AbstractHttpClientTestCase;
+
+public class SimpleScenarioTest extends AbstractHttpClientTestCase {
+       public void testSimpleScenario() throws Exception {
+               String moduleName = "org.argeo.slc.demo.basic";
+               getHttpClient().startFlowDefault(moduleName, "main", null);
+
+               getHttpClient().callServiceSafe(SlcServerHttpClient.LIST_RESULTS, null,
+                               new Condition<ObjectList>() {
+
+                                       public Boolean check(ObjectList obj) {
+                                               return obj.getObjects().size() == 3;
+                                       }
+                               }, null);
+
+               getHttpClient().callServiceSafe(SlcServerHttpClient.LIST_RESULTS, null,
+                               new Condition<ObjectList>() {
+
+                                       public Boolean check(ObjectList obj) {
+                                               return obj.getObjects().size() == 3;
+                                       }
+                               }, null);
+       }
+}
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ant/build.xml b/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ant/build.xml
new file mode 100644 (file)
index 0000000..a90fbde
--- /dev/null
@@ -0,0 +1,43 @@
+<!--\r
+\r
+    Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+\r
+<project default="test">\r
+\r
+       <target name="test">\r
+               <echo message="Hello World!" />\r
+\r
+               <slc.test>\r
+                       <testDefinition bean="testDef" />\r
+                       <testData bean="testData1" />\r
+               </slc.test>\r
+\r
+               <slc.test>
+                       <testDefinition bean="testDef" />
+                       <testData bean="testData.context1" />
+               </slc.test>
+
+               <slc.test path="/testRoot/testContext">
+                       <testDefinition bean="testDef" />
+                       <testData bean="testData.context1" />
+               </slc.test>
+
+               <slc.closeResult>
+                       <result bean="testResult" />
+               </slc.closeResult>\r
+       </target>\r
+</project>
\ No newline at end of file
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ant/nonDepContext.xml b/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ant/nonDepContext.xml
new file mode 100644 (file)
index 0000000..07f09b0
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+\r
+    Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <import\r
+               resource="classpath:/org/argeo/slc/core/test/spring/applicationContext.xml" />\r
+\r
+       <bean name="testDef"\r
+               class="org.argeo.slc.core.test.BasicTestDefinition" scope="prototype" />\r
+\r
+       <bean name="testData1"\r
+               class="org.argeo.slc.core.test.BasicTestData">\r
+               <property name="expected">\r
+                       <value>toto</value>\r
+               </property>\r
+               <property name="reached">\r
+                       <value>toto</value>\r
+               </property>\r
+       </bean>\r
+\r
+       <bean id="testData.context1" parent="context.template">\r
+               <property name="values">\r
+                       <map>\r
+                               <entry key="reference" value="20" />\r
+                               <entry key="varIntern" value="60" />\r
+                       </map>\r
+               </property>\r
+               <property name="expectedValues">\r
+                       <map>\r
+                               <entry key="reference" value="21" />\r
+                               <entry key="varIntern" value="60" />\r
+                       </map>\r
+               </property>\r
+       </bean>\r
+\r
+       <bean id="context.template"\r
+               class="org.argeo.slc.core.test.context.DefaultContextTestData"\r
+               abstract="true">\r
+       </bean>\r
+\r
+</beans>
\ No newline at end of file
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ws/applicationContext.xml b/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources-old/org/argeo/slc/ws/applicationContext.xml
new file mode 100644 (file)
index 0000000..bd70b4b
--- /dev/null
@@ -0,0 +1,45 @@
+<!--
+
+    Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <import
+               resource="classpath:/org/argeo/slc/ws/client/spring/applicationContext.xml" />
+       <import resource="classpath:/org/argeo/slc/ant/nonDepContext.xml" />
+
+       <bean name="executionBuildListener"
+               class="org.argeo.slc.ant.SlcExecutionBuildListener">
+               <property name="notifiers">
+                       <list>
+                               <ref bean="slcDefault.ws.client.slcExecutionNotifier" />
+                       </list>
+               </property>
+       </bean>
+
+       <bean id="testResult"
+               parent="slcDefault.test.basicTreeTestResult">
+               <property name="listeners">
+                       <list merge="true">
+                               <ref
+                                       bean="slcDefault.ws.client.treeTestResultWsNotfier" />
+                       </list>
+               </property>
+       </bean>
+</beans>
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources/log4j.properties b/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources/log4j.properties
new file mode 100644 (file)
index 0000000..bd20b8e
--- /dev/null
@@ -0,0 +1,14 @@
+log4j.rootLogger=WARN, console\r
+\r
+## Levels\r
+# SLC\r
+log4j.logger.org.argeo=DEBUG\r
+\r
+## Appenders\r
+# A1 is set to be a ConsoleAppender.\r
+log4j.appender.console=org.apache.log4j.ConsoleAppender\r
+\r
+# A1 uses PatternLayout.\r
+log4j.appender.console.layout=org.apache.log4j.PatternLayout\r
+log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} %m - %c%n\r
+\r
diff --git a/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources/org/argeo/slc/it/webapp/applicationContext.xml b/legacy/integration-tests/org.argeo.slc.it.webapp/src/test/resources/org/argeo/slc/it/webapp/applicationContext.xml
new file mode 100644 (file)
index 0000000..0e01c02
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
+       default-lazy-init="true">
+
+       <import resource="classpath:org/argeo/slc/server/client/spring.xml" />
+
+       <!-- Http client -->
+       <bean id="serverHttpClient" parent="slcTemplate.serverHttpClient">
+               <property name="baseUrl" value="http://localhost:7080/org.argeo.slc.webapp/" />
+       </bean>
+
+</beans>
\ No newline at end of file
diff --git a/legacy/integration-tests/pom.xml b/legacy/integration-tests/pom.xml
new file mode 100644 (file)
index 0000000..51d5311
--- /dev/null
@@ -0,0 +1,28 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>argeo-slc</artifactId>
+               <version>0.13.1-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <groupId>org.argeo.slc</groupId>
+       <artifactId>integration-tests</artifactId>
+       <packaging>pom</packaging>
+       <name>SLC Integration Tests</name>
+       <profiles>
+               <profile>
+                       <id>withIT</id>
+                       <activation>
+                               <activeByDefault>true</activeByDefault>
+                       </activation>
+                       <modules>
+                               <module>org.argeo.slc.it.webapp</module>
+                       </modules>
+               </profile>
+               <profile>
+                       <id>withoutIT</id>
+               </profile>
+       </profiles>
+</project>
diff --git a/legacy/runtime/org.argeo.slc.server/.classpath b/legacy/runtime/org.argeo.slc.server/.classpath
new file mode 100644 (file)
index 0000000..1747515
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<classpath>\r
+       <classpathentry kind="src" output="target/classes" path="src/main/java"/>\r
+       <classpathentry kind="src" output="target/classes" path="src/main/resources"/>\r
+       <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>\r
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
+       <classpathentry kind="output" path="target/classes"/>\r
+</classpath>\r
diff --git a/legacy/runtime/org.argeo.slc.server/.project b/legacy/runtime/org.argeo.slc.server/.project
new file mode 100644 (file)
index 0000000..278b92d
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.server</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/legacy/runtime/org.argeo.slc.server/.settings/org.eclipse.jdt.core.prefs b/legacy/runtime/org.argeo.slc.server/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..e71a107
--- /dev/null
@@ -0,0 +1,12 @@
+#Fri Aug 29 11:25:17 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/legacy/runtime/org.argeo.slc.server/.settings/org.eclipse.ltk.core.refactoring.prefs b/legacy/runtime/org.argeo.slc.server/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644 (file)
index 0000000..4b61c77
--- /dev/null
@@ -0,0 +1,3 @@
+#Mon Jul 12 16:05:07 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/legacy/runtime/org.argeo.slc.server/.settings/org.springframework.ide.eclipse.core.prefs b/legacy/runtime/org.argeo.slc.server/.settings/org.springframework.ide.eclipse.core.prefs
new file mode 100644 (file)
index 0000000..b93b9bd
--- /dev/null
@@ -0,0 +1,19 @@
+#Sun Jan 11 18:26:20 CET 2009
+eclipse.preferences.version=1
+org.springframework.ide.eclipse.core.builders.enable.beanmetadatabuilder=false
+org.springframework.ide.eclipse.core.enable.project.preferences=false
+org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.core.springvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanAlias-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanClass-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanConstructorArgument-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinition-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinitionHolder-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanFactory-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanInitDestroyMethod-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanReference-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.methodOverride-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.parsingProblems-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.requiredProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.core.springClasspath-org.springframework.ide.eclipse.core.springvalidator=false
diff --git a/legacy/runtime/org.argeo.slc.server/.springBeans b/legacy/runtime/org.argeo.slc.server/.springBeans
new file mode 100644 (file)
index 0000000..c11d814
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beansProjectDescription>
+       <version>1</version>
+       <pluginVersion><![CDATA[2.2.1.v200811281800]]></pluginVersion>
+       <configSuffixes>
+               <configSuffix><![CDATA[xml]]></configSuffix>
+       </configSuffixes>
+       <enableImports><![CDATA[true]]></enableImports>
+       <configs>
+       </configs>
+       <configSets>
+       </configSets>
+</beansProjectDescription>
diff --git a/legacy/runtime/org.argeo.slc.server/pom.xml b/legacy/runtime/org.argeo.slc.server/pom.xml
new file mode 100644 (file)
index 0000000..f43d284
--- /dev/null
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>runtime</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <groupId>org.argeo.slc.runtime</groupId>
+       <artifactId>org.argeo.slc.server</artifactId>
+       <name>SLC Server</name>
+       <description>SLC Server</description>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <configuration>
+                                       <instructions>
+                                               <Export-Package>
+                                                       org.argeo.slc.*,org.argeo.slc.server,org.argeo.slc.server.spring
+                                               </Export-Package>
+                                               <Import-Package>org.w3c.dom;version="0.0.0",
+                                                       javax.xml.*;version="0.0.0",
+                                                       org.argeo.slc.activemq;resolution:=optional,
+                                                       org.argeo.slc.execution,
+                                                       org.springframework.context.support,
+                                                       org.tmatesoft.svn.*;resolution:=optional,
+                                                       com.lowagie.*;resolution:=optional,
+                                                       com.springsource.json.*;resolution:=optional,
+                                                       org.springframework.oxm.*;resolution:=optional,
+                                                       *
+                                               </Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+       <dependencies>
+               <!-- Commons -->
+               <dependency>
+                       <groupId>org.argeo.commons.security</groupId>
+                       <artifactId>org.argeo.security.core</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+
+               <!-- SLC -->
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.core</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+
+               <!-- Spring -->
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.springframework.web</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.springframework.web.servlet</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.springframework.aop</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.springframework.oxm</artifactId>
+                       <optional>true</optional>
+               </dependency>
+
+               <!-- Web -->
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.apache.commons.fileupload</artifactId>
+               </dependency>
+
+               <!-- J2EE -->
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>javax.servlet</artifactId>
+               </dependency>
+
+               <!-- AOP -->
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.aspectj.weaver</artifactId>
+               </dependency>
+
+               <!-- Docs -->
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>jxl</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>com.lowagie.text</artifactId>
+               </dependency>
+
+               <!-- Security -->
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>com.springsource.json</artifactId>
+                       <optional>true</optional>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.antlr</artifactId>
+                       <optional>true</optional>
+               </dependency>
+
+               <!-- SVN -->
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>org.tmatesoft.svn</artifactId>
+                       <optional>true</optional>
+               </dependency>
+
+               <!-- Commons VFS <dependency> <groupId>org.apache.commons</groupId> <artifactId>com.springsource.org.apache.commons.vfs</artifactId> 
+                       </dependency> -->
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/AgentService.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/AgentService.java
new file mode 100644 (file)
index 0000000..0c74e8e
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.services;
+
+import org.argeo.slc.runtime.SlcAgentDescriptor;
+
+public interface AgentService {
+       public void register(SlcAgentDescriptor slcAgentDescriptor);
+
+       public void unregister(SlcAgentDescriptor slcAgentDescriptor);
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/EventPublisherAspect.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/EventPublisherAspect.java
new file mode 100644 (file)
index 0000000..a2fb8b4
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.services;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.msg.MsgConstants;
+import org.argeo.slc.msg.event.SlcEvent;
+import org.argeo.slc.msg.event.SlcEventPublisher;
+import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
+import org.argeo.slc.process.SlcExecution;
+import org.argeo.slc.runtime.SlcAgentDescriptor;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.After;
+import org.aspectj.lang.annotation.Aspect;
+
+@Aspect
+public class EventPublisherAspect {
+       public final static String EVT_AGENT_REGISTERED = "agentRegistered";
+       public final static String EVT_AGENT_UNREGISTERED = "agentUnregistered";
+       public final static String EVT_NEW_SLC_EXECUTION = "newSlcExecution";
+       public final static String EVT_UPDATE_SLC_EXECUTION_STATUS = "updateSlcExecutionStatus";
+
+       private final static Log log = LogFactory
+                       .getLog(EventPublisherAspect.class);
+
+       private List<SlcEventPublisher> eventPublishers;
+
+       @After("execution(void org.argeo.slc.services.AgentService.register(..))")
+       public void registerAgent(JoinPoint jp) throws Throwable {
+               SlcAgentDescriptor agentDescriptor = (SlcAgentDescriptor) jp.getArgs()[0];
+               SlcEvent event = new SlcEvent(EVT_AGENT_REGISTERED);
+               event.getHeaders().put(MsgConstants.PROPERTY_SLC_AGENT_ID,
+                               agentDescriptor.getUuid());
+               publishEvent(event);
+       }
+
+       @After("execution(void org.argeo.slc.services.AgentService.unregister(..))")
+       public void unregisterAgent(JoinPoint jp) throws Throwable {
+               SlcAgentDescriptor agentDescriptor = (SlcAgentDescriptor) jp.getArgs()[0];
+               SlcEvent event = new SlcEvent(EVT_AGENT_UNREGISTERED);
+               event.getHeaders().put(MsgConstants.PROPERTY_SLC_AGENT_ID,
+                               agentDescriptor.getUuid());
+               publishEvent(event);
+       }
+
+       @After("execution(void org.argeo.slc.services.SlcExecutionService.newExecution(..))")
+       public void newSlcExecution(JoinPoint jp) throws Throwable {
+               SlcExecution slcExecution = (SlcExecution) jp.getArgs()[0];
+               SlcEvent event = new SlcEvent(EVT_NEW_SLC_EXECUTION);
+               event.getHeaders().put(MsgConstants.PROPERTY_SLC_EXECUTION_ID,
+                               slcExecution.getUuid());
+               publishEvent(event);
+       }
+
+       @After("execution(void org.argeo.slc.services.SlcExecutionService.updateStatus(..))")
+       public void updateSlcExecutionStatus(JoinPoint jp) throws Throwable {
+               SlcExecutionStatusRequest msg = (SlcExecutionStatusRequest) jp
+                               .getArgs()[0];
+               SlcEvent event = new SlcEvent(EVT_UPDATE_SLC_EXECUTION_STATUS);
+               event.getHeaders().put(MsgConstants.PROPERTY_SLC_EXECUTION_ID,
+                               msg.getSlcExecutionUuid());
+               event.getHeaders().put(MsgConstants.PROPERTY_SLC_EXECUTION_STATUS,
+                               msg.getNewStatus());
+               publishEvent(event);
+       }
+
+       public void setEventPublishers(List<SlcEventPublisher> eventPublishers) {
+               this.eventPublishers = eventPublishers;
+       }
+
+       protected void publishEvent(SlcEvent event) {
+
+               for (Iterator<SlcEventPublisher> it = eventPublishers.iterator(); it
+                               .hasNext();) {
+                       SlcEventPublisher eventPublisher = it.next();
+                       if (log.isTraceEnabled())
+                               log.debug("Publish event: "
+                                               + event.getHeaders().get(SlcEvent.EVENT_TYPE) + " to "
+                                               + eventPublisher);
+                       eventPublisher.publish(event);
+               }
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/ServiceMsgHandler.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/ServiceMsgHandler.java
new file mode 100644 (file)
index 0000000..405741e
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.services;
+
+import org.argeo.slc.SlcException;
+import org.argeo.slc.msg.MsgHandler;
+import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
+import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
+import org.argeo.slc.msg.test.tree.AddTreeTestResultAttachmentRequest;
+import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;
+import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;
+import org.argeo.slc.msg.test.tree.ResultPartRequest;
+import org.argeo.slc.process.SlcExecution;
+
+public class ServiceMsgHandler implements MsgHandler {
+       private TestManagerService testManagerService;
+       private SlcExecutionService slcExecutionService;
+
+       public Object handleMsg(Object msg) {
+               if (msg instanceof SlcExecution)
+                       slcExecutionService.newExecution((SlcExecution) msg);
+               else if (msg instanceof SlcExecutionStepsRequest)
+                       slcExecutionService.addSteps((SlcExecutionStepsRequest) msg);
+               else if (msg instanceof SlcExecutionStatusRequest)
+                       slcExecutionService.updateStatus((SlcExecutionStatusRequest) msg);
+               else if (msg instanceof CreateTreeTestResultRequest)
+                       testManagerService
+                                       .createTreeTestResult((CreateTreeTestResultRequest) msg);
+               else if (msg instanceof ResultPartRequest)
+                       testManagerService.addResultPart((ResultPartRequest) msg);
+               else if (msg instanceof CloseTreeTestResultRequest)
+                       testManagerService
+                                       .closeTreeTestResult((CloseTreeTestResultRequest) msg);
+               else if (msg instanceof AddTreeTestResultAttachmentRequest)
+                       testManagerService
+                                       .addAttachment((AddTreeTestResultAttachmentRequest) msg);
+               else
+                       throw new SlcException("Unrecognized message type " + msg);
+               return null;
+       }
+
+       public void setTestManagerService(TestManagerService testManagerService) {
+               this.testManagerService = testManagerService;
+       }
+
+       public void setSlcExecutionService(SlcExecutionService slcExecutionService) {
+               this.slcExecutionService = slcExecutionService;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/SlcExecutionService.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/SlcExecutionService.java
new file mode 100644 (file)
index 0000000..79663b2
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.services;
+
+import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
+import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
+import org.argeo.slc.process.SlcExecution;
+
+public interface SlcExecutionService {
+       public void newExecution(SlcExecution slcExecutionMsg);
+
+       public void updateStatus(SlcExecutionStatusRequest msg);
+
+       public void addSteps(SlcExecutionStepsRequest msg);
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/TestManagerService.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/TestManagerService.java
new file mode 100644 (file)
index 0000000..306994c
--- /dev/null
@@ -0,0 +1,43 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.services;\r
+\r
+import org.argeo.slc.msg.test.tree.AddTreeTestResultAttachmentRequest;\r
+import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;\r
+import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;\r
+import org.argeo.slc.msg.test.tree.ResultPartRequest;\r
+import org.argeo.slc.test.TestRunDescriptor;\r
+\r
+/** Performs complex business operations. */\r
+public interface TestManagerService {\r
+       /** Performs operations related to the addition of a new test run. */\r
+       public void registerTestRunDescriptor(TestRunDescriptor testRunDescriptor);\r
+\r
+       /** Adds a result in a collection based on their ids. */\r
+       public void addResultToCollection(String collectionId, String resultUuid);\r
+\r
+       /** Removes a result from a collection based on their ids. */\r
+       public void removeResultFromCollection(String collectionId,\r
+                       String resultUuid);\r
+\r
+       public void createTreeTestResult(CreateTreeTestResultRequest msg);\r
+\r
+       public void addResultPart(ResultPartRequest msg);\r
+\r
+       public void addAttachment(AddTreeTestResultAttachmentRequest msg);\r
+\r
+       public void closeTreeTestResult(CloseTreeTestResultRequest msg);\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/AgentServiceImpl.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/AgentServiceImpl.java
new file mode 100644 (file)
index 0000000..7f525c2
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.services.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.Executor;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.dao.runtime.SlcAgentDescriptorDao;
+import org.argeo.slc.runtime.SlcAgent;
+import org.argeo.slc.runtime.SlcAgentDescriptor;
+import org.argeo.slc.runtime.SlcAgentFactory;
+import org.argeo.slc.services.AgentService;
+import org.springframework.beans.factory.DisposableBean;
+import org.springframework.beans.factory.InitializingBean;
+
+public class AgentServiceImpl implements AgentService, InitializingBean,
+               DisposableBean {
+       private final static Log log = LogFactory.getLog(AgentServiceImpl.class);
+
+       private final SlcAgentDescriptorDao slcAgentDescriptorDao;
+       private final SlcAgentFactory agentFactory;
+
+       private Executor systemExecutor;
+
+       private Long pingCycle = 20000l;
+
+       private Boolean pingThreadActive = true;
+
+       public AgentServiceImpl(SlcAgentDescriptorDao slcAgentDescriptorDao,
+                       SlcAgentFactory agentFactory) {
+               this.slcAgentDescriptorDao = slcAgentDescriptorDao;
+               this.agentFactory = agentFactory;
+       }
+
+       public void register(SlcAgentDescriptor slcAgentDescriptor) {
+               if (slcAgentDescriptorDao.getAgentDescriptor(slcAgentDescriptor
+                               .getUuid()) == null)
+                       slcAgentDescriptorDao.create(slcAgentDescriptor);
+               log.info("Registered agent #" + slcAgentDescriptor.getUuid());
+       }
+
+       public void unregister(SlcAgentDescriptor slcAgentDescriptor) {
+               slcAgentDescriptorDao.delete(slcAgentDescriptor);
+               log.info("Unregistered agent #" + slcAgentDescriptor.getUuid());
+       }
+
+       public void afterPropertiesSet() throws Exception {
+               // if (pingCycle > 0)
+               // new PingThread().start();
+               if (pingCycle > 0) {
+                       Thread authenticatedThread = new Thread("SLC Agents Ping") {
+                               public void run() {
+                                       systemExecutor.execute(new AgentsPing());
+                               }
+                       };
+                       authenticatedThread.start();
+
+               }
+       }
+
+       public synchronized void destroy() throws Exception {
+               pingThreadActive = false;
+               notifyAll();
+       }
+
+       public void setPingCycle(Long pingCycle) {
+               this.pingCycle = pingCycle;
+       }
+
+       public void setSystemExecutor(Executor securityService) {
+               this.systemExecutor = securityService;
+       }
+
+       protected class AgentsPing implements Runnable {
+               public void run() {
+
+                       // FIXME: temporary hack so that the ping starts after the server
+                       // has been properly started.
+                       try {
+                               Thread.sleep(10 * 1000);
+                       } catch (InterruptedException e1) {
+                               // silent
+                       }
+
+                       log.info("Start pinging agents.");
+                       while (pingThreadActive) {
+                               List<SlcAgentDescriptor> lst = slcAgentDescriptorDao
+                                               .listSlcAgentDescriptors();
+                               List<String> agentIds = new ArrayList<String>();
+                               for (SlcAgentDescriptor ad : lst)
+                                       agentIds.add(ad.getUuid());
+
+                               if (log.isTraceEnabled())
+                                       log.trace("Ping " + agentIds.size() + " agent(s).");
+                               for (String agentId : agentIds) {
+                                       SlcAgent agent = agentFactory.getAgent(agentId);
+                                       if (!agent.ping()) {
+                                               log.info("Agent " + agentId + " did not reply to ping,"
+                                                               + " removing its descriptor...");
+                                               slcAgentDescriptorDao.delete(agentId);
+                                       }
+                               }
+
+                               lst = slcAgentDescriptorDao.listSlcAgentDescriptors();
+                               agentIds = new ArrayList<String>();
+                               for (SlcAgentDescriptor ad : lst)
+                                       agentIds.add(ad.getUuid());
+                               agentFactory.pingAll(agentIds);
+
+                               synchronized (AgentServiceImpl.this) {
+                                       try {
+                                               AgentServiceImpl.this.wait(pingCycle);
+                                       } catch (InterruptedException e) {
+                                               // silent
+                                       }
+                               }
+                       }
+                       log.info("Stopped pinging agents.");
+               }
+
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceAdapter.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceAdapter.java
new file mode 100644 (file)
index 0000000..0b68375
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.services.impl;
+
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.execution.ExecutionProcess;
+import org.argeo.slc.execution.ExecutionStep;
+import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
+import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
+import org.argeo.slc.process.SlcExecutionNotifier;
+import org.argeo.slc.process.SlcExecutionStep;
+import org.argeo.slc.services.SlcExecutionService;
+
+/** In memory bridge between SLC execution notifier and service. */
+@SuppressWarnings("deprecation")
+public class SlcExecutionServiceAdapter implements SlcExecutionNotifier {
+       private final static Log log = LogFactory
+                       .getLog(SlcExecutionServiceAdapter.class);
+
+       private SlcExecutionService slcExecutionService;
+
+       public void updateStatus(ExecutionProcess slcExecution, String oldStatus,
+                       String newStatus) {
+               SlcExecutionStatusRequest req = new SlcExecutionStatusRequest(
+                               slcExecution.getUuid(), newStatus);
+               try {
+                       slcExecutionService.updateStatus(req);
+               } catch (Exception e) {
+                       log.trace("Cannot update process status " + e);
+               }
+       }
+
+       public void addSteps(ExecutionProcess slcExecution,
+                       List<ExecutionStep> additionalSteps) {
+               SlcExecutionStepsRequest req = new SlcExecutionStepsRequest(
+                               slcExecution.getUuid(), additionalSteps);
+               try {
+                       slcExecutionService.addSteps(req);
+               } catch (Exception e) {
+                       log.trace("Cannot add steps " + e);
+               }
+       }
+
+       public void setSlcExecutionService(SlcExecutionService slcExecutionService) {
+               this.slcExecutionService = slcExecutionService;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceImpl.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceImpl.java
new file mode 100644 (file)
index 0000000..d8f3562
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.services.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.dao.process.SlcExecutionDao;
+import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
+import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
+import org.argeo.slc.process.SlcExecution;
+import org.argeo.slc.process.SlcExecutionStep;
+import org.argeo.slc.services.SlcExecutionService;
+
+public class SlcExecutionServiceImpl implements SlcExecutionService {
+       private final Log log = LogFactory.getLog(getClass());
+
+       private final SlcExecutionDao slcExecutionDao;
+
+       public SlcExecutionServiceImpl(SlcExecutionDao slcExecutionDao) {
+               this.slcExecutionDao = slcExecutionDao;
+       }
+
+       public void newExecution(SlcExecution slcExecutionMsg) {
+               SlcExecution slcExecutionPersisted = slcExecutionDao
+                               .getSlcExecution(slcExecutionMsg.getUuid());
+               if (slcExecutionPersisted == null) {
+                       if (log.isTraceEnabled())
+                               log.trace("Creating SLC execution #"
+                                               + slcExecutionMsg.getUuid());
+
+                       slcExecutionDao.create(slcExecutionMsg);
+               } else {
+                       throw new SlcException(
+                                       "There is already an SlcExecution registered with id "
+                                                       + slcExecutionMsg.getUuid());
+                       // if (log.isTraceEnabled())
+                       // log.trace("Updating SLC execution #"
+                       // + slcExecutionMsg.getUuid());
+                       //
+                       // slcExecutionDao.merge(slcExecutionMsg);
+               }
+       }
+
+       public void updateStatus(SlcExecutionStatusRequest msg) {
+               SlcExecution slcExecution = slcExecutionDao.getSlcExecution(msg
+                               .getSlcExecutionUuid());
+               if (slcExecution == null)
+                       throw new SlcException("Could not find SLC execution #"
+                                       + msg.getSlcExecutionUuid());
+
+               slcExecution.setStatus(msg.getNewStatus());
+
+               if (msg.getNewStatus().equals(SlcExecution.COMPLETED)) {
+                       List<SlcExecutionStep> steps = new ArrayList<SlcExecutionStep>();
+                       steps.add(new SlcExecutionStep(SlcExecutionStep.END,
+                                       "Process finished."));
+                       slcExecutionDao.addSteps(slcExecution.getUuid(), steps);
+               }
+
+               if (log.isTraceEnabled())
+                       log.trace("Updating status for SLC execution #"
+                                       + slcExecution.getUuid() + " to status "
+                                       + msg.getNewStatus());
+
+               slcExecutionDao.update(slcExecution);
+       }
+
+       public void addSteps(SlcExecutionStepsRequest msg) {
+               slcExecutionDao.addSteps(msg.getSlcExecutionUuid(), msg.getSteps());
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/TestManagerServiceAdapter.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/TestManagerServiceAdapter.java
new file mode 100644 (file)
index 0000000..8f9985c
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.services.impl;
+
+import org.argeo.slc.core.attachment.Attachment;
+import org.argeo.slc.core.attachment.SimpleAttachment;
+import org.argeo.slc.core.test.tree.TreeTestResult;
+import org.argeo.slc.core.test.tree.TreeTestResultListener;
+import org.argeo.slc.msg.test.tree.AddTreeTestResultAttachmentRequest;
+import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;
+import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;
+import org.argeo.slc.msg.test.tree.ResultPartRequest;
+import org.argeo.slc.services.TestManagerService;
+import org.argeo.slc.test.TestResultPart;
+
+/** In memory access to a test manager service */
+public class TestManagerServiceAdapter implements TreeTestResultListener {
+       private Boolean onlyOnClose = false;
+
+       private TestManagerService testManagerService;
+
+       public void resultPartAdded(TreeTestResult testResult,
+                       TestResultPart testResultPart) {
+               if (onlyOnClose)
+                       return;
+
+               if (testResult.getResultParts().size() == 1
+                               && testResult.getResultParts().values().iterator().next()
+                                               .getParts().size() == 1) {
+                       CreateTreeTestResultRequest req = new CreateTreeTestResultRequest(
+                                       testResult);
+                       testManagerService.createTreeTestResult(req);
+               } else {
+                       ResultPartRequest req = new ResultPartRequest(testResult);
+                       testManagerService.addResultPart(req);
+               }
+       }
+
+       public void close(TreeTestResult testResult) {
+               if (onlyOnClose) {
+                       CreateTreeTestResultRequest req = new CreateTreeTestResultRequest(
+                                       testResult);
+                       testManagerService.createTreeTestResult(req);
+               } else {
+                       CloseTreeTestResultRequest req = new CloseTreeTestResultRequest(
+                                       testResult);
+                       testManagerService.closeTreeTestResult(req);
+               }
+       }
+
+       public void addAttachment(TreeTestResult testResult, Attachment attachment) {
+               if (onlyOnClose)
+                       return;
+               AddTreeTestResultAttachmentRequest req = new AddTreeTestResultAttachmentRequest();
+               req.setResultUuid(testResult.getUuid());
+               req.setAttachment((SimpleAttachment) attachment);
+               testManagerService.addAttachment(req);
+
+       }
+
+       /** Publishes the test result only when it gets closed. */
+       public void setOnlyOnClose(Boolean onlyOnClose) {
+               this.onlyOnClose = onlyOnClose;
+       }
+
+       public void setTestManagerService(TestManagerService testManagerService) {
+               this.testManagerService = testManagerService;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/TestManagerServiceImpl.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/TestManagerServiceImpl.java
new file mode 100644 (file)
index 0000000..1e02979
--- /dev/null
@@ -0,0 +1,165 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.services.impl;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.argeo.slc.core.test.tree.TreeTestResult;\r
+import org.argeo.slc.core.test.tree.TreeTestResultCollection;\r
+import org.argeo.slc.dao.process.SlcExecutionDao;\r
+import org.argeo.slc.dao.test.TestRunDescriptorDao;\r
+import org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao;\r
+import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
+import org.argeo.slc.msg.test.tree.AddTreeTestResultAttachmentRequest;\r
+import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;\r
+import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;\r
+import org.argeo.slc.msg.test.tree.ResultPartRequest;\r
+import org.argeo.slc.process.SlcExecution;\r
+import org.argeo.slc.services.TestManagerService;\r
+import org.argeo.slc.test.TestRunDescriptor;\r
+\r
+/**\r
+ * Implementation of complex operations impacting the underlying data.\r
+ */\r
+public class TestManagerServiceImpl implements TestManagerService {\r
+       private Log log = LogFactory.getLog(getClass());\r
+\r
+       private final TreeTestResultDao treeTestResultDao;\r
+       private final TestRunDescriptorDao testRunDescriptorDao;\r
+       private final SlcExecutionDao slcExecutionDao;\r
+       private final TreeTestResultCollectionDao treeTestResultCollectionDao;\r
+\r
+       private String defaultCollectionId = "default";\r
+       \r
+       public TestManagerServiceImpl(TreeTestResultDao treeTestResultDao,\r
+                       TestRunDescriptorDao testRunDescriptorDao,\r
+                       SlcExecutionDao slcExecutionDao,\r
+                       TreeTestResultCollectionDao treeTestResultCollectionDao) {\r
+               this.treeTestResultDao = treeTestResultDao;\r
+               this.testRunDescriptorDao = testRunDescriptorDao;\r
+               this.slcExecutionDao = slcExecutionDao;\r
+               this.treeTestResultCollectionDao = treeTestResultCollectionDao;\r
+       }\r
+\r
+       public void registerTestRunDescriptor(TestRunDescriptor testRunDescriptor) {\r
+               if (testRunDescriptor != null) {\r
+                       if (log.isTraceEnabled())\r
+                               log.trace("Registering test run descriptor #"\r
+                                               + testRunDescriptor.getTestRunUuid());\r
+                       testRunDescriptorDao.saveOrUpdate(testRunDescriptor);\r
+\r
+                       // Update tree test result collection\r
+                       // TODO: optimize\r
+\r
+                       if (testRunDescriptor.getSlcExecutionUuid() != null) {\r
+                               SlcExecution slcExecution = slcExecutionDao\r
+                                               .getSlcExecution(testRunDescriptor\r
+                                                               .getSlcExecutionUuid());\r
+                               if (slcExecution != null) {\r
+                                       // Use Host as collection ID if host is available\r
+                                       String collectionId = slcExecution.getHost() != null ? slcExecution\r
+                                                       .getHost()\r
+                                                       : defaultCollectionId;\r
+                                       addResultToCollection(collectionId, testRunDescriptor\r
+                                                       .getTestResultUuid());\r
+                               }\r
+                       } else {\r
+                               if (log.isTraceEnabled())\r
+                                       log.trace("ResultUUID="\r
+                                                       + testRunDescriptor.getTestResultUuid());\r
+                               addResultToCollection(defaultCollectionId, testRunDescriptor\r
+                                               .getTestResultUuid());\r
+                       }\r
+               }\r
+       }\r
+\r
+       public void addResultToCollection(String collectionId, String resultUuid) {\r
+               // TODO: improve collections\r
+               TreeTestResultCollection ttrc = treeTestResultCollectionDao\r
+                               .getTestResultCollection(collectionId);\r
+               if (ttrc == null) {\r
+                       ttrc = new TreeTestResultCollection(collectionId);\r
+                       treeTestResultCollectionDao.create(ttrc);\r
+               }\r
+               treeTestResultCollectionDao.addResultToCollection(ttrc, resultUuid);\r
+       }\r
+\r
+       public void removeResultFromCollection(String collectionId,\r
+                       String resultUuid) {\r
+               TreeTestResultCollection ttrc = treeTestResultCollectionDao\r
+                               .getTestResultCollection(collectionId);\r
+               if (ttrc != null) {\r
+                       treeTestResultCollectionDao.removeResultFromCollection(ttrc,\r
+                                       resultUuid);\r
+               }\r
+\r
+               // Delete collection if empty\r
+               // see https://www.argeo.org/bugzilla/show_bug.cgi?id=74\r
+               if (ttrc.getResults().size() == 0) {\r
+                       treeTestResultCollectionDao.delete(ttrc);\r
+               }\r
+       }\r
+\r
+       public void createTreeTestResult(CreateTreeTestResultRequest msg) {\r
+               TreeTestResult treeTestResult = msg.getTreeTestResult();\r
+\r
+               if (log.isTraceEnabled())\r
+                       log.trace("Creating result #" + treeTestResult.getUuid());\r
+               treeTestResultDao.create(treeTestResult);\r
+\r
+               registerTestRunDescriptor(msg.getTestRunDescriptor());\r
+\r
+               // FIXME: temporary hack before better collection management is found\r
+               if (msg.getTestRunDescriptor() == null) {\r
+                       addResultToCollection("default", treeTestResult.getUuid());\r
+               }\r
+       }\r
+\r
+       public void addResultPart(ResultPartRequest msg) {\r
+               // registerTestRunDescriptor(msg.getTestRunDescriptor());\r
+\r
+               if (log.isTraceEnabled())\r
+                       log.trace("Adding result part to test result #"\r
+                                       + msg.getResultUuid());\r
+\r
+               treeTestResultDao.addResultPart(msg.getResultUuid(), msg.getPath(), msg\r
+                               .getResultPart(), msg.getRelatedElements());\r
+               // treeTestResultDao.updateAttributes(msg.getResultUuid(), msg\r
+               // .getAttributes());\r
+       }\r
+\r
+       public void closeTreeTestResult(CloseTreeTestResultRequest msg) {\r
+               if (log.isTraceEnabled())\r
+                       log.trace("Closing result #" + msg.getResultUuid() + " at date "\r
+                                       + msg.getCloseDate());\r
+\r
+               treeTestResultDao.close(msg.getResultUuid(), msg.getCloseDate());\r
+       }\r
+\r
+       public void addAttachment(AddTreeTestResultAttachmentRequest msg) {\r
+               if (log.isTraceEnabled())\r
+                       log.trace("Adding attachment " + msg.getAttachment()\r
+                                       + " to result #" + msg.getResultUuid());\r
+               treeTestResultDao.addAttachment(msg.getResultUuid(), msg\r
+                               .getAttachment());\r
+\r
+       }\r
+\r
+       public void setDefaultCollectionId(String defaultCollectionId) {\r
+               this.defaultCollectionId = defaultCollectionId;\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpAction.java
new file mode 100644 (file)
index 0000000..400b0cc
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer;
+
+import javax.servlet.http.HttpServletRequest;
+
+public interface AjxpAction<T extends AjxpDriver>{
+       public AjxpAnswer execute(T driver, HttpServletRequest request);
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpAnswer.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpAnswer.java
new file mode 100644 (file)
index 0000000..308fd0a
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer;
+
+import javax.servlet.http.HttpServletResponse;
+
+public interface AjxpAnswer {
+       public static AjxpAnswer DO_NOTHING = new AjxpAnswer(){
+               public void updateResponse(HttpServletResponse response) {
+               }
+       };
+
+       public void updateResponse(HttpServletResponse response);
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpDriver.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpDriver.java
new file mode 100644 (file)
index 0000000..5df7a08
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer;
+
+import javax.servlet.http.HttpServletRequest;
+
+public interface AjxpDriver {
+       public AjxpAnswer executeAction(HttpServletRequest request); 
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpDriverException.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpDriverException.java
new file mode 100644 (file)
index 0000000..25c1fad
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer;
+
+public class AjxpDriverException extends RuntimeException {
+       static final long serialVersionUID = 1l;
+
+       public AjxpDriverException(String arg0) {
+               super(arg0);
+       }
+
+       public AjxpDriverException(String arg0, Throwable arg1) {
+               super(arg0, arg1);
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/SimpleAjxpDriver.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/SimpleAjxpDriver.java
new file mode 100644 (file)
index 0000000..754a9c9
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer;
+
+import java.util.Map;
+import java.util.TreeMap;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class SimpleAjxpDriver implements AjxpDriver {
+       protected final Log log = LogFactory.getLog(getClass());
+       private Map<String, AjxpAction<? extends AjxpDriver>> actions = new TreeMap<String, AjxpAction<? extends AjxpDriver>>();
+
+       public AjxpAnswer executeAction(HttpServletRequest request) {
+               String actionStr = request.getParameter("get_action");
+               if (actionStr == null) {
+                       actionStr = request.getParameter("action");
+               }
+               if (!actions.containsKey(actionStr)) {
+                       throw new AjxpDriverException("Action " + actionStr
+                                       + " not defined.");
+               }
+               AjxpAction action = actions.get(actionStr);
+               return action.execute(this,request);
+       }
+
+       public void setActions(Map<String, AjxpAction<? extends AjxpDriver>> actions) {
+               this.actions = actions;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/AbstractFileDownloadAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/AbstractFileDownloadAction.java
new file mode 100644 (file)
index 0000000..fca3243
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer.file;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.argeo.slc.web.ajaxplorer.AjxpAnswer;
+import org.argeo.slc.web.ajaxplorer.AjxpDriverException;
+
+public abstract class AbstractFileDownloadAction extends FileAction {
+       public AjxpAnswer execute(FileDriver driver, HttpServletRequest request) {
+               String fileStr = request.getParameter(getFileParameter());
+               if (fileStr == null) {
+                       throw new AjxpDriverException(
+                                       "A  file to download needs to be provided.");
+               }
+               File file = new File(driver.getBasePath() + fileStr);
+               return new AxpBasicDownloadAnswer(file);
+       }
+
+       /** Return 'file' by default. */
+       protected String getFileParameter() {
+               return "file";
+       }
+
+       /** To be overridden. Do nothing by default. */
+       protected void setHeaders(HttpServletResponse response, File file) {
+               // do nothing
+       }
+
+       protected class AxpBasicDownloadAnswer implements AjxpAnswer {
+               private final File file;
+
+               public AxpBasicDownloadAnswer(File file) {
+                       this.file = file;
+               }
+
+               public void updateResponse(HttpServletResponse response) {
+                       InputStream in = null;
+                       OutputStream out = null;
+                       try {
+                               setHeaders(response, file);
+
+                               if (log.isDebugEnabled())
+                                       log.debug("Download file " + file);
+                               in = FileUtils.openInputStream(file);
+                               out = response.getOutputStream();
+
+                               copyFile(in, out);
+                               out.flush();
+
+                       } catch (Exception e) {
+                               e.printStackTrace();
+                               throw new AjxpDriverException("Cannot download file " + file, e);
+                       } finally {
+                               IOUtils.closeQuietly(in);
+                               IOUtils.closeQuietly(out);
+                       }
+
+               }
+
+               protected void copyFile(InputStream in, OutputStream out)
+                               throws Exception {
+                       IOUtils.copy(in, out);
+               }
+
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/AjxpFile.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/AjxpFile.java
new file mode 100644 (file)
index 0000000..2a589a4
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer.file;
+
+import java.io.File;
+import java.net.URLEncoder;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.web.ajaxplorer.AjxpDriverException;
+
+public class AjxpFile {
+       private final static Log log = LogFactory.getLog(AjxpFile.class);
+
+       // FIXME: more generic modif time format?
+       private final static SimpleDateFormat sdf = new SimpleDateFormat(
+                       "dd/MM/yyyy hh:mm");
+
+       private final File file;
+       private final String parentPath;
+       private final String filePath;
+
+       private final String ext;
+       private final FileType type;
+
+       public AjxpFile(File file, String parentPath) {
+               this.file = file;
+               this.parentPath = parentPath;
+               if (parentPath.equals("/")) {
+                       this.filePath = "/" + file.getName();
+               } else {
+                       this.filePath = parentPath + "/" + file.getName();
+               }
+               this.ext = file.isDirectory() ? null : file.getName().substring(
+                               file.getName().indexOf('.') + 1);
+               this.type = FileType.findType(ext);
+       }
+
+       public String toXml(final LsMode mode, final String encoding) {
+               try {
+                       StringBuffer buf = new StringBuffer();
+                       buf.append("<tree");
+                       addAttr("text", file.getName(), buf);
+                       if (type != FileType.FOLDER) {
+                               if (mode == LsMode.SEARCH)
+                                       addAttr("is_file", "true", buf);// FIXME: consistent value?
+                               else if (mode == LsMode.FILE_LIST) {
+                                       addAttr("filename", filePath, buf);
+                                       addAttr("is_file", "1", buf);
+                                       addAttr("icon", type.getIcon(), buf);
+
+                                       addAttr("modiftime", formatModifTime(), buf);
+                                       addAttr("mimestring", type.getMimeString(), buf);
+                                       addAttr("filesize", formatFileSize(), buf);
+
+                                       if (type.isImage()) {
+                                               addAttr("is_image", "1", buf);
+                                               addAttr("image_type", type.getImageType(), buf);
+                                               addAttr("image_width", "100", buf);// FIXME: read image
+                                               addAttr("image_height", "100", buf);// FIXME: read image
+
+                                       } else {
+                                               addAttr("is_image", "0", buf);
+                                       }
+                               }
+
+                       } else {// dir
+                               if (mode == LsMode.NULL || mode == LsMode.FILE_LIST) {
+                                       addAttr("filename", filePath, buf);
+                                       if (mode == LsMode.NULL) {
+                                               addAttr("icon", "client/images/foldericon.png", buf);
+                                               addAttr("openicon", "client/images/openfoldericon.png",
+                                                               buf);
+                                               addAttr("parentName", parentPath, buf);
+                                               addAttr("src", "content.php?dir="
+                                                               + URLEncoder.encode(filePath, encoding), buf);
+                                               addAttr(
+                                                               "action",
+                                                               "javascript:ajaxplorer.getFoldersTree().clickNode(CURRENT_ID)",
+                                                               buf);
+                                       } else if (mode == LsMode.FILE_LIST) {
+                                               addAttr("icon", type.getIcon(), buf);// FIXME:
+                                               // consistent?
+                                               addAttr("is_file", "0", buf);
+                                               addAttr("is_image", "0", buf);
+                                               addAttr("mimestring", "Directory", buf);
+                                               addAttr("modiftime", formatModifTime(), buf);
+                                               addAttr("filesize", "-", buf);
+                                       }
+                               }
+
+                       }
+
+                       addAdditionalAttrs(buf, mode, encoding);
+
+                       buf.append("/>");
+
+                       if (log.isTraceEnabled())
+                               log.trace(buf.toString());
+
+                       return buf.toString();
+               } catch (Exception e) {
+                       throw new AjxpDriverException("Could not serialize file " + file, e);
+               }
+       }
+
+       private String formatModifTime() {
+               return sdf.format(new Date(file.lastModified()));
+       }
+
+       private String formatFileSize() {
+               return (file.length() / 1024) + " Kb";
+       }
+
+       protected void addAttr(String attrName, String attrValue, StringBuffer buf) {
+               buf.append(" ").append(attrName).append("=\"").append(attrValue)
+                               .append("\"");
+       }
+
+       /** To be overridden, do nothing by default. */
+       protected void addAdditionalAttrs(final StringBuffer buf,
+                       final LsMode mode, final String encoding) {
+
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileAction.java
new file mode 100644 (file)
index 0000000..ff0aee5
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer.file;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.web.ajaxplorer.AjxpAction;
+
+public abstract class FileAction implements AjxpAction<FileDriver> {
+       protected final Log log = LogFactory.getLog(getClass());
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDeleteAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDeleteAction.java
new file mode 100644 (file)
index 0000000..563bd01
--- /dev/null
@@ -0,0 +1,54 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.ajaxplorer.file;\r
+\r
+import java.io.File;\r
+import java.util.Map;\r
+\r
+import javax.servlet.http.HttpServletRequest;\r
+\r
+import org.argeo.slc.web.ajaxplorer.AjxpAnswer;\r
+\r
+public class FileDeleteAction<T extends FileDriver> extends FileAction {\r
+\r
+       public AjxpAnswer execute(FileDriver driver, HttpServletRequest request) {\r
+               Map<Object, Object> params = request.getParameterMap();\r
+               for (Object paramKey : params.keySet()) {\r
+                       String param = paramKey.toString();\r
+                       log.debug("param=" + param + " (" + params.get(paramKey));\r
+                       if (param.length() < 4)\r
+                               continue;\r
+                       else {\r
+\r
+                               if (param.substring(0, 4).equals("file")) {\r
+                                       String[] values = (String[]) params.get(paramKey);\r
+                                       for (String path : values) {\r
+                                               File file = driver.getFile(path);\r
+                                               executeDelete((T) driver, file);\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+\r
+               return AjxpAnswer.DO_NOTHING;\r
+       }\r
+\r
+       protected void executeDelete(T driver, File file) {\r
+               log.debug("Delete file " + file);\r
+               file.delete();\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDownloadAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDownloadAction.java
new file mode 100644 (file)
index 0000000..ea863a3
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer.file;
+
+import java.io.File;
+
+import javax.servlet.http.HttpServletResponse;
+
+public class FileDownloadAction extends AbstractFileDownloadAction {
+
+       @Override
+       protected void setHeaders(HttpServletResponse response, File file) {
+               setDefaultDownloadHeaders(response, file.getName(), file.length());
+       }
+
+       public static void setDefaultDownloadHeaders(HttpServletResponse response,
+                       String fileName, Long fileLength) {
+               response.setContentType("application/force-download; name=\""
+                               + fileName + "\"");
+               response.setHeader("Content-Transfer-Encoding", "binary");
+               if (fileLength != null)
+                       response.setContentLength(fileLength.intValue());
+               response.setHeader("Content-Disposition", "attachement; filename=\""
+                               + fileName + "\"");
+               response.setHeader("Expires", "0");
+               response.setHeader("Cache-Control", "no-cache, must-revalidate");
+               response.setHeader("Pragma", "no-cache");
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDriver.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDriver.java
new file mode 100644 (file)
index 0000000..2e5acb0
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer.file;
+
+import java.io.File;
+
+import org.argeo.slc.web.ajaxplorer.SimpleAjxpDriver;
+
+public class FileDriver extends SimpleAjxpDriver{
+       private String basePath;
+       private String encoding = "UTF-8";
+
+       public String getBasePath() {
+               return basePath;
+       }
+       
+       public File getBaseDir(){
+               return new File(getBasePath());
+       }
+
+       public void setBasePath(String basePath) {
+               if (basePath.charAt(basePath.length() - 1) != File.separatorChar)
+                       basePath = basePath + File.separatorChar;
+               this.basePath = basePath;
+       }
+
+       public String getEncoding() {
+               return encoding;
+       }
+
+       public void setEncoding(String encoding) {
+               this.encoding = encoding;
+       }
+
+       public File getFile(String relpath) {
+               return new File(getBasePath() + relpath).getAbsoluteFile();
+       }
+
+       public File getFile(String dir, String fileName) {
+               return getFile(dir + File.separator + fileName);
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileImageProxyAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileImageProxyAction.java
new file mode 100644 (file)
index 0000000..a74498c
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer.file;
+
+import java.io.File;
+
+import javax.servlet.http.HttpServletResponse;
+
+public class FileImageProxyAction extends AbstractFileDownloadAction {
+
+       @Override
+       protected void setHeaders(HttpServletResponse response, File file) {
+               FileType fileType = FileType.findType(file);
+               response.setContentType(fileType.getImageType());
+               response.setContentLength((int) file.length());
+               response.setHeader("Cache-Control", "public");
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileLsAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileLsAction.java
new file mode 100644 (file)
index 0000000..94240f0
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer.file;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.OutputStreamWriter;
+import java.util.List;
+import java.util.Vector;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.io.IOUtils;
+import org.argeo.slc.web.ajaxplorer.AjxpAnswer;
+import org.argeo.slc.web.ajaxplorer.AjxpDriverException;
+
+public class FileLsAction<T extends FileDriver, F extends AjxpFile> extends
+               FileAction {
+
+       public AjxpAnswer execute(FileDriver driver, HttpServletRequest request) {
+               String modeStr = request.getParameter("mode");
+               LsMode mode;
+               if (modeStr == null)
+                       mode = LsMode.NULL;
+               else if (modeStr.equals("complete"))
+                       mode = LsMode.COMPLETE;
+               else if (modeStr.equals("file_list"))
+                       mode = LsMode.FILE_LIST;
+               else if (modeStr.equals("search"))
+                       mode = LsMode.SEARCH;
+               else
+                       throw new AjxpDriverException("Unkown mode " + modeStr);
+
+               String options = request.getParameter("options");
+               if (options != null) {
+                       if ("al".equals(options))
+                               mode = LsMode.FILE_LIST;
+               }
+
+               String path = request.getParameter("dir");
+               if (path == null) {
+                       path = "/";
+               }
+
+               boolean dirOnly = false;
+               if (mode == LsMode.NULL || mode == LsMode.COMPLETE) {
+                       dirOnly = true;
+               }
+
+               List<F> ajxpFiles = listFiles((T) driver, path, dirOnly);
+               /*
+                * File[] files = dir.listFiles(createFileFilter(request, dir));
+                * List<AjxpFile> ajxpFiles = new Vector<AjxpFile>(); for (File file :
+                * files) { if (file.isDirectory()) { ajxpFiles.add(new AjxpFile(file,
+                * path)); } else { if (!dirOnly) ajxpFiles.add(new AjxpFile(file,
+                * path)); } }
+                */
+               return new AxpLsAnswer(driver, ajxpFiles, mode);
+       }
+
+       protected List<F> listFiles(T driver, String path, boolean dirOnly) {
+               File dir = driver.getFile(path);
+
+               if (!dir.exists())
+                       throw new AjxpDriverException("Dir " + dir + " does not exist.");
+
+               FileFilter filter = createFileFilter(dir);
+               File[] files = dir.listFiles(filter);
+               List<F> ajxpFiles = new Vector<F>();
+               for (File file : files) {
+                       if (file.isDirectory()) {
+                               ajxpFiles.add((F) new AjxpFile(file, path));
+                       } else {
+                               if (!dirOnly)
+                                       ajxpFiles.add((F) new AjxpFile(file, path));
+                       }
+               }
+               return ajxpFiles;
+       }
+
+       /** To be overridden. Accept all by default. */
+       protected FileFilter createFileFilter(File dir) {
+               return new FileFilter() {
+                       public boolean accept(File pathname) {
+                               return true;
+                       }
+
+               };
+       }
+
+       protected class AxpLsAnswer implements AjxpAnswer {
+               private final List<F> files;
+               private final LsMode mode;
+               private final FileDriver driver;
+
+               public AxpLsAnswer(FileDriver driver, List<F> files, LsMode mode) {
+                       this.files = files;
+                       this.mode = mode;
+                       this.driver = driver;
+               }
+
+               public void updateResponse(HttpServletResponse response) {
+                       final String encoding = driver.getEncoding();
+                       response.setCharacterEncoding(encoding);
+                       response.setContentType("text/xml");
+
+                       ServletOutputStream out = null;
+                       OutputStreamWriter writer = null;
+                       try {
+                               out = response.getOutputStream();
+                               writer = new OutputStreamWriter(out, encoding);
+                               writer.write("<?xml version=\"1.0\" encoding=\"" + encoding
+                                               + "\"?>");
+                               // TODO add current path
+                               writer.write("<tree>");
+                               for (AjxpFile file : files) {
+                                       writer.write(file.toXml(mode, encoding));
+                               }
+                               writer.write("</tree>");
+                               writer.flush();
+
+                       } catch (Exception e) {
+                               throw new AjxpDriverException("Could not write response.", e);
+                       } finally {
+                               IOUtils.closeQuietly(writer);
+                               IOUtils.closeQuietly(out);
+                       }
+               }
+
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileMkdirAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileMkdirAction.java
new file mode 100644 (file)
index 0000000..a60f3a3
--- /dev/null
@@ -0,0 +1,42 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.ajaxplorer.file;\r
+\r
+import java.io.File;\r
+\r
+import javax.servlet.http.HttpServletRequest;\r
+\r
+import org.argeo.slc.web.ajaxplorer.AjxpAnswer;\r
+\r
+public class FileMkdirAction<T extends FileDriver> extends FileAction {\r
+\r
+       public AjxpAnswer execute(FileDriver driver,\r
+                       HttpServletRequest request) {\r
+               String dir = request.getParameter("dir");\r
+               String dirName = request.getParameter("dirname");\r
+\r
+               File newDir = driver.getFile(dir, dirName);\r
+               newDir.mkdirs();\r
+\r
+               postProcess((T)driver,newDir);\r
+\r
+               return AjxpAnswer.DO_NOTHING;\r
+       }\r
+\r
+       protected void postProcess(T driver,File newDir) {\r
+\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileType.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileType.java
new file mode 100644 (file)
index 0000000..48d45a2
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer.file;
+
+import java.io.File;
+
+import org.argeo.slc.web.ajaxplorer.AjxpDriverException;
+
+public enum FileType {
+       FOLDER("folder.png", "Directory"), UNKNOWN("mime_empty.png", "Unkown"), GIF(
+                       "image.png", "GIF Picture"), JPEG("image.png", "JPEG Picture"), PNG(
+                       "image.png", "PNG Picture");
+
+       private final String icon;
+       private final String mimeString;
+
+       FileType(String icon, String mimeString) {
+               this.icon = icon;
+               this.mimeString = mimeString;
+       }
+
+       public String getIcon() {
+               return icon;
+       }
+
+       public String getMimeString() {
+               return mimeString;
+       }
+
+       public boolean isImage() {
+               return this == GIF || this == JPEG || this == PNG;
+       }
+
+       public String getImageType() {
+               switch (this) {
+               case GIF:
+                       return "image/gif";
+               case JPEG:
+                       return "image/jpeg";
+               case PNG:
+                       return "image/png";
+               }
+               throw new AjxpDriverException("Image type undefined for " + this);
+       }
+
+       public static FileType findType(File file) {
+               String ext = file.isDirectory() ? null : file.getName().substring(
+                               file.getName().indexOf('.') + 1);
+               return findType(ext);
+       }
+
+       /**
+        * Find the type based on the extension.
+        * 
+        * @param ext
+        *            the extension, null for a directory
+        */
+       public static FileType findType(String extArg) {
+               if (extArg == null)
+                       return FOLDER;
+
+               String ext = extArg.toLowerCase();
+               if (ext.equals("jpg") || ext.equals("jpeg"))
+                       return JPEG;
+               else if (ext.equals("gif"))
+                       return GIF;
+               else if (ext.equals("png"))
+                       return PNG;
+               else
+                       return UNKNOWN;
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileUploadAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileUploadAction.java
new file mode 100644 (file)
index 0000000..1620d93
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer.file;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.io.IOUtils;
+import org.argeo.slc.web.ajaxplorer.AjxpAnswer;
+import org.argeo.slc.web.ajaxplorer.AjxpDriverException;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+
+public class FileUploadAction<T extends FileDriver> extends FileAction {
+
+       public AjxpAnswer execute(FileDriver driver, HttpServletRequest request) {
+               if (!(request instanceof MultipartHttpServletRequest)) {
+                       throw new AjxpDriverException(
+                                       "Cann only deal with MultipartHttpServletRequest");
+               }
+               MultipartHttpServletRequest mpr = (MultipartHttpServletRequest) request;
+               String dir = mpr.getParameter("dir");
+               String fileName = mpr.getParameter("Filename");
+
+               InputStream in = null;
+               OutputStream out = null;
+               File file = null;
+               try {
+                       MultipartFile mpfile = mpr.getFile("Filedata");
+                       in = mpfile.getInputStream();
+                       file = driver.getFile(dir, fileName);
+                       out = new FileOutputStream(file);
+                       IOUtils.copy(in, out);
+               } catch (IOException e) {
+                       throw new AjxpDriverException("Cannot upload file.", e);
+               } finally {
+                       IOUtils.closeQuietly(in);
+                       IOUtils.closeQuietly(out);
+               }
+               postProcess((T)driver, file);
+
+               return AjxpAnswer.DO_NOTHING;
+       }
+
+       protected void postProcess(T driver,File file) {
+
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/LsMode.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/LsMode.java
new file mode 100644 (file)
index 0000000..e976a2d
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer.file;
+
+public enum LsMode {
+       NULL, COMPLETE, FILE_LIST, SEARCH
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/mvc/AjxpDriverRequestHandler.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/mvc/AjxpDriverRequestHandler.java
new file mode 100644 (file)
index 0000000..9b929ed
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer.mvc;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.web.ajaxplorer.AjxpAnswer;
+import org.argeo.slc.web.ajaxplorer.AjxpDriver;
+import org.springframework.web.HttpRequestHandler;
+
+public class AjxpDriverRequestHandler implements HttpRequestHandler {
+
+       protected final Log log = LogFactory.getLog(getClass());
+       private AjxpDriver driver;
+
+       public void handleRequest(HttpServletRequest req, HttpServletResponse resp)
+                       throws ServletException, IOException {
+               long id = System.currentTimeMillis();
+               try {
+                       if (log.isDebugEnabled())
+                               logRequest(id, req.getMethod(), req);
+
+                       AjxpAnswer answer = driver.executeAction(req);
+                       answer.updateResponse(resp);
+
+                       if (log.isTraceEnabled())
+                               log.trace(id + " " + req.getMethod() + " completed");
+               } catch (Exception e) {
+                       log.error(id + " Cannot process request.", e);
+                       throw new ServletException("Cannot process request " + id, e);
+               }
+
+       }
+
+       protected void logRequest(long id, String method, HttpServletRequest req) {
+               if (log.isDebugEnabled()) {
+                       StringBuffer buf = new StringBuffer(id + " Received " + method
+                                       + ": ");
+                       buf.append('{');
+                       @SuppressWarnings("unchecked")
+                       Map<String, String[]> params = req.getParameterMap();
+                       int count1 = 0;
+                       for (Map.Entry<String, String[]> entry : params.entrySet()) {
+                               if (count1 != 0)
+                                       buf.append(", ");
+                               buf.append(entry.getKey()).append("={");
+                               int count2 = 0;
+                               for (String value : entry.getValue()) {
+                                       if (count2 != 0)
+                                               buf.append(',');
+                                       buf.append(value);
+                                       count2++;
+                               }
+                               buf.append('}');
+                               count1++;
+                       }
+                       buf.append('}');
+                       log.debug(buf.toString());
+               }
+       }
+
+       public void setDriver(AjxpDriver driver) {
+               this.driver = driver;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/mvc/AjxpDriverServlet.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/mvc/AjxpDriverServlet.java
new file mode 100644 (file)
index 0000000..d4e579e
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.ajaxplorer.mvc;
+
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Map;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.web.ajaxplorer.AjxpAnswer;
+import org.argeo.slc.web.ajaxplorer.AjxpDriver;
+import org.springframework.beans.BeanWrapper;
+import org.springframework.beans.BeanWrapperImpl;
+import org.springframework.beans.BeansException;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+import org.springframework.web.servlet.HttpServletBean;
+
+public class AjxpDriverServlet extends HttpServletBean {
+       static final long serialVersionUID = 1l;
+
+       protected final Log log = LogFactory.getLog(getClass());
+       private String driverBean;
+       private AjxpDriver driver;
+
+       @Override
+       public void init(ServletConfig sc) throws ServletException {
+               super.init(sc);
+               WebApplicationContext context = WebApplicationContextUtils
+                               .getRequiredWebApplicationContext(sc.getServletContext());
+               driverBean = sc.getInitParameter("driverBean");
+               if (driverBean == null) {
+                       throw new ServletException(
+                                       "No driver found, please set the driverBean property");
+               }
+
+               logger.info("Loading driver " + driverBean);
+               driver = (AjxpDriver) context.getBean(driverBean);
+
+               // overrideBeanProperties(sc);
+       }
+
+       @Override
+       protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+                       throws ServletException, IOException {
+               processRequest("GET", req, resp);
+       }
+
+       @Override
+       protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+                       throws ServletException, IOException {
+               processRequest("POST", req, resp);
+       }
+
+       protected void processRequest(String method, HttpServletRequest req,
+                       HttpServletResponse resp) throws ServletException, IOException {
+               long id = System.currentTimeMillis();
+               try {
+                       if (log.isDebugEnabled())
+                               logRequest(id, method, req);
+
+                       AjxpAnswer answer = driver.executeAction(req);
+                       answer.updateResponse(resp);
+
+                       if (log.isDebugEnabled())
+                               log.debug(id + " " + method + " completed");
+               } catch (Exception e) {
+                       log.error(id + " Cannot process request.", e);
+                       throw new ServletException("Cannot process request " + id, e);
+               }
+
+       }
+
+       public void setDriverBean(String driverName) {
+               this.driverBean = driverName;
+       }
+
+       protected void logRequest(long id, String method, HttpServletRequest req) {
+               if (log.isDebugEnabled()) {
+                       StringBuffer buf = new StringBuffer(id + " Received " + method
+                                       + ": ");
+                       buf.append('{');
+                       Map<String, String[]> params = req.getParameterMap();
+                       int count1 = 0;
+                       for (Map.Entry<String, String[]> entry : params.entrySet()) {
+                               if (count1 != 0)
+                                       buf.append(", ");
+                               buf.append(entry.getKey()).append("={");
+                               int count2 = 0;
+                               for (String value : entry.getValue()) {
+                                       if (count2 != 0)
+                                               buf.append(',');
+                                       buf.append(value);
+                                       count2++;
+                               }
+                               buf.append('}');
+                               count1++;
+                       }
+                       buf.append('}');
+                       log.debug(buf.toString());
+               }
+       }
+
+       protected void overrideBeanProperties(ServletConfig sc)
+                       throws ServletException {
+               BeanWrapper wrapper = new BeanWrapperImpl(driver);
+               Enumeration<String> en = sc.getInitParameterNames();
+               while (en.hasMoreElements()) {
+                       String name = en.nextElement();
+                       if (name.indexOf(driverBean + '.') == 0
+                                       && name.length() > (driverBean.length() + 1)) {
+                               String propertyName = name.substring(driverBean.length() + 1);
+                               String value = sc.getInitParameter(name);
+                               if (value != null) {
+                                       try {
+                                               wrapper.setPropertyValue(propertyName, value);
+                                       } catch (BeansException e) {
+                                               throw new ServletException("Cannot set property "
+                                                               + propertyName + " of bean " + driverBean, e);
+                                       }
+                               }
+                       }
+               }
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnAjxpFile.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnAjxpFile.java
new file mode 100644 (file)
index 0000000..5eedfc7
--- /dev/null
@@ -0,0 +1,38 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.ajaxplorer.svn;\r
+\r
+import org.argeo.slc.web.ajaxplorer.file.AjxpFile;\r
+import org.argeo.slc.web.ajaxplorer.file.LsMode;\r
+import org.tmatesoft.svn.core.wc.SVNInfo;\r
+\r
+public class SvnAjxpFile extends AjxpFile {\r
+\r
+       protected final SVNInfo info;\r
+\r
+       public SvnAjxpFile(SVNInfo info, String parentPath) {\r
+               super(info.getFile(), parentPath);\r
+               this.info = info;\r
+       }\r
+\r
+       @Override\r
+       protected void addAdditionalAttrs(StringBuffer buf, LsMode mode,\r
+                       String encoding) {\r
+               addAttr("author", info.getAuthor(), buf);\r
+               addAttr("revision", Long.toString(info.getRevision().getNumber()), buf);\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDeleteAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDeleteAction.java
new file mode 100644 (file)
index 0000000..9175377
--- /dev/null
@@ -0,0 +1,42 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.ajaxplorer.svn;\r
+\r
+import java.io.File;\r
+\r
+import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
+import org.argeo.slc.web.ajaxplorer.file.FileDeleteAction;\r
+import org.tmatesoft.svn.core.SVNException;\r
+\r
+public class SvnDeleteAction extends FileDeleteAction<SvnDriver> {\r
+       @Override\r
+       protected void executeDelete(SvnDriver driver, File file) {\r
+               try {\r
+                       driver.beginWriteAction(file.getParentFile());\r
+\r
+                       log.debug("SVN Delete: " + file);\r
+                       driver.getManager().getWCClient().doDelete(file, true, false);\r
+\r
+                       driver.commitAll("Commit delete of " + file.getName());\r
+                       driver.completeWriteAction(file.getParentFile());\r
+               } catch (SVNException e) {\r
+                       throw new AjxpDriverException("Cannot delete file " + file, e);\r
+               } finally {\r
+                       driver.rollbackWriteAction(file.getParentFile());\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDownloadAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDownloadAction.java
new file mode 100644 (file)
index 0000000..9ef3722
--- /dev/null
@@ -0,0 +1,87 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.ajaxplorer.svn;\r
+\r
+import javax.servlet.ServletOutputStream;\r
+import javax.servlet.http.HttpServletRequest;\r
+import javax.servlet.http.HttpServletResponse;\r
+\r
+import org.apache.commons.io.IOUtils;\r
+import org.argeo.slc.web.ajaxplorer.AjxpAction;\r
+import org.argeo.slc.web.ajaxplorer.AjxpAnswer;\r
+import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
+import org.argeo.slc.web.ajaxplorer.file.FileDownloadAction;\r
+import org.tmatesoft.svn.core.io.SVNRepository;\r
+\r
+public class SvnDownloadAction implements AjxpAction<SvnDriver> {\r
+\r
+       public AjxpAnswer execute(SvnDriver driver, HttpServletRequest request) {\r
+               String path = request.getParameter("file");\r
+               if (path.charAt(path.length() - 1) == '/') {\r
+                       // probably a directory\r
+                       return AjxpAnswer.DO_NOTHING;\r
+               }\r
+\r
+               String revStr = request.getParameter("rev");\r
+               Long rev = Long.parseLong(revStr);\r
+               return new SvnDownloadAnswer(driver, path, rev);\r
+       }\r
+\r
+       public class SvnDownloadAnswer implements AjxpAnswer {\r
+               private final SvnDriver driver;\r
+               private final String path;\r
+               private final Long rev;\r
+\r
+               public SvnDownloadAnswer(SvnDriver driver, String path, Long rev) {\r
+                       this.driver = driver;\r
+                       this.path = path;\r
+                       this.rev = rev;\r
+               }\r
+\r
+               public void updateResponse(HttpServletResponse response) {\r
+                       ServletOutputStream out = null;\r
+                       try {\r
+                               FileDownloadAction.setDefaultDownloadHeaders(response,\r
+                                               getFileName(), null);\r
+                               response.setHeader("AjaXplorer-SvnFileName", getFileName());\r
+\r
+                               SVNRepository repository = driver.getRepository();\r
+                               out = response.getOutputStream();\r
+                               repository.getFile(path, rev, null, out);\r
+                       } catch (Exception e) {\r
+                               throw new AjxpDriverException("Cannot download revision " + rev\r
+                                               + " of path " + path, e);\r
+                       } finally {\r
+                               IOUtils.closeQuietly(out);\r
+                       }\r
+               }\r
+\r
+               protected String getFileName() {\r
+                       int lastIndexSlash = path.lastIndexOf('/');\r
+                       final String origFileName;\r
+                       if (lastIndexSlash != -1) {\r
+                               origFileName = path.substring(lastIndexSlash + 1);\r
+                       } else {\r
+                               origFileName = path;\r
+                       }\r
+\r
+                       int lastIndexPoint = origFileName.lastIndexOf('.');\r
+                       String prefix = origFileName.substring(0, lastIndexPoint);\r
+                       String ext = origFileName.substring(lastIndexPoint);\r
+                       return prefix + "-" + rev + ext;\r
+               }\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDriver.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDriver.java
new file mode 100644 (file)
index 0000000..1d3e95f
--- /dev/null
@@ -0,0 +1,264 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.ajaxplorer.svn;\r
+\r
+import java.io.File;\r
+\r
+import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
+import org.argeo.slc.web.ajaxplorer.file.FileDriver;\r
+import org.springframework.beans.factory.BeanNameAware;\r
+import org.tmatesoft.svn.core.SVNException;\r
+import org.tmatesoft.svn.core.SVNURL;\r
+import org.tmatesoft.svn.core.internal.io.fs.FSRepositoryFactory;\r
+import org.tmatesoft.svn.core.io.SVNRepository;\r
+import org.tmatesoft.svn.core.wc.SVNClientManager;\r
+import org.tmatesoft.svn.core.wc.SVNInfo;\r
+import org.tmatesoft.svn.core.wc.SVNRevision;\r
+import org.tmatesoft.svn.core.wc.admin.SVNAdminClient;\r
+\r
+public class SvnDriver extends FileDriver implements BeanNameAware {\r
+       private final static String DEFAULT_DATA_PATH = System\r
+                       .getProperty("user.home")\r
+                       + File.separator + "AjaXplorerArchiver" + File.separator + "data";\r
+\r
+       private final static long WRITE_ACTION_TIMEOUT = 10 * 60 * 1000;\r
+\r
+       private SVNURL baseUrl;\r
+       private SVNClientManager manager;\r
+\r
+       private String beanName;\r
+\r
+       private boolean isInWriteAction = false;\r
+\r
+       public void init() {\r
+               FSRepositoryFactory.setup();\r
+               manager = SVNClientManager.newInstance();\r
+\r
+               String basePath = getBasePath();\r
+               if (basePath != null) {\r
+                       File baseDir = new File(basePath);\r
+                       if (baseDir.exists()) {// base dir exists\r
+                               boolean shouldCheckOut = baseDirChecks(baseDir);\r
+                               if (shouldCheckOut) {\r
+                                       checkOut(baseDir);\r
+                               }\r
+                       } else {\r
+                               checkOut(baseDir);\r
+                       }\r
+               } else {\r
+                       String defaultBasePath = DEFAULT_DATA_PATH + File.separator\r
+                                       + "svnwc" + File.separator + beanName;\r
+                       log.warn("No base path provided, use " + defaultBasePath);\r
+                       setBasePath(defaultBasePath);\r
+\r
+                       File baseDir = new File(getBasePath());\r
+                       if (!baseDir.exists()) {\r
+                               baseDir.mkdirs();\r
+                       }\r
+\r
+                       if (baseDirChecks(baseDir)) {\r
+                               if (getBaseUrl() == null) {\r
+                                       String defaultRepoPath = DEFAULT_DATA_PATH + File.separator\r
+                                                       + "svnrepos" + File.separator + beanName;\r
+                                       log.warn("No base URL found, create repository at "\r
+                                                       + defaultRepoPath);\r
+                                       baseUrl = createRepository(new File(defaultRepoPath));\r
+                               }\r
+                               checkOut(new File(getBasePath()));\r
+                       }\r
+               }\r
+               log.info("SVN driver initialized with base url " + getBaseUrl()\r
+                               + " and base path " + getBasePath());\r
+       }\r
+\r
+       /** Builds a SVN URL. */\r
+       public SVNURL getSVNURL(String relativePath) {\r
+               try {\r
+                       return baseUrl.appendPath(relativePath, false);\r
+               } catch (SVNException e) {\r
+                       throw new AjxpDriverException(\r
+                                       "Cannot build URL from relative path " + relativePath\r
+                                                       + " and base url " + baseUrl);\r
+               }\r
+       }\r
+\r
+       public SVNRepository getRepository() {\r
+               try {\r
+                       return manager.createRepository(baseUrl, true);\r
+               } catch (SVNException e) {\r
+                       throw new AjxpDriverException("Cannot create repository for "\r
+                                       + baseUrl, e);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Verifies that the provided existing base dir is ok and whether one should\r
+        * check out. Set the base url from the working copy.\r
+        * \r
+        * @return whether one should check out.\r
+        */\r
+       protected boolean baseDirChecks(File baseDir) {\r
+               if (!baseDir.isDirectory()) {\r
+                       throw new AjxpDriverException("Base path " + baseDir\r
+                                       + " is not a directory.");\r
+               }\r
+\r
+               try {// retrieves SVN infos\r
+                       SVNInfo info = manager.getWCClient().doInfo(baseDir,\r
+                                       SVNRevision.WORKING);\r
+                       SVNURL baseUrlTemp = info.getURL();\r
+                       if (baseUrl != null) {\r
+                               if (!baseUrl.equals(baseUrlTemp)) {\r
+                                       throw new AjxpDriverException(\r
+                                                       "SVN URL of the working copy "\r
+                                                                       + baseUrlTemp\r
+                                                                       + " is not compatible with provided baseUrl "\r
+                                                                       + baseUrl);\r
+                               }\r
+                       } else {\r
+                               this.baseUrl = baseUrlTemp;\r
+                       }\r
+                       return false;\r
+               } catch (SVNException e) {// no info retrieved\r
+                       log\r
+                                       .warn("Could not retrieve SVN info from "\r
+                                                       + baseDir\r
+                                                       + "("\r
+                                                       + e.getMessage()\r
+                                                       + "). Guess that it is and empty dir and try to check out from provided URL.");\r
+                       if (baseDir.listFiles().length != 0) {\r
+                               throw new AjxpDriverException("Base dir " + baseDir\r
+                                               + " is not a working copy and not an empty dir.");\r
+                       }\r
+                       return true;\r
+               }\r
+       }\r
+\r
+       protected void checkOut(File baseDir) {\r
+               if (getBaseUrl() == null) {\r
+                       throw new AjxpDriverException(\r
+                                       "No SVN URL provided, cannot check out.");\r
+               }\r
+\r
+               // Make sure directory exists\r
+               baseDir.mkdirs();\r
+\r
+               try {\r
+                       long revision = manager.getUpdateClient().doCheckout(getBaseUrl(),\r
+                                       baseDir, SVNRevision.UNDEFINED, SVNRevision.HEAD, true);\r
+                       log.info("Checked out from " + baseUrl + " to " + baseDir\r
+                                       + " at revision " + revision);\r
+               } catch (SVNException e) {\r
+                       throw new AjxpDriverException("Cannot check out from " + baseUrl\r
+                                       + " to " + baseDir, e);\r
+               }\r
+       }\r
+\r
+       protected SVNURL createRepository(File repoDir) {\r
+               try {\r
+                       SVNAdminClient adminClient = manager.getAdminClient();\r
+                       return adminClient.doCreateRepository(repoDir, null, true, false);\r
+               } catch (SVNException e) {\r
+                       throw new AjxpDriverException("Cannot create repository at "\r
+                                       + repoDir, e);\r
+               }\r
+       }\r
+\r
+       private void updateIfRequired(File dir) {\r
+               try {\r
+                       SVNInfo wcInfo = manager.getWCClient().doInfo(getBaseDir(),\r
+                                       SVNRevision.WORKING);\r
+                       SVNRevision wcRev = wcInfo.getRevision();\r
+                       SVNInfo repoInfo = manager.getWCClient().doInfo(getBaseUrl(),\r
+                                       null, SVNRevision.HEAD);\r
+                       SVNRevision repoRev = repoInfo.getRevision();\r
+\r
+                       if (log.isTraceEnabled())\r
+                               log\r
+                                               .trace("WC Revision=" + wcRev + ", Repo Revision="\r
+                                                               + repoRev);\r
+\r
+                       if (!wcRev.equals(repoRev)) {\r
+                               log.debug("Update working copy from revision " + wcRev\r
+                                               + " to revision " + repoRev);\r
+                               manager.getUpdateClient().doUpdate(getBaseDir(),\r
+                                               SVNRevision.HEAD, true);\r
+                       }\r
+               } catch (SVNException e) {\r
+                       throw new AjxpDriverException("Cannot update working copy "\r
+                                       + getBaseDir(),e);\r
+               }\r
+       }\r
+\r
+       public synchronized void beginWriteAction(File dir) {\r
+               if (isInWriteAction) {\r
+                       try {\r
+                               wait(WRITE_ACTION_TIMEOUT);\r
+                       } catch (InterruptedException e) {\r
+                               // silent\r
+                       }\r
+                       if (isInWriteAction) {\r
+                               throw new AjxpDriverException(\r
+                                               "Still in write action after timeout "\r
+                                                               + WRITE_ACTION_TIMEOUT + " ms.");\r
+                       }\r
+               }\r
+\r
+               isInWriteAction = true;\r
+               updateIfRequired(dir);\r
+       }\r
+\r
+       public synchronized void completeWriteAction(File dir) {\r
+               isInWriteAction = false;\r
+               notifyAll();\r
+       }\r
+\r
+       public synchronized void rollbackWriteAction(File dir) {\r
+               // TODO: revert?\r
+               isInWriteAction = false;\r
+               notifyAll();\r
+       }\r
+       \r
+       public void commitAll(String message) throws SVNException{\r
+               if(log.isTraceEnabled())\r
+               log.trace("SVN Commit: " + getBaseDir());\r
+               manager.getCommitClient().doCommit(new File[] { getBaseDir() }, true,\r
+                               message, true, true);\r
+\r
+       }\r
+\r
+       /** Spring bean name, set at initialization. */\r
+       public void setBeanName(String beanName) {\r
+               this.beanName = beanName;\r
+       }\r
+\r
+       public void setBaseUrl(String baseUrl) {\r
+               try {\r
+                       this.baseUrl = SVNURL.parseURIDecoded(baseUrl);\r
+               } catch (SVNException e) {\r
+                       throw new AjxpDriverException("Cannot parse SVN URL " + baseUrl, e);\r
+               }\r
+       }\r
+\r
+       public SVNURL getBaseUrl() {\r
+               return baseUrl;\r
+       }\r
+\r
+       public SVNClientManager getManager() {\r
+               return manager;\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnLogAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnLogAction.java
new file mode 100644 (file)
index 0000000..24c12bc
--- /dev/null
@@ -0,0 +1,127 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.ajaxplorer.svn;\r
+\r
+import java.io.File;\r
+import java.io.PrintWriter;\r
+import java.text.SimpleDateFormat;\r
+import java.util.List;\r
+import java.util.Map;\r
+import java.util.Vector;\r
+\r
+import javax.servlet.http.HttpServletRequest;\r
+import javax.servlet.http.HttpServletResponse;\r
+\r
+import org.apache.commons.io.IOUtils;\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.argeo.slc.web.ajaxplorer.AjxpAction;\r
+import org.argeo.slc.web.ajaxplorer.AjxpAnswer;\r
+import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
+import org.tmatesoft.svn.core.ISVNLogEntryHandler;\r
+import org.tmatesoft.svn.core.SVNException;\r
+import org.tmatesoft.svn.core.SVNLogEntry;\r
+import org.tmatesoft.svn.core.SVNLogEntryPath;\r
+import org.tmatesoft.svn.core.wc.SVNRevision;\r
+\r
+public class SvnLogAction implements AjxpAction<SvnDriver> {\r
+       private final SimpleDateFormat sdfIso = new SimpleDateFormat(\r
+                       "yyyy-MM-dd HH:mm:ss");\r
+       private final Log log = LogFactory.getLog(getClass());\r
+\r
+       public AjxpAnswer execute(SvnDriver driver, HttpServletRequest request) {\r
+               String fileStr = request.getParameter("file");\r
+               log.debug("Log file " + fileStr);\r
+               if (fileStr == null) {\r
+                       throw new AjxpDriverException("A  file needs to be provided.");\r
+               }\r
+               File file = new File(driver.getBasePath() + fileStr);\r
+               return new SvnLogAnswer(driver, file);\r
+       }\r
+\r
+       protected class SvnLogAnswer implements AjxpAnswer {\r
+               private final SvnDriver driver;\r
+               private final File file;\r
+\r
+               public SvnLogAnswer(SvnDriver driver, File file) {\r
+                       this.driver = driver;\r
+                       this.file = file;\r
+               }\r
+\r
+               public void updateResponse(HttpServletResponse response) {\r
+                       PrintWriter writer = null;\r
+                       try {\r
+                               writer = response.getWriter();\r
+                               writer.append("<tree>");\r
+                               writer.append("<log>");\r
+\r
+                               final List<SVNLogEntry> logEntries = new Vector<SVNLogEntry>();\r
+                               ISVNLogEntryHandler logHandler = new ISVNLogEntryHandler() {\r
+                                       public void handleLogEntry(SVNLogEntry logEntry)\r
+                                                       throws SVNException {\r
+                                               logEntries.add(logEntry);\r
+                                       }\r
+                               };\r
+\r
+                               driver.getManager().getLogClient().doLog(new File[] { file },\r
+                                               SVNRevision.create(0), SVNRevision.HEAD, true, true,\r
+                                               100, logHandler);\r
+\r
+                               for (int i = logEntries.size() - 1; i >= 0; i--) {\r
+                                       String xml = logEntryAsXml(logEntries.get(i), file);\r
+                                       if(log.isTraceEnabled())\r
+                                               log.trace(xml);\r
+                                       writer.append(xml);\r
+                               }\r
+\r
+                               writer.append("</log>");\r
+                               writer.append("</tree>");\r
+                       } catch (Exception e) {\r
+                               throw new AjxpDriverException(\r
+                                               "Cannot retrieve log for " + file, e);\r
+                       } finally {\r
+                               IOUtils.closeQuietly(writer);\r
+                       }\r
+               }\r
+\r
+       }\r
+\r
+       protected String logEntryAsXml(SVNLogEntry entry, File file) {\r
+               StringBuffer buf = new StringBuffer();\r
+               buf.append("<logentry");\r
+               buf.append(" revision=\"").append(entry.getRevision()).append("\"");\r
+               buf.append(" is_file=\"").append(file.isDirectory() ? "0" : "1")\r
+                               .append("\"");\r
+               buf.append(">");\r
+\r
+               buf.append("<author>").append(entry.getAuthor()).append("</author>");\r
+               buf.append("<date>").append(sdfIso.format(entry.getDate())).append(\r
+                               "</date>");\r
+\r
+               buf.append("<paths>");\r
+               Map<Object, SVNLogEntryPath> paths = entry.getChangedPaths();\r
+               for (SVNLogEntryPath path : paths.values()) {\r
+                       buf.append("<path>").append(path.getPath()).append("</path>");\r
+               }\r
+               buf.append("</paths>");\r
+\r
+               buf.append("<msg>").append(entry.getMessage()).append("</msg>");\r
+\r
+               buf.append("</logentry>");\r
+               return buf.toString();\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnLsAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnLsAction.java
new file mode 100644 (file)
index 0000000..4a3fc41
--- /dev/null
@@ -0,0 +1,74 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.ajaxplorer.svn;\r
+\r
+import java.io.File;\r
+import java.io.FileFilter;\r
+import java.util.List;\r
+import java.util.Vector;\r
+\r
+import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
+import org.argeo.slc.web.ajaxplorer.file.FileLsAction;\r
+import org.tmatesoft.svn.core.SVNException;\r
+import org.tmatesoft.svn.core.wc.SVNInfo;\r
+import org.tmatesoft.svn.core.wc.SVNRevision;\r
+import org.tmatesoft.svn.core.wc.SVNWCClient;\r
+\r
+public class SvnLsAction extends FileLsAction<SvnDriver, SvnAjxpFile> {\r
+\r
+       @Override\r
+       protected List<SvnAjxpFile> listFiles(SvnDriver driver, final String path,\r
+                       final boolean dirOnly) {\r
+               try {\r
+                       File dir = driver.getFile(path);\r
+                       SVNWCClient client = driver.getManager().getWCClient();\r
+\r
+                       final List<SvnAjxpFile> res = new Vector<SvnAjxpFile>();\r
+                       FileFilter filter = createFileFilter(dir);\r
+                       File[] files = dir.listFiles(filter);\r
+                       for (File file : files) {\r
+                               //SVNStatus status = driver.getManager().getStatusClient().doStatus(file, false);\r
+                               \r
+                               SVNInfo info = client.doInfo(file, SVNRevision.WORKING);\r
+                               if (dirOnly) {\r
+                                       if (file.isDirectory())\r
+                                               res.add(new SvnAjxpFile(info, path));\r
+                               } else {\r
+                                       res.add(new SvnAjxpFile(info, path));\r
+                               }\r
+                       }\r
+                       return res;\r
+               } catch (SVNException e) {\r
+                       throw new AjxpDriverException("Cannot list svn dir " + path, e);\r
+               }\r
+       }\r
+\r
+       @Override\r
+       protected FileFilter createFileFilter(File dir) {\r
+               return new FileFilter() {\r
+\r
+                       public boolean accept(File pathname) {\r
+                               if (pathname.getName().equals(".svn")) {\r
+                                       return false;\r
+                               } else {\r
+                                       return true;\r
+                               }\r
+                       }\r
+\r
+               };\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnMkdirAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnMkdirAction.java
new file mode 100644 (file)
index 0000000..21cbaaa
--- /dev/null
@@ -0,0 +1,43 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.ajaxplorer.svn;\r
+\r
+import java.io.File;\r
+\r
+import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
+import org.argeo.slc.web.ajaxplorer.file.FileMkdirAction;\r
+import org.tmatesoft.svn.core.SVNException;\r
+\r
+public class SvnMkdirAction extends FileMkdirAction<SvnDriver> {\r
+       @Override\r
+       protected void postProcess(SvnDriver driver, File newDir) {\r
+               try {\r
+                       driver.beginWriteAction(newDir.getParentFile());\r
+\r
+                       log.debug("SVN Add: " + newDir);\r
+                       driver.getManager().getWCClient().doAdd(newDir, true,\r
+                                       newDir.isDirectory(), true, true);\r
+\r
+                       driver.commitAll("Commit new dir " + newDir.getName());\r
+                       driver.completeWriteAction(newDir.getParentFile());\r
+               } catch (SVNException e) {\r
+                       throw new AjxpDriverException("Cannot commit new dir" + newDir, e);\r
+               } finally {\r
+                       driver.rollbackWriteAction(newDir.getParentFile());\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnUploadAction.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnUploadAction.java
new file mode 100644 (file)
index 0000000..bcc9f6a
--- /dev/null
@@ -0,0 +1,43 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.ajaxplorer.svn;\r
+\r
+import java.io.File;\r
+\r
+import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
+import org.argeo.slc.web.ajaxplorer.file.FileUploadAction;\r
+import org.tmatesoft.svn.core.SVNException;\r
+\r
+public class SvnUploadAction extends FileUploadAction<SvnDriver> {\r
+       @Override\r
+       protected void postProcess(SvnDriver driver, File file) {\r
+               try {\r
+                       driver.beginWriteAction(file.getParentFile());\r
+\r
+                       log.debug("SVN Add: " + file);\r
+                       driver.getManager().getWCClient().doAdd(file, true,\r
+                                       file.isDirectory(), true, true);\r
+\r
+                       driver.commitAll("Commit file " + file.getName());\r
+                       driver.completeWriteAction(file.getParentFile());\r
+               } catch (SVNException e) {\r
+                       throw new AjxpDriverException("Cannot commit file " + file, e);\r
+               } finally {\r
+                       driver.rollbackWriteAction(file.getParentFile());\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/AbstractServiceController.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/AbstractServiceController.java
new file mode 100644 (file)
index 0000000..e4ebd50
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.argeo.slc.msg.ExecutionAnswer;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.AbstractController;
+
+public abstract class AbstractServiceController extends AbstractController {
+       public final static String KEY_ANSWER = "__answer";
+
+       private String viewName = null;
+
+       @Override
+       protected final ModelAndView handleRequestInternal(
+                       HttpServletRequest request, HttpServletResponse response)
+                       throws Exception {
+               ModelAndView mv = new ModelAndView();
+               mv.setViewName(getViewName());
+               try {
+                       handleServiceRequest(request, response, mv);
+               } catch (Exception e) {
+                       e.printStackTrace();
+                       StringWriter writer = new StringWriter();
+                       e.printStackTrace(new PrintWriter(writer));
+                       ExecutionAnswer answer = ExecutionAnswer.error(writer.toString());
+                       ModelAndView errorMv = new ModelAndView();
+                       errorMv.addObject(KEY_ANSWER, answer);
+                       errorMv.setViewName(KEY_ANSWER);
+                       return errorMv;
+               }
+
+               if (mv.getModel().size() == 0) {
+                       mv.addObject(KEY_ANSWER, ExecutionAnswer
+                                       .ok("Execution completed properly"));
+               }
+
+               if (mv.getViewName() == null && mv.getModel().size() == 1)
+                       mv.setViewName(mv.getModel().keySet().iterator().next().toString());
+
+               return mv;
+       }
+
+       protected abstract void handleServiceRequest(HttpServletRequest request,
+                       HttpServletResponse response, ModelAndView modelAndView)
+                       throws Exception;
+
+       public void setViewName(String viewName) {
+               this.viewName = viewName;
+       }
+
+       public String getViewName() {
+               return viewName;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/FileUploadBean.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/FileUploadBean.java
new file mode 100644 (file)
index 0000000..b711300
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc;
+
+
+public class FileUploadBean {
+       private byte[] file;
+
+       public void setFile(byte[] file) {
+               this.file = file;
+       }
+
+       public byte[] getFile() {
+               return file;
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/JsonView.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/JsonView.java
new file mode 100644 (file)
index 0000000..25f96cf
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc;
+
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.argeo.slc.SlcException;
+import org.springframework.web.servlet.view.AbstractView;
+
+import com.springsource.json.writer.JSONObject;
+
+/** Marshal one of the object of the map to the output. */
+public class JsonView extends AbstractView {
+       private String modelKey = null;
+
+       public JsonView() {
+       }
+
+       @Override
+       @SuppressWarnings(value = { "unchecked" })
+       protected void renderMergedOutputModel(Map model,
+                       HttpServletRequest request, HttpServletResponse response)
+                       throws Exception {
+               final Object answer;
+               if (modelKey != null) {
+                       if (!model.containsKey(modelKey))
+                               throw new SlcException("Key " + modelKey
+                                               + " not found in model.");
+                       answer = model.get(modelKey);
+               } else {
+                       if (model.size() != 1)
+                               throw new SlcException(
+                                               "Model has a size different from 1. Specify a modelKey.");
+                       answer = model.values().iterator().next();
+               }
+
+               if (answer instanceof JSONObject) {
+                       ((JSONObject) answer).write(response.getWriter());
+               } else {
+                       JSONObject jsonObject = new JSONObject(answer);
+                       jsonObject.write(response.getWriter());
+               }
+       }
+
+       public void setModelKey(String modelKey) {
+               this.modelKey = modelKey;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/ResultExcelView.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/ResultExcelView.java
new file mode 100644 (file)
index 0000000..91ef9af
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc;
+
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import jxl.write.Label;
+import jxl.write.WritableSheet;
+import jxl.write.WritableWorkbook;
+
+import org.argeo.slc.SlcException;
+import org.argeo.slc.core.structure.tree.TreeSPath;
+import org.argeo.slc.core.test.SlcTestUtils;
+import org.argeo.slc.core.test.tree.PartSubList;
+import org.argeo.slc.core.test.tree.TreeTestResult;
+import org.argeo.slc.test.TestResultPart;
+import org.springframework.web.servlet.view.document.AbstractJExcelView;
+
+public class ResultExcelView extends AbstractJExcelView {
+       public final static String MODELKEY_RESULT = "result";
+
+       
+       @SuppressWarnings(value = { "unchecked" })
+       protected void buildExcelDocument(Map model, WritableWorkbook workbook,
+                       HttpServletRequest request, HttpServletResponse response) {
+               try {
+                       if (workbook.getNumberOfSheets() == 0) {
+                               workbook.createSheet("SLC", 0);
+                       }
+                       WritableSheet sheet = workbook.getSheet("SLC");
+
+                       TreeTestResult ttr = (TreeTestResult) model
+                                       .get(MODELKEY_RESULT);
+
+                       sheet.addCell(new Label(0, 0, "Result " + ttr.getUuid()));
+
+                       int currentRow = 1;
+                       for (TreeSPath path : ttr.getResultParts().keySet()) {
+                               PartSubList lst = ttr.getResultParts().get(path);
+                               sheet.addCell(new Label(0, currentRow, "Path " + path));
+                               currentRow++;
+                               for (TestResultPart part : lst.getParts()) {
+                                       sheet.addCell(new Label(0, currentRow, SlcTestUtils
+                                                       .statusToString(part.getStatus())));
+                                       sheet.addCell(new Label(1, currentRow, part.getMessage()));
+                                       currentRow++;
+                               }
+                               currentRow++;// add an empty line between paths
+                       }
+               } catch (Exception e) {
+                       throw new SlcException("Could not write spreadsheet.", e);
+               }
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/ResultPdfView.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/ResultPdfView.java
new file mode 100644 (file)
index 0000000..7891e18
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc;
+
+import java.awt.Color;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.argeo.slc.core.structure.tree.TreeSPath;
+import org.argeo.slc.core.test.SlcTestUtils;
+import org.argeo.slc.core.test.tree.PartSubList;
+import org.argeo.slc.core.test.tree.TreeTestResult;
+import org.argeo.slc.test.TestResultPart;
+import org.argeo.slc.test.TestStatus;
+import org.springframework.web.servlet.view.document.AbstractPdfView;
+
+import com.lowagie.text.Cell;
+import com.lowagie.text.Document;
+import com.lowagie.text.Paragraph;
+import com.lowagie.text.Table;
+import com.lowagie.text.pdf.PdfWriter;
+
+public class ResultPdfView extends AbstractPdfView {
+       // private static final Log log = LogFactory.getLog(ResultPdfView.class);
+
+       public final static String MODELKEY_RESULT = "result";
+
+       @Override
+       @SuppressWarnings(value = { "unchecked" })
+       protected void buildPdfDocument(Map model, Document document,
+                       PdfWriter writer, HttpServletRequest request,
+                       HttpServletResponse response) throws Exception {
+               TreeTestResult ttr = (TreeTestResult) model.get(MODELKEY_RESULT);
+
+               document.addTitle("Result " + ttr.getUuid());
+               document.add(new Paragraph("Result " + ttr.getUuid()));
+
+               for (TreeSPath path : ttr.getResultParts().keySet()) {
+                       PartSubList lst = ttr.getResultParts().get(path);
+                       document.add(new Paragraph("Path " + path));
+                       Table table = new Table(2, lst.getParts().size());
+                       for (TestResultPart part : lst.getParts()) {
+                               Integer status = part.getStatus();
+                               Cell statusCell = new Cell(SlcTestUtils.statusToString(status));
+                               final Color color;
+                               if (status.equals(TestStatus.PASSED))
+                                       color = Color.GREEN;
+                               else if (status.equals(TestStatus.FAILED))
+                                       color = Color.RED;
+                               else
+                                       color = Color.MAGENTA;
+
+                               statusCell.setBackgroundColor(color);
+                               table.addCell(statusCell);
+                               table.addCell(part.getMessage());
+                       }
+                       document.add(table);
+               }
+
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/WebSlcEventListenerRegister.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/WebSlcEventListenerRegister.java
new file mode 100644 (file)
index 0000000..a671a72
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Vector;
+
+import org.argeo.slc.msg.event.SlcEventListenerDescriptor;
+import org.argeo.slc.msg.event.SlcEventListenerRegister;
+import org.springframework.web.context.request.RequestContextHolder;
+
+public class WebSlcEventListenerRegister implements SlcEventListenerRegister,
+               Serializable {
+       public final static String ATTR_EVENT_LISTENER = "slcEventListener";
+
+       static final long serialVersionUID = 1l;
+
+       // private String clientId = UUID.randomUUID().toString();
+
+       /** Synchronized */
+       private List<SlcEventListenerDescriptor> descriptors = new Vector<SlcEventListenerDescriptor>();
+
+       public synchronized void addEventListenerDescriptor(
+                       SlcEventListenerDescriptor eventListenerDescriptor) {
+               if (descriptors.contains(eventListenerDescriptor))
+                       descriptors.remove(eventListenerDescriptor);
+               descriptors.add(eventListenerDescriptor);
+       }
+
+       public synchronized void removeEventListenerDescriptor(
+                       SlcEventListenerDescriptor eventListenerDescriptor) {
+               descriptors.remove(eventListenerDescriptor);
+       }
+
+       public synchronized List<SlcEventListenerDescriptor> getDescriptorsCopy() {
+               return new ArrayList<SlcEventListenerDescriptor>(descriptors);
+       }
+
+       public String getId() {
+               return RequestContextHolder.currentRequestAttributes().getSessionId();
+       }
+
+       // public SlcEvent listen(SlcEventListener eventListener, Long timeout) {
+       // return eventListener.listen(clientId, getDescriptorsCopy(), timeout);
+       // }
+
+       // public void init() {
+       // clientId = getSessionId();
+       // checkClientId();
+       //
+       // if (log.isDebugEnabled())
+       // log.debug("Initialized web event listener " + clientId);
+       // }
+       //
+       // public void close() {
+       // checkClientId();
+       // if (log.isDebugEnabled())
+       // log.debug("Closed web event listener " + clientId);
+       // }
+
+       // protected void checkClientId() {
+       // String sessionId = getSessionId();
+       // if (clientId == null || !clientId.equals(sessionId))
+       // throw new SlcException("Client id " + clientId
+       // + " not consistent with web session id " + sessionId);
+       // }
+       //
+       // protected String getSessionId() {
+       // return RequestContextHolder.currentRequestAttributes().getSessionId();
+       // }
+       //
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/XsltMarshallerView.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/XsltMarshallerView.java
new file mode 100644 (file)
index 0000000..4d1d50e
--- /dev/null
@@ -0,0 +1,57 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.mvc;\r
+\r
+import javax.xml.parsers.DocumentBuilderFactory;\r
+import javax.xml.transform.Source;\r
+import javax.xml.transform.dom.DOMResult;\r
+import javax.xml.transform.dom.DOMSource;\r
+\r
+import org.argeo.slc.SlcException;\r
+import org.argeo.slc.core.test.tree.TreeTestResult;\r
+import org.argeo.slc.core.test.tree.TreeTestResultCollection;\r
+import org.argeo.slc.process.SlcExecution;\r
+import org.springframework.oxm.Marshaller;\r
+import org.springframework.web.servlet.view.xslt.XsltView;\r
+import org.w3c.dom.Document;\r
+\r
+public class XsltMarshallerView extends XsltView {\r
+\r
+       private Marshaller marshaller;\r
+\r
+       @Override\r
+       protected Class<?>[] getSourceTypes() {\r
+               return new Class[] { TreeTestResult.class,\r
+                               TreeTestResultCollection.class, SlcExecution.class };\r
+       }\r
+\r
+       @Override\r
+       protected Source convertSource(Object source) throws Exception {\r
+               Document document = DocumentBuilderFactory.newInstance()\r
+                               .newDocumentBuilder().newDocument();\r
+               DOMResult result = new DOMResult(document);\r
+               if (!marshaller.supports(source.getClass()))\r
+                       throw new SlcException("Object of type " + source.getClass()\r
+                                       + " not supported.");\r
+               marshaller.marshal(source, result);\r
+               return new DOMSource(result.getNode());\r
+       }\r
+\r
+       public void setMarshaller(Marshaller marshaller) {\r
+               this.marshaller = marshaller;\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/XsltMarshallerViewResolver.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/XsltMarshallerViewResolver.java
new file mode 100644 (file)
index 0000000..55e44de
--- /dev/null
@@ -0,0 +1,106 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.mvc;\r
+\r
+import java.io.IOException;\r
+import java.util.Map;\r
+import java.util.TreeMap;\r
+\r
+import javax.xml.transform.Source;\r
+import javax.xml.transform.TransformerException;\r
+import javax.xml.transform.URIResolver;\r
+import javax.xml.transform.stream.StreamSource;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.argeo.slc.SlcException;\r
+import org.springframework.core.io.Resource;\r
+import org.springframework.oxm.Marshaller;\r
+import org.springframework.web.servlet.view.AbstractUrlBasedView;\r
+import org.springframework.web.servlet.view.xslt.XsltViewResolver;\r
+\r
+/**\r
+ * Xslt View resolver implementing URI resolver as well.\r
+ * \r
+ * @see URIResolver\r
+ * @see XsltViewResolver\r
+ */\r
+public class XsltMarshallerViewResolver extends XsltViewResolver implements\r
+               URIResolver {\r
+       private final static Log log = LogFactory\r
+                       .getLog(XsltMarshallerViewResolver.class);\r
+\r
+       private Marshaller marshaller;\r
+       private Map<String, Source> cacheUriResolver = new TreeMap<String, Source>();\r
+\r
+       public XsltMarshallerViewResolver() {\r
+               setUriResolver(this);\r
+       }\r
+\r
+       @Override\r
+       protected AbstractUrlBasedView buildView(String viewName) throws Exception {\r
+               AbstractUrlBasedView viewT = super.buildView(viewName);\r
+               XsltMarshallerView view = (XsltMarshallerView) viewT;\r
+               view.setMarshaller(marshaller);\r
+               return view;\r
+       }\r
+\r
+       public void setMarshaller(Marshaller marshaller) {\r
+               this.marshaller = marshaller;\r
+       }\r
+\r
+       public Source resolve(String href, String base) throws TransformerException {\r
+               if (log.isTraceEnabled())\r
+                       log.trace("Resolve URI for href=" + href + " base=" + base);\r
+\r
+               Source res = null;\r
+               if (isCache())\r
+                       res = cacheUriResolver.get(href);\r
+\r
+               if (res == null)\r
+                       res = getStylesheetSource(href);\r
+\r
+               if (res == null)\r
+                       res = getStylesheetSource(getPrefix() + href);\r
+\r
+               if (res == null)\r
+                       throw new SlcException("Can't resolve URI for href=" + href\r
+                                       + " base=" + base);\r
+\r
+               if (isCache() && !cacheUriResolver.containsKey(href))\r
+                       cacheUriResolver.put(href, res);\r
+\r
+               return res;\r
+       }\r
+\r
+       protected Source getStylesheetSource(String url) {\r
+               if (log.isDebugEnabled()) {\r
+                       log.debug("Loading XSLT stylesheet from '" + url + "'");\r
+               }\r
+               try {\r
+                       final Resource stylesheetResource = getApplicationContext()\r
+                                       .getResource(url);\r
+                       String systemId = url.substring(0, url.lastIndexOf('/') + 1);\r
+                       return new StreamSource(stylesheetResource.getInputStream(),\r
+                                       systemId);\r
+               } catch (IOException e) {\r
+                       if (log.isTraceEnabled())\r
+                               log.trace("Cannot load stylesheet " + url, e);\r
+                       return null;\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/AgentController.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/AgentController.java
new file mode 100644 (file)
index 0000000..79f8c24
--- /dev/null
@@ -0,0 +1,62 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.mvc.controllers;\r
+\r
+import java.util.List;\r
+import java.util.Vector;\r
+\r
+import org.argeo.slc.dao.runtime.SlcAgentDescriptorDao;\r
+import org.argeo.slc.msg.ExecutionAnswer;\r
+import org.argeo.slc.msg.ObjectList;\r
+import org.argeo.slc.runtime.SlcAgentDescriptor;\r
+import org.springframework.stereotype.Controller;\r
+import org.springframework.web.bind.annotation.RequestMapping;\r
+\r
+/**\r
+ * Controle and information about the agents.\r
+ */\r
+\r
+@Controller\r
+public class AgentController {\r
+\r
+       // IoC\r
+       private SlcAgentDescriptorDao slcAgentDescriptorDao;\r
+\r
+       @RequestMapping("/listAgents.service")\r
+       protected ObjectList listAgents() {\r
+               List<SlcAgentDescriptor> list = slcAgentDescriptorDao\r
+                               .listSlcAgentDescriptors();\r
+               return new ObjectList(list);\r
+       }\r
+\r
+       @RequestMapping("/cleanAgents.service")\r
+       protected ExecutionAnswer cleanAgents() {\r
+\r
+               List<SlcAgentDescriptor> list = slcAgentDescriptorDao\r
+                               .listSlcAgentDescriptors();\r
+               for (SlcAgentDescriptor t : new Vector<SlcAgentDescriptor>(list)) {\r
+                       slcAgentDescriptorDao.delete(t);\r
+               }\r
+               return ExecutionAnswer.ok("Execution completed properly");\r
+       }\r
+\r
+       // IoC\r
+       public void setSlcAgentDescriptorDao(\r
+                       SlcAgentDescriptorDao slcAgentDescriptorDao) {\r
+               this.slcAgentDescriptorDao = slcAgentDescriptorDao;\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/EventController.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/EventController.java
new file mode 100644 (file)
index 0000000..60218b9
--- /dev/null
@@ -0,0 +1,118 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.mvc.controllers;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.argeo.slc.msg.ExecutionAnswer;\r
+import org.argeo.slc.msg.event.SlcEvent;\r
+import org.argeo.slc.msg.event.SlcEventListener;\r
+import org.argeo.slc.msg.event.SlcEventListenerDescriptor;\r
+import org.argeo.slc.msg.event.SlcEventListenerRegister;\r
+import org.springframework.stereotype.Controller;\r
+import org.springframework.web.bind.annotation.RequestMapping;\r
+import org.springframework.web.bind.annotation.RequestParam;\r
+\r
+@Controller\r
+public class EventController {\r
+\r
+       private final static Log log = LogFactory.getLog(EventController.class);\r
+\r
+       private Long defaultTimeout = 10000l;\r
+\r
+       // IoC\r
+       private SlcEventListener eventListener = null;\r
+       // the following bean as a Session scope.\r
+       private SlcEventListenerRegister eventListenerRegister;\r
+\r
+       // Business Methods\r
+       @RequestMapping("/addEventListener.service")\r
+       public ExecutionAnswer addEventListener(\r
+                       @RequestParam(SlcEvent.EVENT_TYPE) String eventType,\r
+                       @RequestParam(value = SlcEvent.EVENT_FILTER, required = false) String eventFilter) {\r
+\r
+               eventListenerRegister\r
+                               .addEventListenerDescriptor(new SlcEventListenerDescriptor(\r
+                                               eventType, eventFilter));\r
+               if (log.isTraceEnabled()) {\r
+                       log.trace("Registered listener on register "\r
+                                       + eventListenerRegister.getId() + " for type " + eventType\r
+                                       + ", filter=" + eventFilter);\r
+                       log.trace("Nb of registered descriptors : "\r
+                                       + eventListenerRegister.getDescriptorsCopy().size());\r
+               }\r
+               return ExecutionAnswer.ok("Execution completed properly");\r
+\r
+       }\r
+\r
+       @RequestMapping("/removeEventListener.service")\r
+       public ExecutionAnswer removeEventListener(\r
+                       @RequestParam(SlcEvent.EVENT_TYPE) String eventType,\r
+                       @RequestParam(value = SlcEvent.EVENT_FILTER, required = false) String eventFilter) {\r
+\r
+               eventListenerRegister\r
+                               .removeEventListenerDescriptor(new SlcEventListenerDescriptor(\r
+                                               eventType, eventFilter));\r
+               if (log.isTraceEnabled()) {\r
+                       log.trace("Removed listener from register "\r
+                                       + eventListenerRegister.getId() + " for type " + eventType\r
+                                       + ", filter=" + eventFilter);\r
+                       log.trace("Nb of registered descriptors : "\r
+                                       + eventListenerRegister.getDescriptorsCopy().size());\r
+               }\r
+               return ExecutionAnswer.ok("Execution completed properly");\r
+       }\r
+\r
+       @RequestMapping("/pollEvent.service")\r
+       public Object pollEvent(\r
+                       @RequestParam(value = "timeout", required = false) String timeoutStr) {\r
+               final Long timeout;\r
+               if (timeoutStr != null)\r
+                       timeout = Long.parseLong(timeoutStr);\r
+               else\r
+                       timeout = defaultTimeout;\r
+               if (log.isTraceEnabled()) {\r
+                       log.trace("Begin poolEvent.service :"\r
+                                       + " Nb of registered descriptors : "\r
+                                       + eventListenerRegister.getDescriptorsCopy().size());\r
+               }\r
+               SlcEvent event = eventListener.listen(eventListenerRegister.getId(),\r
+                               eventListenerRegister.getDescriptorsCopy(), timeout);\r
+               if (event != null) {\r
+                       if (log.isTraceEnabled())\r
+                               log.trace("Event heard : " + event.toString());\r
+                       return event;\r
+               } else {\r
+                       if (log.isTraceEnabled())\r
+                               log.trace("No Event heard - Time out: ");\r
+                       return ExecutionAnswer.ok("Execution completed properly");\r
+               }\r
+\r
+       }\r
+\r
+       public void setEventListenerRegister(\r
+                       SlcEventListenerRegister eventListenerRegister) {\r
+               this.eventListenerRegister = eventListenerRegister;\r
+       }\r
+\r
+       public void setDefaultTimeout(Long defaultTimeout) {\r
+               this.defaultTimeout = defaultTimeout;\r
+       }\r
+\r
+       public void setEventListener(SlcEventListener eventListener) {\r
+               this.eventListener = eventListener;\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ProcessController.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ProcessController.java
new file mode 100644 (file)
index 0000000..579b5bf
--- /dev/null
@@ -0,0 +1,278 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.mvc.controllers;\r
+\r
+import java.io.BufferedReader;\r
+import java.text.SimpleDateFormat;\r
+import java.util.Comparator;\r
+import java.util.List;\r
+import java.util.SortedSet;\r
+import java.util.TreeSet;\r
+import java.util.UUID;\r
+\r
+import javax.servlet.http.HttpServletRequest;\r
+import javax.servlet.http.HttpServletResponse;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.argeo.slc.SlcException;\r
+import org.argeo.slc.core.attachment.AttachmentsStorage;\r
+import org.argeo.slc.dao.process.SlcExecutionDao;\r
+import org.argeo.slc.execution.ExecutionModuleDescriptor;\r
+import org.argeo.slc.msg.ExecutionAnswer;\r
+import org.argeo.slc.msg.MsgConstants;\r
+import org.argeo.slc.msg.ObjectList;\r
+import org.argeo.slc.process.SlcExecution;\r
+import org.argeo.slc.process.SlcExecutionStep;\r
+import org.argeo.slc.runtime.SlcAgent;\r
+import org.argeo.slc.runtime.SlcAgentFactory;\r
+import org.argeo.slc.services.SlcExecutionService;\r
+import org.springframework.oxm.Marshaller;\r
+import org.springframework.oxm.Unmarshaller;\r
+import org.springframework.stereotype.Controller;\r
+import org.springframework.ui.Model;\r
+import org.springframework.util.Assert;\r
+import org.springframework.web.bind.annotation.RequestMapping;\r
+import org.springframework.web.bind.annotation.RequestParam;\r
+import org.springframework.xml.transform.StringSource;\r
+\r
+@Controller\r
+public class ProcessController {\r
+\r
+       private final static Log log = LogFactory.getLog(ProcessController.class);\r
+\r
+       private SlcExecutionDao slcExecutionDao;\r
+       private SlcAgentFactory agentFactory;\r
+       private Unmarshaller unmarshaller;\r
+       private Marshaller marshaller;\r
+       private SlcExecutionService slcExecutionService;\r
+       private AttachmentsStorage attachmentsStorage;\r
+\r
+       private SlcExecutionManager slcExecutionManager;\r
+\r
+       @RequestMapping("/listSlcExecutions.service")\r
+       protected ObjectList listSlcExecutions() {\r
+               List<SlcExecution> list = slcExecutionDao.listSlcExecutions();\r
+               return new ObjectList(list);\r
+       }\r
+\r
+       @RequestMapping("/getExecutionDescriptor.service")\r
+       protected ExecutionModuleDescriptor getExecutionDescriptor(\r
+                       @RequestParam String agentId, @RequestParam String moduleName,\r
+                       @RequestParam String version) {\r
+\r
+               SlcAgent slcAgent = agentFactory.getAgent(agentId);\r
+\r
+               ExecutionModuleDescriptor md = slcAgent.getExecutionModuleDescriptor(\r
+                               moduleName, version);\r
+               return md;\r
+       }\r
+\r
+       @RequestMapping("/listModulesDescriptors.service")\r
+       protected ObjectList listModulesDescriptors(@RequestParam String agentId) {\r
+               // TODO: use centralized agentId property (from MsgConstants)?\r
+               SlcAgent slcAgent = agentFactory.getAgent(agentId);\r
+\r
+               List<ExecutionModuleDescriptor> descriptors = slcAgent\r
+                               .listExecutionModuleDescriptors();\r
+               SortedSet<ExecutionModuleDescriptor> set = new TreeSet<ExecutionModuleDescriptor>(\r
+                               new Comparator<ExecutionModuleDescriptor>() {\r
+\r
+                                       public int compare(ExecutionModuleDescriptor md1,\r
+                                                       ExecutionModuleDescriptor md2) {\r
+                                               String str1 = md1.getLabel() != null ? md1.getLabel()\r
+                                                               : md1.getName();\r
+                                               String str2 = md2.getLabel() != null ? md2.getLabel()\r
+                                                               : md2.getName();\r
+                                               return str1.compareTo(str2);\r
+                                       }\r
+                               });\r
+               set.addAll(descriptors);\r
+               return new ObjectList(set);\r
+       }\r
+\r
+       @RequestMapping("/getSlcExecution.service")\r
+       protected SlcExecution getSlcExecution(@RequestParam String uuid) {\r
+               SlcExecution slcExecution = slcExecutionDao.getSlcExecution(uuid);\r
+               initializeSEM();\r
+               slcExecutionManager.retrieveRealizedFlows(slcExecution);\r
+               return slcExecution;\r
+       }\r
+\r
+       @RequestMapping("/newSlcExecution.service")\r
+       protected ExecutionAnswer newSlcExecution(HttpServletRequest request,\r
+                       Model model) throws Exception {\r
+\r
+               String agentId = request\r
+                               .getParameter(MsgConstants.PROPERTY_SLC_AGENT_ID);\r
+               Assert.notNull(agentId, "agent id");\r
+\r
+               String answer = request.getParameter("body");\r
+               if (answer == null) {\r
+                       // lets read the message body instead\r
+                       BufferedReader reader = request.getReader();\r
+                       StringBuffer buffer = new StringBuffer();\r
+                       String line = null;\r
+                       while (((line = reader.readLine()) != null)) {\r
+                               buffer.append(line);\r
+                       }\r
+                       answer = buffer.toString();\r
+               }\r
+\r
+               if (log.isTraceEnabled())\r
+                       log.debug("Received message:\n" + answer);\r
+\r
+               StringSource source = new StringSource(answer);\r
+               SlcExecution slcExecution = (SlcExecution) unmarshaller\r
+                               .unmarshal(source);\r
+\r
+               // Workaround for https://www.argeo.org/bugzilla/show_bug.cgi?id=86\r
+               if (slcExecution.getUuid() == null\r
+                               || slcExecution.getUuid().length() < 8)\r
+                       slcExecution.setUuid(UUID.randomUUID().toString());\r
+\r
+               slcExecution.setStatus(SlcExecution.SCHEDULED);\r
+               slcExecution.getSteps().add(\r
+                               new SlcExecutionStep(SlcExecutionStep.START,\r
+                                               "Process started from the Web UI"));\r
+\r
+               initializeSEM();\r
+               slcExecutionManager.storeRealizedFlows(slcExecution);\r
+               slcExecutionService.newExecution(slcExecution);\r
+               SlcAgent agent = agentFactory.getAgent(agentId);\r
+               //agent.runSlcExecution(slcExecution);\r
+\r
+               return ExecutionAnswer.ok("Execution completed properly");\r
+       }\r
+\r
+       @RequestMapping("/tailSlcExecutionStepsCount.service")\r
+       protected ObjectList tailSlcExecutionSteps(@RequestParam String uuid,\r
+                       @RequestParam Integer stepCount) {\r
+               List<SlcExecutionStep> list = slcExecutionDao\r
+                               .tailSteps(uuid, stepCount);\r
+               return new ObjectList(list);\r
+       }\r
+\r
+       @RequestMapping("/tailSlcExecutionStepsOffset.service")\r
+       protected ObjectList tailSlcExecutionSteps(@RequestParam String uuid,\r
+                       @RequestParam String stepOffsetUuid) {\r
+               List<SlcExecutionStep> list = slcExecutionDao.tailSteps(uuid,\r
+                               stepOffsetUuid);\r
+               return new ObjectList(list);\r
+       }\r
+\r
+       @RequestMapping("/downloadSlcExecution.service")\r
+       protected void downloadSlcExecution(@RequestParam String uuid,\r
+                       @RequestParam String ext, HttpServletResponse response)\r
+                       throws Exception {\r
+               String contentType;\r
+               // cf. http://en.wikipedia.org/wikServicei/Internet_media_type\r
+               if ("csv".equals(ext))\r
+                       contentType = "text/csv";\r
+               else if ("pdf".equals(ext))\r
+                       contentType = "application/pdf";\r
+               else if ("zip".equals(ext))\r
+                       contentType = "application/zip";\r
+               else if ("html".equals(ext))\r
+                       contentType = "application/html";\r
+               else if ("txt".equals(ext) || "log".equals(ext))\r
+                       contentType = "text/plain";\r
+               else if ("doc".equals(ext) || "docx".equals(ext))\r
+                       contentType = "application/msword";\r
+               else if ("xls".equals(ext) || "xlsx".equals(ext))\r
+                       contentType = "application/vnd.ms-excel";\r
+               else if ("xml".equals(ext))\r
+                       contentType = "text/xml";\r
+               else\r
+                       contentType = "Content-Type: application/force-download";\r
+\r
+               String name = "Process-" + uuid + "." + ext;\r
+\r
+               SlcExecution process = slcExecutionDao.getSlcExecution(uuid);\r
+\r
+               SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");\r
+\r
+               // TODO: put it in a separate view\r
+               if ("log".equals(ext)) {\r
+                       StringBuffer buf = new StringBuffer("");\r
+                       buf.append("#\n# PROCESS " + process.getUuid() + "\n#\n\n");\r
+                       buf\r
+                                       .append("Started at " + df.format(process.getStartDate())\r
+                                                       + "\n");\r
+                       buf.append("Ended at " + df.format(process.getEndDate()) + "\n");\r
+                       buf.append("On host " + process.getHost() + "\n");\r
+                       buf.append("\n# LOG\n\n");\r
+                       for (SlcExecutionStep step : process.getSteps()) {\r
+                               buf.append(df.format(step.getTimestamp()));\r
+                               buf.append(" ");\r
+                               for (int i = 0; i < step.getLogLines().size(); i++) {\r
+                                       if (i > 0)\r
+                                               buf.append('\n');\r
+                                       buf.append(step.getLogLines().get(i));\r
+                               }\r
+                               buf.append(" - ");\r
+                               buf.append(step.getType());\r
+                               buf.append(" - ");\r
+                               buf.append('[').append(step.getThread()).append(']');\r
+                               buf.append('\n');\r
+                       }\r
+                       prepareDownloadResponse(name, contentType, response);\r
+                       response.getWriter().print(buf);\r
+               } else {\r
+                       throw new SlcException("Unsupported content type " + contentType);\r
+               }\r
+       }\r
+\r
+       protected void prepareDownloadResponse(String name, String contentType,\r
+                       HttpServletResponse response) {\r
+               response.setHeader("Content-Disposition", "attachment; filename=\""\r
+                               + name + "\"");\r
+               response.setContentType(contentType + ";name=\"" + name + "\"");\r
+               response.setHeader("Expires", "0");\r
+               response.setHeader("Cache-Control", "no-cache, must-revalidate");\r
+               response.setHeader("Pragma", "no-cache");\r
+       }\r
+\r
+       private void initializeSEM() {\r
+               slcExecutionManager = new SlcExecutionManager(unmarshaller, marshaller,\r
+                               attachmentsStorage);\r
+       }\r
+\r
+       public void setSlcExecutionDao(SlcExecutionDao slcExecutionDao) {\r
+               this.slcExecutionDao = slcExecutionDao;\r
+       }\r
+\r
+       public void setSlcExecutionService(SlcExecutionService slcExecutionService) {\r
+               this.slcExecutionService = slcExecutionService;\r
+       }\r
+\r
+       public void setUnmarshaller(Unmarshaller unmarshaller) {\r
+               this.unmarshaller = unmarshaller;\r
+       }\r
+\r
+       public void setMarshaller(Marshaller marshaller) {\r
+               this.marshaller = marshaller;\r
+       }\r
+\r
+       public void setAttachmentsStorage(AttachmentsStorage attachmentsStorage) {\r
+               this.attachmentsStorage = attachmentsStorage;\r
+       }\r
+\r
+       public void setAgentFactory(SlcAgentFactory agentFactory) {\r
+               this.agentFactory = agentFactory;\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/RenderingResultController.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/RenderingResultController.java
new file mode 100644 (file)
index 0000000..58d423a
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.mvc.controllers;\r
+\r
+import javax.servlet.http.HttpServletRequest;\r
+\r
+import org.argeo.slc.SlcException;\r
+import org.argeo.slc.core.test.tree.TreeTestResult;\r
+import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
+import org.springframework.stereotype.Controller;\r
+import org.springframework.ui.ModelMap;\r
+import org.springframework.web.bind.annotation.RequestMapping;\r
+import org.springframework.web.bind.annotation.RequestParam;\r
+\r
+/**\r
+ * Sends back the results, rendered or as collection.\r
+ */\r
+\r
+@Controller\r
+public class RenderingResultController {\r
+       // private static final Log log =\r
+       // LogFactory.getLog(RenderingResultController.class);\r
+\r
+       public final static String MODELKEY_RESULT = "result";\r
+\r
+       // IoC\r
+       private TreeTestResultDao treeTestResultDao;\r
+\r
+       @RequestMapping("/resultView.*")\r
+       public String getPdfResultView(@RequestParam("uuid") String uuid,\r
+                       ModelMap model, HttpServletRequest request) {\r
+\r
+               TreeTestResult result = treeTestResultDao.getTestResult(uuid);\r
+               if (result == null)\r
+                       throw new SlcException("No result found for uuid " + uuid);\r
+               model.addAttribute(MODELKEY_RESULT, result);\r
+\r
+               String docType = request.getRequestURI().substring(\r
+                               request.getRequestURI().lastIndexOf(".") + 1);\r
+\r
+               if ("pdf".equals(docType))\r
+                       return "resultPdfView";\r
+               if ("xls".equals(docType))\r
+                       return "resultExcelView";\r
+               if ("xslt".equals(docType))\r
+                       return "resultXsltView";\r
+               if ("xml".equals(docType))\r
+                       return "resultXmlView";\r
+\r
+               throw new SlcException("No renderer found for files of extension "\r
+                               + docType);\r
+       }\r
+\r
+       // IoC\r
+\r
+       public void setTreeTestResultDao(TreeTestResultDao treeTestResultDao) {\r
+               this.treeTestResultDao = treeTestResultDao;\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ResultController.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ResultController.java
new file mode 100644 (file)
index 0000000..0cf8fed
--- /dev/null
@@ -0,0 +1,290 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.mvc.controllers;\r
+\r
+import java.util.ArrayList;\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.Map;\r
+import java.util.SortedSet;\r
+\r
+import javax.servlet.ServletOutputStream;\r
+import javax.servlet.http.HttpServletRequest;\r
+import javax.servlet.http.HttpServletResponse;\r
+\r
+import org.apache.commons.io.FilenameUtils;\r
+import org.argeo.slc.SlcException;\r
+import org.argeo.slc.core.attachment.AttachmentsStorage;\r
+import org.argeo.slc.core.attachment.SimpleAttachment;\r
+import org.argeo.slc.core.test.tree.ResultAttributes;\r
+import org.argeo.slc.core.test.tree.TreeTestResult;\r
+import org.argeo.slc.core.test.tree.TreeTestResultCollection;\r
+import org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao;\r
+import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
+import org.argeo.slc.msg.ExecutionAnswer;\r
+import org.argeo.slc.msg.ObjectList;\r
+import org.argeo.slc.msg.ReferenceList;\r
+import org.argeo.slc.services.TestManagerService;\r
+import org.springframework.stereotype.Controller;\r
+import org.springframework.ui.Model;\r
+import org.springframework.util.PatternMatchUtils;\r
+import org.springframework.web.bind.annotation.RequestMapping;\r
+import org.springframework.web.bind.annotation.RequestParam;\r
+\r
+@Controller\r
+public class ResultController {\r
+\r
+       // private final static Log log =\r
+       // LogFactory.getLog(ServiceController.class);\r
+\r
+       // Constants\r
+       protected final String FORCE_DOWNLOAD = "Content-Type: application/force-download";\r
+\r
+       // IoC\r
+       private TreeTestResultDao treeTestResultDao;\r
+       private TreeTestResultCollectionDao treeTestResultCollectionDao;\r
+       private TestManagerService testManagerService;\r
+       private AttachmentsStorage attachmentsStorage;\r
+\r
+       // Business Methods\r
+       @RequestMapping("/getResult.service")\r
+       protected TreeTestResult getResult(\r
+                       @RequestParam(value = "uuid", required = false) String uuid) {\r
+\r
+               TreeTestResult result = treeTestResultDao.getTestResult(uuid);\r
+               if (result == null)\r
+                       throw new SlcException("No result found for uuid " + uuid);\r
+               return result;\r
+       }\r
+\r
+       @RequestMapping("/addResultToCollection.service")\r
+       protected ExecutionAnswer addResultToCollection(\r
+                       @RequestParam String collectionId, @RequestParam String resultUuid) {\r
+               testManagerService.addResultToCollection(collectionId, resultUuid);\r
+               return ExecutionAnswer.ok("Execution completed properly");\r
+       }\r
+\r
+       @RequestMapping("/removeResultFromCollection.service")\r
+       protected ExecutionAnswer removeResultFromCollection(\r
+                       HttpServletRequest request) {\r
+               String collectionId = request.getParameter("collectionId");\r
+               String[] resultUuids = request.getParameterValues("resultUuid");\r
+               String[] attrNames = request.getParameterValues("attrName");\r
+               String[] attrPatterns = request.getParameterValues("attrPattern");\r
+\r
+               // Checks\r
+               if (collectionId == null)\r
+                       throw new SlcException("A collection id must be specified");\r
+               if (attrNames != null\r
+                               && (attrPatterns == null || attrNames.length != attrPatterns.length))\r
+                       throw new SlcException(\r
+                                       "There must be as many attrName as attrPatterns");\r
+\r
+               // Remove specified results\r
+               if (resultUuids != null)\r
+                       for (String resultUuid : resultUuids)\r
+                               testManagerService.removeResultFromCollection(collectionId,\r
+                                               resultUuid);\r
+\r
+               if (attrNames != null) {\r
+                       TreeTestResultCollection sourceCollection = treeTestResultCollectionDao\r
+                                       .getTestResultCollection(collectionId);\r
+\r
+                       int index = 0;\r
+                       for (String attrName : attrNames) {\r
+                               String attrPattern = attrPatterns[index];// safe: checked above\r
+\r
+                               List<TreeTestResult> results = new ArrayList<TreeTestResult>(\r
+                                               sourceCollection.getResults());\r
+                               for (TreeTestResult treeTestResult : results) {\r
+                                       if (PatternMatchUtils.simpleMatch(attrPattern,\r
+                                                       treeTestResult.getAttributes().get(attrName))) {\r
+                                               testManagerService.removeResultFromCollection(\r
+                                                               collectionId, treeTestResult.getUuid());\r
+                                       }\r
+                               }\r
+                               index++;\r
+                       }\r
+               } else {\r
+                       if (resultUuids == null) {// no specs\r
+                               // remove all\r
+                               // TODO: optimize\r
+                               TreeTestResultCollection sourceCollection = treeTestResultCollectionDao\r
+                                               .getTestResultCollection(collectionId);\r
+                               List<TreeTestResult> results = new ArrayList<TreeTestResult>(\r
+                                               sourceCollection.getResults());\r
+                               for (TreeTestResult treeTestResult : results) {\r
+                                       testManagerService.removeResultFromCollection(collectionId,\r
+                                                       treeTestResult.getUuid());\r
+                               }\r
+\r
+                       }\r
+               }\r
+               return ExecutionAnswer.ok("Execution completed properly");\r
+       }\r
+\r
+       @RequestMapping("/listCollectionRefs.service")\r
+       protected ReferenceList listCollectionRefs(HttpServletRequest request,\r
+                       HttpServletResponse response) {\r
+\r
+               SortedSet<TreeTestResultCollection> results = treeTestResultCollectionDao\r
+                               .listCollections();\r
+\r
+               ReferenceList referenceList = new ReferenceList();\r
+               for (TreeTestResultCollection collection : results) {\r
+                       referenceList.getReferences().add(collection.getId());\r
+               }\r
+               return referenceList;\r
+       }\r
+\r
+       @RequestMapping("/listResultAttributes.service")\r
+       protected ObjectList listResultAttributes(@RequestParam String id,\r
+                       Model model) {\r
+\r
+               List<ResultAttributes> resultAttributes = treeTestResultCollectionDao\r
+                               .listResultAttributes(id);\r
+               return new ObjectList(resultAttributes);\r
+       }\r
+\r
+       @RequestMapping("/listResults.service")\r
+       @SuppressWarnings(value = { "unchecked" })\r
+       protected ObjectList listResults(\r
+                       @RequestParam(value = "collectionId", required = false) String collectionId,\r
+                       HttpServletRequest request) {\r
+               Map<String, String[]> parameterMap = request.getParameterMap();\r
+               Map<String, String> attributes = new HashMap<String, String>();\r
+               for (String parameter : parameterMap.keySet()) {\r
+                       if (parameter.startsWith("attr.")) {\r
+                               String key = parameter.substring("attr.".length());\r
+                               attributes.put(key, parameterMap.get(parameter)[0]);\r
+                       }\r
+               }\r
+\r
+               List<TreeTestResult> resultAttributes = treeTestResultCollectionDao\r
+                               .listResults(collectionId, attributes);\r
+               return new ObjectList(resultAttributes);\r
+       }\r
+\r
+       @RequestMapping("/copyCollectionToCollection.service")\r
+       protected ExecutionAnswer copyCollectionToCollection(\r
+                       @RequestParam String sourceCollectionId,\r
+                       @RequestParam String targetCollectionId, HttpServletRequest request) {\r
+\r
+               String[] attrNames = request.getParameterValues("attrName");\r
+               String[] attrPatterns = request.getParameterValues("attrPattern");\r
+\r
+               // Checks\r
+               if (sourceCollectionId == null || targetCollectionId == null)\r
+                       throw new SlcException(\r
+                                       "Source and target collection ids must be specified");\r
+               if (attrNames != null\r
+                               && (attrPatterns == null || attrNames.length != attrPatterns.length))\r
+                       throw new SlcException(\r
+                                       "There must be as many attrName as attrPatterns");\r
+\r
+               TreeTestResultCollection sourceCollection = treeTestResultCollectionDao\r
+                               .getTestResultCollection(sourceCollectionId);\r
+               if (attrNames != null) {\r
+                       int index = 0;\r
+                       for (String attrName : attrNames) {\r
+                               String attrPattern = attrPatterns[index];// safe: checked above\r
+\r
+                               for (TreeTestResult treeTestResult : sourceCollection\r
+                                               .getResults()) {\r
+                                       if (PatternMatchUtils.simpleMatch(attrPattern,\r
+                                                       treeTestResult.getAttributes().get(attrName))) {\r
+                                               testManagerService.addResultToCollection(\r
+                                                               targetCollectionId, treeTestResult.getUuid());\r
+                                       }\r
+                               }\r
+                               index++;\r
+                       }\r
+               } else {\r
+                       // remove all\r
+                       // TODO: optimize\r
+                       for (TreeTestResult treeTestResult : sourceCollection.getResults()) {\r
+                               testManagerService.addResultToCollection(targetCollectionId,\r
+                                               treeTestResult.getUuid());\r
+                       }\r
+               }\r
+               return ExecutionAnswer.ok("Execution completed properly");\r
+       }\r
+\r
+       @RequestMapping("/getAttachment.service")\r
+       protected void getAttachment(@RequestParam String uuid,\r
+                       @RequestParam String contentType, @RequestParam String name,\r
+                       HttpServletResponse response) throws Exception {\r
+               if (contentType == null || "".equals(contentType.trim())) {\r
+                       if (name != null) {\r
+                               contentType = FORCE_DOWNLOAD;\r
+                               String ext = FilenameUtils.getExtension(name);\r
+                               // cf. http://en.wikipedia.org/wikServicei/Internet_media_type\r
+                               if ("csv".equals(ext))\r
+                                       contentType = "text/csv";\r
+                               else if ("pdf".equals(ext))\r
+                                       contentType = "application/pdf";\r
+                               else if ("zip".equals(ext))\r
+                                       contentType = "application/zip";\r
+                               else if ("html".equals(ext))\r
+                                       contentType = "application/html";\r
+                               else if ("txt".equals(ext))\r
+                                       contentType = "text/plain";\r
+                               else if ("doc".equals(ext) || "docx".equals(ext))\r
+                                       contentType = "application/msword";\r
+                               else if ("xls".equals(ext) || "xlsx".equals(ext))\r
+                                       contentType = "application/vnd.ms-excel";\r
+                               else if ("xml".equals(ext))\r
+                                       contentType = "text/xml";\r
+                       }\r
+               }\r
+\r
+               if (name != null) {\r
+                       contentType = contentType + ";name=\"" + name + "\"";\r
+                       response.setHeader("Content-Disposition", "attachment; filename=\""\r
+                                       + name + "\"");\r
+               }\r
+               response.setHeader("Expires", "0");\r
+               response.setHeader("Cache-Control", "no-cache, must-revalidate");\r
+               response.setHeader("Pragma", "no-cache");\r
+\r
+               SimpleAttachment resourceDescriptor = new SimpleAttachment();\r
+               resourceDescriptor.setUuid(uuid);\r
+               resourceDescriptor.setContentType(contentType);\r
+\r
+               response.setContentType(contentType);\r
+               ServletOutputStream outputStream = response.getOutputStream();\r
+               attachmentsStorage.retrieveAttachment(resourceDescriptor, outputStream);\r
+       }\r
+\r
+       // IoC\r
+\r
+       public void setTreeTestResultDao(TreeTestResultDao treeTestResultDao) {\r
+               this.treeTestResultDao = treeTestResultDao;\r
+       }\r
+\r
+       public void setTestManagerService(TestManagerService testManagerService) {\r
+               this.testManagerService = testManagerService;\r
+       }\r
+\r
+       public void setTreeTestResultCollectionDao(\r
+                       TreeTestResultCollectionDao treeTestResultCollectionDao) {\r
+               this.treeTestResultCollectionDao = treeTestResultCollectionDao;\r
+       }\r
+\r
+       public void setAttachmentsStorage(AttachmentsStorage attachmentsStorage) {\r
+               this.attachmentsStorage = attachmentsStorage;\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ServerController.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ServerController.java
new file mode 100644 (file)
index 0000000..aabb7eb
--- /dev/null
@@ -0,0 +1,115 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.mvc.controllers;\r
+\r
+import java.util.List;\r
+\r
+import javax.servlet.http.HttpServletRequest;\r
+\r
+import org.apache.commons.fileupload.FileItem;\r
+import org.apache.commons.fileupload.FileItemFactory;\r
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;\r
+import org.apache.commons.fileupload.servlet.ServletFileUpload;\r
+import org.argeo.slc.BasicNameVersion;\r
+import org.argeo.slc.NameVersion;\r
+import org.argeo.slc.core.build.ResourceDistribution;\r
+import org.argeo.slc.deploy.DynamicRuntime;\r
+import org.argeo.slc.deploy.Module;\r
+import org.argeo.slc.msg.ExecutionAnswer;\r
+import org.springframework.core.io.ByteArrayResource;\r
+import org.springframework.stereotype.Controller;\r
+import org.springframework.ui.Model;\r
+import org.springframework.web.bind.annotation.RequestMapping;\r
+import org.springframework.web.bind.annotation.RequestParam;\r
+\r
+/**\r
+ * Sends back the results, rendered or as collection.\r
+ */\r
+\r
+@Controller\r
+public class ServerController {\r
+\r
+       // IoC\r
+       private DynamicRuntime<?> dynamicRuntime;\r
+\r
+       // Create a factory for disk-based file items\r
+       private FileItemFactory factory = new DiskFileItemFactory();\r
+       // Create a new file upload handler\r
+       private ServletFileUpload upload = new ServletFileUpload(factory);\r
+\r
+       // SERVER HANDLING\r
+\r
+       @RequestMapping("/isServerReady.service")\r
+       protected ExecutionAnswer isServerReady(Model model) {\r
+               // Does nothing for now, it will return an OK answer.\r
+               return ExecutionAnswer.ok("Execution completed properly");\r
+       }\r
+\r
+       @RequestMapping("/shutdownRuntime.service")\r
+       protected ExecutionAnswer shutdownRuntime(Model model) {\r
+               new Thread() {\r
+                       public void run() {\r
+                               // wait in order to let call return\r
+                               try {\r
+                                       Thread.sleep(3000);\r
+                               } catch (InterruptedException e) {\r
+                                       // silent\r
+                               }\r
+                               dynamicRuntime.shutdown();\r
+                       }\r
+               }.start();\r
+               return ExecutionAnswer.ok("Server shutting down...");\r
+       }\r
+\r
+       // MODULE HANDLING\r
+\r
+       @SuppressWarnings("unchecked")\r
+       @RequestMapping("/installModule.service")\r
+       public void installModule(HttpServletRequest request) throws Exception {\r
+\r
+               // TODO : handle the exception better\r
+\r
+               // Parse the request\r
+               List<FileItem> items = upload.parseRequest(request);\r
+\r
+               byte[] arr = null;\r
+               for (FileItem item : items) {\r
+                       if (!item.isFormField()) {\r
+                               arr = item.get();\r
+                               break;\r
+                       }\r
+               }\r
+\r
+               ByteArrayResource res = new ByteArrayResource(arr);\r
+               Module module = dynamicRuntime.installModule(new ResourceDistribution(\r
+                               res));\r
+               // TODO: customize whether the module is started or not\r
+               dynamicRuntime.startModule(module);\r
+       }\r
+\r
+       @RequestMapping("/uninstallModule.service")\r
+       public void uninstallModule(@RequestParam(value = "name") String name,\r
+                       @RequestParam(value = "version") String version) {\r
+               NameVersion nameVersion = new BasicNameVersion(name, version);\r
+               dynamicRuntime.uninstallModule(nameVersion);\r
+       }\r
+\r
+       // IoC\r
+       public void setDynamicRuntime(DynamicRuntime<?> dynamicRuntime) {\r
+               this.dynamicRuntime = dynamicRuntime;\r
+       }\r
+\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/SlcExecutionManager.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/SlcExecutionManager.java
new file mode 100644 (file)
index 0000000..3a07b79
--- /dev/null
@@ -0,0 +1,105 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.web.mvc.controllers;\r
+\r
+import java.io.ByteArrayInputStream;\r
+import java.io.ByteArrayOutputStream;\r
+import java.io.InputStream;\r
+import java.util.UUID;\r
+\r
+import javax.xml.transform.stream.StreamSource;\r
+\r
+import org.apache.commons.io.IOUtils;\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.argeo.slc.core.attachment.Attachment;\r
+import org.argeo.slc.core.attachment.AttachmentsStorage;\r
+import org.argeo.slc.core.attachment.SimpleAttachment;\r
+import org.argeo.slc.msg.ObjectList;\r
+import org.argeo.slc.process.SlcExecution;\r
+import org.springframework.oxm.Marshaller;\r
+import org.springframework.oxm.Unmarshaller;\r
+import org.springframework.xml.transform.StringResult;\r
+\r
+public class SlcExecutionManager {\r
+       private final static Log log = LogFactory.getLog(SlcExecutionManager.class);\r
+\r
+       private Unmarshaller unmarshaller;\r
+       private Marshaller marshaller;\r
+       private AttachmentsStorage attachmentsStorage;\r
+\r
+       public SlcExecutionManager(Unmarshaller unmarshaller,\r
+                       Marshaller marshaller, AttachmentsStorage attachmentsStorage) {\r
+\r
+               this.unmarshaller = unmarshaller;\r
+               this.marshaller = marshaller;\r
+               this.attachmentsStorage = attachmentsStorage;\r
+       }\r
+\r
+       void storeRealizedFlows(SlcExecution slcExecution) {\r
+\r
+               Attachment attachment = realizedFlowsAttachment(UUID.randomUUID()\r
+                               .toString(), slcExecution);\r
+               InputStream in = null;\r
+               try {\r
+                       ObjectList ol = new ObjectList(slcExecution.getRealizedFlows());\r
+                       StringResult result = new StringResult();\r
+                       marshaller.marshal(ol, result);\r
+                       in = new ByteArrayInputStream(result.toString().getBytes());\r
+                       attachmentsStorage.storeAttachment(attachment, in);\r
+\r
+                       slcExecution.setRealizedFlowsXml(attachment.getUuid());\r
+               } catch (Exception e) {\r
+                       log.error("Could not store realized flows as attachment #"\r
+                                       + attachment.getUuid(), e);\r
+               } finally {\r
+                       IOUtils.closeQuietly(in);\r
+               }\r
+       }\r
+\r
+       void retrieveRealizedFlows(SlcExecution slcExecution) {\r
+               Attachment attachment = realizedFlowsAttachment(slcExecution\r
+                               .getRealizedFlowsXml(), slcExecution);\r
+\r
+               ByteArrayOutputStream out = null;\r
+               ByteArrayInputStream in = null;\r
+               try {\r
+                       // TODO: optimize with piped streams\r
+                       out = new ByteArrayOutputStream();\r
+                       attachmentsStorage.retrieveAttachment(attachment, out);\r
+\r
+                       byte[] arr = out.toByteArray();\r
+                       in = new ByteArrayInputStream(arr);\r
+                       StreamSource source = new StreamSource(in);\r
+                       ObjectList ol = (ObjectList) unmarshaller.unmarshal(source);\r
+                       ol.fill(slcExecution.getRealizedFlows());\r
+               } catch (Exception e) {\r
+                       log.error("Could not retrieve realized flows from attachment #"\r
+                                       + attachment.getUuid(), e);\r
+               } finally {\r
+                       IOUtils.closeQuietly(in);\r
+                       IOUtils.closeQuietly(out);\r
+               }\r
+       }\r
+\r
+       /** Unify labeling in the package */\r
+       static Attachment realizedFlowsAttachment(String attachmentUuid,\r
+                       SlcExecution slcExecution) {\r
+               return new SimpleAttachment(attachmentUuid,\r
+                               "RealizedFlows of SlcExecution #" + slcExecution.getUuid(),\r
+                               "text/xml");\r
+       }\r
+}\r
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AbstractAvailableModules.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AbstractAvailableModules.java
new file mode 100644 (file)
index 0000000..90c8220
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc.provisioning;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.argeo.slc.NameVersion;
+import org.argeo.slc.build.ModularDistribution;
+import org.springframework.web.HttpRequestHandler;
+
+/** List of modules for a distribution. */
+public abstract class AbstractAvailableModules implements HttpRequestHandler {
+       protected abstract void print(Writer out, String baseUrl,
+                       ModularDistribution md) throws IOException;
+
+       public final void handleRequest(HttpServletRequest request,
+                       HttpServletResponse response) throws ServletException, IOException {
+               response.setContentType(getContentType());
+
+               ModularDistribution md = (ModularDistribution) request
+                               .getAttribute("modularDistribution");
+
+               String baseUrl = "http://" + request.getServerName() + ":"
+                               + request.getServerPort() + request.getContextPath()
+                               + request.getServletPath() + "/" + md.getName() + "/"
+                               + md.getVersion() + "/";
+
+               print(response.getWriter(), baseUrl, md);
+       }
+
+       public String getContentType() {
+               return "text/plain";
+       }
+
+       protected String jarUrl(String baseUrl, NameVersion nameVersion) {
+               return baseUrl + jarFileName(nameVersion);
+       }
+
+       protected String jarFileName(NameVersion nameVersion) {
+               return nameVersion.getName() + "-" + nameVersion.getVersion() + ".jar";
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AbstractProvisioningInterceptor.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AbstractProvisioningInterceptor.java
new file mode 100644 (file)
index 0000000..99f55f4
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc.provisioning;
+
+import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+
+public abstract class AbstractProvisioningInterceptor extends
+               HandlerInterceptorAdapter {
+       
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableDistributions.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableDistributions.java
new file mode 100644 (file)
index 0000000..b4aa3ed
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc.provisioning;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.argeo.slc.build.ModularDistribution;
+import org.springframework.web.HttpRequestHandler;
+
+/** List of distributions. */
+public class AvailableDistributions implements HttpRequestHandler {
+       private Set<ModularDistribution> modularDistributions;
+
+       public void handleRequest(HttpServletRequest request,
+                       HttpServletResponse response) throws ServletException, IOException {
+               response.setContentType("text/html");
+
+               String baseUrl = "http://" + request.getServerName() + ":"
+                               + request.getServerPort() + request.getContextPath()
+                               + request.getServletPath() + "/";
+
+               Writer out = response.getWriter();
+
+               out.write("<h1>Distributions</h1>");
+               for (Iterator<ModularDistribution> it = modularDistributions.iterator(); it
+                               .hasNext();) {
+                       ModularDistribution md = it.next();
+                       out.write("<h2>" + md + "</h2>");
+                       out.write("Modules: ");
+                       String moduleBase = baseUrl + md.getName() + "/" + md.getVersion()
+                                       + "/";
+
+                       String modulesListHtml = moduleBase + "modules.html";
+                       out.write(" <a href=\"" + modulesListHtml + "\">html</a>");
+
+                       String modulesListPlain = moduleBase + "modules";
+                       out.write(" <a href=\"" + modulesListPlain + "\">plain</a>");
+
+                       String modulesListOsgiBoot = moduleBase + "osgiBoot";
+                       out.write(" <a href=\"" + modulesListOsgiBoot + "\">osgiBoot</a>");
+
+                       out.write("<br/>");
+
+                       out.write("Eclipse update site: ");
+                       String updateSiteUrl = baseUrl + md.getName() + "/"
+                                       + md.getVersion() + "/site.xml";
+                       out.write("<a href=\"" + updateSiteUrl + "\">" + updateSiteUrl
+                                       + "</a>");
+               }
+       }
+
+       public void setModularDistributions(
+                       Set<ModularDistribution> modularDistributions) {
+               this.modularDistributions = modularDistributions;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesHtml.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesHtml.java
new file mode 100644 (file)
index 0000000..7fd83a0
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc.provisioning;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import org.argeo.slc.NameVersion;
+import org.argeo.slc.build.Distribution;
+import org.argeo.slc.build.ModularDistribution;
+import org.argeo.slc.core.build.ResourceDistribution;
+
+/** List of modules for a distribution. */
+public class AvailableModulesHtml extends AbstractAvailableModules {
+       @Override
+       protected void print(Writer out, String baseUrl, ModularDistribution md)
+                       throws IOException {
+               out.write("<h1>Distribution " + md + "</h1>");
+
+               for (NameVersion nameVersion : md.listModulesNameVersions()) {
+                       Distribution distribution = md.getModuleDistribution(nameVersion
+                                       .getName(), nameVersion.getVersion());
+
+                       String moduleUrl = null;
+                       if (distribution instanceof ResourceDistribution) {
+                               String url = ((ResourceDistribution) distribution)
+                                               .getResource().getURL().toString();
+                               if (url.startsWith("reference:"))
+                                       moduleUrl = url;
+                       }
+
+                       if (moduleUrl == null)
+                               moduleUrl = jarUrl(baseUrl, nameVersion);
+
+                       out.write("<a href=\"" + moduleUrl + "\">"
+                                       + jarFileName(nameVersion) + "</a><br/>");
+               }
+       }
+
+       @Override
+       public String getContentType() {
+               return "text/html";
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesOsgiBoot.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesOsgiBoot.java
new file mode 100644 (file)
index 0000000..8c0a180
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc.provisioning;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import org.argeo.slc.NameVersion;
+import org.argeo.slc.build.ModularDistribution;
+
+/** List of modules for a distribution. */
+public class AvailableModulesOsgiBoot extends AbstractAvailableModules {
+       private String separator = ",";
+
+       @Override
+       protected void print(Writer out, String baseUrl, ModularDistribution md)
+                       throws IOException {
+               for (NameVersion nameVersion : md.listModulesNameVersions()) {
+                       String fileName = nameVersion.getName() + "-"
+                                       + nameVersion.getVersion() + ".jar";
+                       String moduleUrl = baseUrl + fileName;
+                       out.write(nameVersion.getName() + separator
+                                       + nameVersion.getVersion() + separator + moduleUrl);
+                       out.write("\n");
+               }
+       }
+
+       public void setSeparator(String separator) {
+               this.separator = separator;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesPlain.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesPlain.java
new file mode 100644 (file)
index 0000000..10cb52b
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc.provisioning;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import org.argeo.slc.NameVersion;
+import org.argeo.slc.build.ModularDistribution;
+
+/** List of modules for a distribution. */
+public class AvailableModulesPlain extends AbstractAvailableModules {
+       @Override
+       protected void print(Writer out, String baseUrl, ModularDistribution md)
+                       throws IOException {
+               for (NameVersion nameVersion : md.listModulesNameVersions()) {
+                       String fileName = nameVersion.getName() + "-"
+                                       + nameVersion.getVersion() + ".jar";
+                       String moduleUrl = baseUrl + fileName;
+                       out.write(moduleUrl);
+                       out.write("\n");
+               }
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/BundleHandler.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/BundleHandler.java
new file mode 100644 (file)
index 0000000..94a48fe
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc.provisioning;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.StreamReadable;
+import org.argeo.slc.UnsupportedException;
+import org.argeo.slc.build.Distribution;
+import org.argeo.slc.build.ModularDistribution;
+import org.springframework.web.HttpRequestHandler;
+
+public class BundleHandler implements HttpRequestHandler {
+       private final static Log log = LogFactory.getLog(BundleHandler.class);
+
+       public void handleRequest(HttpServletRequest request,
+                       HttpServletResponse response) throws ServletException, IOException {
+               String path = request.getPathInfo();
+
+               if (log.isDebugEnabled())
+                       log.debug("Bundle jar Requested: " + path);
+               response.setContentType("application/java-archive");
+
+               String moduleName = request.getParameter("moduleName");
+               if (moduleName == null)
+                       moduleName = request.getAttribute("moduleName").toString();
+               String moduleVersion = request.getParameter("moduleVersion");
+               if (moduleVersion == null)
+                       moduleVersion = request.getAttribute("moduleVersion").toString();
+
+               ModularDistribution modularDistribution = (ModularDistribution) request
+                               .getAttribute("modularDistribution");
+               Distribution distribution = modularDistribution.getModuleDistribution(
+                               moduleName, moduleVersion);
+               if (distribution instanceof StreamReadable)
+                       IOUtils.copy(((StreamReadable) distribution).getInputStream(),
+                                       response.getOutputStream());
+               else
+                       throw new UnsupportedException("distribution", distribution);
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/BundleJarInterceptor.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/BundleJarInterceptor.java
new file mode 100644 (file)
index 0000000..4821c09
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc.provisioning;
+
+import java.util.StringTokenizer;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.argeo.slc.SlcException;
+import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+
+public class BundleJarInterceptor extends HandlerInterceptorAdapter {
+
+       @Override
+       public boolean preHandle(HttpServletRequest request,
+                       HttpServletResponse response, Object handler) throws Exception {
+               String path = request.getPathInfo();
+               StringTokenizer stS = new StringTokenizer(path, "/");
+               String fileName = null;
+               while (stS.hasMoreTokens()) {
+                       String token = stS.nextToken();
+                       if (!stS.hasMoreTokens()) {
+                               fileName = token;
+                       }
+               }
+
+               int ind_ = fileName.indexOf('-');
+               String moduleName;
+               if (ind_ > -1)
+                       moduleName = fileName.substring(0, ind_);
+               else
+                       throw new SlcException("Cannot determine version for " + fileName);
+
+               String versionAndExtension = fileName.substring(ind_ + 1);
+               int indExt = versionAndExtension.lastIndexOf('.');
+               String moduleVersion = versionAndExtension.substring(0, indExt);
+
+               request.setAttribute("moduleName", moduleName);
+               request.setAttribute("moduleVersion", moduleVersion);
+
+               return true;
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/EclipseUpdateSiteHandler.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/EclipseUpdateSiteHandler.java
new file mode 100644 (file)
index 0000000..870c884
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc.provisioning;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.argeo.slc.build.ModularDistribution;
+import org.springframework.web.HttpRequestHandler;
+
+/** An Eclipse update site, serving site.xml features/* and plugins/*. */
+public class EclipseUpdateSiteHandler implements HttpRequestHandler {
+       public void handleRequest(HttpServletRequest request,
+                       HttpServletResponse response) throws ServletException, IOException {
+
+               ModularDistribution modularDistribution = (ModularDistribution) request
+                               .getAttribute("modularDistribution");
+               response.getWriter().write(
+                               modularDistribution.getModulesDescriptor("eclipse").toString());
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/EclipseUpdateSiteInterceptor.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/EclipseUpdateSiteInterceptor.java
new file mode 100644 (file)
index 0000000..d529fab
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc.provisioning;
+
+import java.util.StringTokenizer;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.argeo.slc.SlcException;
+import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+
+public class EclipseUpdateSiteInterceptor extends HandlerInterceptorAdapter {
+       public final static String RELEASE = "RELEASE";
+       public final static String LATEST = "LATEST";
+
+       @Override
+       public boolean preHandle(HttpServletRequest request,
+                       HttpServletResponse response, Object handler) throws Exception {
+               String path = request.getPathInfo();
+               StringTokenizer stS = new StringTokenizer(path, "/");
+               String type = null;
+               pathTokenizer: while (stS.hasMoreTokens()) {
+                       String token = stS.nextToken();
+                       if (token.equals("plugins") || token.equals("features")) {
+                               type = token;
+                               break pathTokenizer;
+                       }
+               }
+
+               if (type == null || !stS.hasMoreTokens())
+                       throw new SlcException("Cannot determine file name from path "
+                                       + path);
+
+               String fileName = stS.nextToken();
+
+               int ind_ = fileName.indexOf('_');
+               String moduleName;
+               if (ind_ > -1)
+                       moduleName = fileName.substring(0, ind_);
+               else
+                       throw new SlcException("Cannot determine version for " + fileName);
+
+               String versionAndExtension = fileName.substring(ind_ + 1);
+               int indExt = versionAndExtension.lastIndexOf('.');
+               String moduleVersion = versionAndExtension.substring(0, indExt);
+
+               request.setAttribute("moduleName", moduleName);
+               request.setAttribute("moduleVersion", moduleVersion);
+
+               return true;
+       }
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/ListModularDistributions.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/ListModularDistributions.java
new file mode 100644 (file)
index 0000000..f0523dd
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc.provisioning;
+
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.argeo.slc.BasicNameVersion;
+import org.argeo.slc.NameVersion;
+import org.argeo.slc.build.BuildConstants;
+import org.argeo.slc.build.ModularDistribution;
+import org.argeo.slc.msg.ObjectList;
+import org.argeo.slc.msg.build.ModularDistributionDescriptor;
+import org.argeo.slc.web.mvc.AbstractServiceController;
+import org.springframework.web.servlet.ModelAndView;
+
+/** List of distributions. */
+public class ListModularDistributions extends AbstractServiceController
+               implements Comparator<ModularDistributionDescriptor> {
+       private Set<ModularDistribution> modularDistributions;
+
+       private String provisioningServletPath = "/dist";
+
+       @Override
+       protected void handleServiceRequest(HttpServletRequest request,
+                       HttpServletResponse response, ModelAndView modelAndView)
+                       throws Exception {
+
+               String baseUrl = "http://" + request.getServerName() + ":"
+                               + request.getServerPort() + request.getContextPath()
+                               + provisioningServletPath + "/";
+
+               SortedSet<ModularDistributionDescriptor> descriptors = new TreeSet<ModularDistributionDescriptor>(
+                               this);
+
+               Set<String> names = new HashSet<String>();
+               Set<String> namesRelease = new HashSet<String>();
+
+               // Scan distributions
+               for (Iterator<ModularDistribution> it = modularDistributions.iterator(); it
+                               .hasNext();) {
+                       ModularDistribution md = it.next();
+                       ModularDistributionDescriptor mdd = fromNameVersion(baseUrl, md);
+
+                       descriptors.add(mdd);
+                       names.add(mdd.getName());
+                       if (!md.getVersion().contains(BuildConstants.SNAPSHOT))
+                               namesRelease.add(mdd.getName());
+               }
+
+               // Add LATESTs and RELEASEs
+               for (String name : names)
+                       descriptors.add(fromNameVersion(baseUrl, new BasicNameVersion(name,
+                                       BuildConstants.LATEST)));
+               for (String name : namesRelease)
+                       descriptors.add(fromNameVersion(baseUrl, new BasicNameVersion(name,
+                                       BuildConstants.RELEASE)));
+
+               modelAndView.addObject(new ObjectList(descriptors));
+       }
+
+       public void setModularDistributions(
+                       Set<ModularDistribution> modularDistributions) {
+               this.modularDistributions = modularDistributions;
+       }
+
+       public void setProvisioningServletPath(String provisioningServletPath) {
+               this.provisioningServletPath = provisioningServletPath;
+       }
+
+       protected ModularDistributionDescriptor fromNameVersion(String baseUrl,
+                       NameVersion md) {
+               String moduleBase = baseUrl + md.getName() + "/" + md.getVersion()
+                               + "/";
+               ModularDistributionDescriptor mdd = new ModularDistributionDescriptor();
+               mdd.setName(md.getName());
+               mdd.setVersion(md.getVersion());
+
+               mdd.getModulesDescriptors().put("modularDistribution",
+                               moduleBase + "modularDistribution");
+               mdd.getModulesDescriptors().put("eclipse", moduleBase + "site.xml");
+               return mdd;
+
+       }
+
+       /** RELEASEs first, then LATESTs, then version */
+       public int compare(ModularDistributionDescriptor mdd1,
+                       ModularDistributionDescriptor mdd2) {
+               final int BEFORE = -1;
+               final int AFTER = 1;
+
+               String n1 = mdd1.getName();
+               String v1 = mdd1.getVersion();
+               String n2 = mdd2.getName();
+               String v2 = mdd2.getVersion();
+
+               if (v1.equals(BuildConstants.RELEASE))
+                       if (v2.equals(BuildConstants.RELEASE))
+                               return n1.compareTo(n2);
+                       else
+                               return BEFORE;
+               else if (v2.equals(BuildConstants.RELEASE))
+                       return AFTER;// we know 1 not RELEASE
+               else if (v1.equals(BuildConstants.LATEST))
+                       if (v2.equals(BuildConstants.LATEST))
+                               return n1.compareTo(n2);
+                       else
+                               return BEFORE;
+               else if (v2.equals(BuildConstants.LATEST))
+                       return AFTER;// we know 1 not LATEST or RELEASE
+               else if (n1.equals(n2))
+                       return v1.compareTo(v2);
+               else
+                       return n1.compareTo(n2);
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/ModularDistributionInterceptor.java b/legacy/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/ModularDistributionInterceptor.java
new file mode 100644 (file)
index 0000000..85d4dbd
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.web.mvc.provisioning;
+
+import java.util.Iterator;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.argeo.slc.BasicNameVersion;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.build.BuildConstants;
+import org.argeo.slc.build.ModularDistribution;
+import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+
+public class ModularDistributionInterceptor extends HandlerInterceptorAdapter {
+       private Set<ModularDistribution> modularDistributions;
+
+       @Override
+       public boolean preHandle(HttpServletRequest request,
+                       HttpServletResponse response, Object handler) throws Exception {
+               String path = request.getPathInfo();
+               StringTokenizer stS = new StringTokenizer(path, "/");
+               String distributionName = stS.nextToken();
+               String distributionVersion = stS.nextToken();
+
+               SortedMap<String, ModularDistribution> choices = new TreeMap<String, ModularDistribution>();
+               distribs: for (Iterator<ModularDistribution> it = modularDistributions
+                               .iterator(); it.hasNext();) {
+                       ModularDistribution md = it.next();
+                       if (md.getName().equals(distributionName)) {
+                               if (distributionVersion.equals(BuildConstants.RELEASE)
+                                               && md.getVersion().contains(BuildConstants.SNAPSHOT))
+                                       continue distribs;
+
+                               else if (distributionVersion.equals(BuildConstants.LATEST))
+                                       choices.put(md.getVersion(), md);
+                               else if (distributionVersion.equals(md.getVersion())) {
+                                       choices.put(md.getVersion(), md);
+                                       break distribs;
+                               }
+                       }
+               }
+
+               if (choices.size() == 0)
+                       throw new SlcException("Cannot find distribution for "
+                                       + new BasicNameVersion(distributionName,
+                                                       distributionVersion));
+
+               ModularDistribution modularDistribution = choices.get(choices
+                               .firstKey());
+
+               request.setAttribute("modularDistribution", modularDistribution);
+
+               return true;
+       }
+
+       public void setModularDistributions(
+                       Set<ModularDistribution> modularDistributions) {
+               this.modularDistributions = modularDistributions;
+       }
+
+}
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/server/jmx/spring.xml b/legacy/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/server/jmx/spring.xml
new file mode 100644 (file)
index 0000000..b969cb5
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) 2007-2012 Mathieu Baudier
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
+       default-lazy-init="true">
+
+       <!-- MBeans -->
+       <bean id="hibernateStatistics"
+               class="org.hibernate.jmx.StatisticsService" lazy-init="false">
+               <property name="sessionFactory" ref="sessionFactory" />
+       </bean>
+
+       <!-- JMX -->
+       <bean id="jmxExporter"
+               class="org.springframework.jmx.export.MBeanExporter"
+               lazy-init="false">
+               <property name="beans">
+                       <map>
+                               <entry
+                                       key="bean:name=hibernateStatistics,type=statistics,sessionFactory=sessionFactory"
+                                       value-ref="hibernateStatistics" />
+                       </map>
+               </property>
+       </bean>
+
+       <bean id="jxmServerConnector"
+               class="org.springframework.jmx.support.ConnectorServerFactoryBean"
+               lazy-init="false" depends-on="rmiRegistry">
+               <property name="objectName" value="connector:name=rmi" />
+               <property name="serviceUrl"
+                       value="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/springconnector" />
+       </bean>
+
+       <bean id="rmiRegistry"
+               class="org.springframework.remoting.rmi.RmiRegistryFactoryBean"
+               lazy-init="false">
+               <property name="port" value="1099" />
+       </bean>
+</beans>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/web/ajaxplorer/file/spring.xml b/legacy/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/web/ajaxplorer/file/spring.xml
new file mode 100644 (file)
index 0000000..6c12a5d
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xmlns:aop="http://www.springframework.org/schema/aop"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"\r
+       default-lazy-init="true">\r
+\r
+       <bean id="driver.file.template"\r
+               class="org.argeo.slc.web.ajaxplorer.file.FileDriver"\r
+               abstract="true">\r
+               <property name="actions">\r
+                       <map>\r
+                               <entry key="ls" value-ref="action.file.ls" />\r
+                               <entry key="download" value-ref="action.file.download" />\r
+                               <entry key="image_proxy"\r
+                                       value-ref="action.file.image_proxy" />\r
+                               <entry key="upload" value-ref="action.file.upload" />\r
+                               <entry key="mkdir" value-ref="action.file.mkdir" />\r
+                               <entry key="delete" value-ref="action.file.delete" />\r
+                       </map>\r
+               </property>\r
+       </bean>\r
+\r
+       <!-- ACTIONS FS -->\r
+       <bean id="action.file.ls"\r
+               class="org.argeo.slc.web.ajaxplorer.file.FileLsAction" />\r
+\r
+       <bean id="action.file.download"\r
+               class="org.argeo.slc.web.ajaxplorer.file.FileDownloadAction" />\r
+\r
+       <bean id="action.file.image_proxy"\r
+               class="org.argeo.slc.web.ajaxplorer.file.FileImageProxyAction" />\r
+\r
+       <bean id="action.file.upload"\r
+               class="org.argeo.slc.web.ajaxplorer.file.FileUploadAction" />\r
+\r
+       <bean id="action.file.mkdir"\r
+               class="org.argeo.slc.web.ajaxplorer.file.FileMkdirAction" />\r
+\r
+       <bean id="action.file.delete"\r
+               class="org.argeo.slc.web.ajaxplorer.file.FileDeleteAction" />\r
+</beans>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/web/ajaxplorer/svn/spring.xml b/legacy/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/web/ajaxplorer/svn/spring.xml
new file mode 100644 (file)
index 0000000..5ea651f
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+\r
+    Copyright (C) 2007-2012 Mathieu Baudier\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"\r
+       default-lazy-init="true">\r
+\r
+       <import resource="classpath:/org/argeo/slc/web/ajaxplorer/file/spring.xml" />\r
+\r
+       <bean id="driver.svn.template" class="org.argeo.slc.web.ajaxplorer.svn.SvnDriver"\r
+               init-method="init" abstract="true">\r
+               <property name="actions">\r
+                       <map>\r
+                               <entry key="ls" value-ref="action.svn.ls" />\r
+                               <entry key="download" value-ref="action.svn.download" />\r
+                               <entry key="image_proxy" value-ref="action.svn.image_proxy" />\r
+                               <entry key="upload" value-ref="action.svn.upload" />\r
+                               <entry key="mkdir" value-ref="action.svn.mkdir" />\r
+                               <entry key="delete" value-ref="action.svn.delete" />\r
+                               <entry key="svnlog" value-ref="action.svn.svnlog" />\r
+                               <entry key="svndownload" value-ref="action.svn.svndownload" />\r
+                       </map>\r
+               </property>\r
+       </bean>\r
+\r
+       <!-- ACTIONS SVN -->\r
+       <bean id="action.svn.ls" class="org.argeo.slc.web.ajaxplorer.svn.SvnLsAction" />\r
+\r
+       <bean id="action.svn.upload" class="org.argeo.slc.web.ajaxplorer.svn.SvnUploadAction" />\r
+\r
+       <bean id="action.svn.mkdir" class="org.argeo.slc.web.ajaxplorer.svn.SvnMkdirAction" />\r
+\r
+       <bean id="action.svn.delete" class="org.argeo.slc.web.ajaxplorer.svn.SvnDeleteAction" />\r
+\r
+       <bean id="action.svn.svnlog" class="org.argeo.slc.web.ajaxplorer.svn.SvnLogAction" />\r
+\r
+       <bean id="action.svn.download" class="org.argeo.slc.web.ajaxplorer.file.FileDownloadAction" />\r
+\r
+       <bean id="action.svn.image_proxy" class="org.argeo.slc.web.ajaxplorer.file.FileImageProxyAction" />\r
+\r
+       <bean id="action.svn.svndownload" class="org.argeo.slc.web.ajaxplorer.svn.SvnDownloadAction" />\r
+\r
+\r
+</beans>
\ No newline at end of file
diff --git a/legacy/runtime/org.argeo.slc.server/tmp/MANIFEST.MF b/legacy/runtime/org.argeo.slc.server/tmp/MANIFEST.MF
new file mode 100644 (file)
index 0000000..3ccfd19
--- /dev/null
@@ -0,0 +1,312 @@
+Manifest-Version: 1.0
+Export-Package: org.hibernate;version="3.3.1.GA";uses:="javax.naming,j
+ avax.transaction,org.hibernate.classic,org.hibernate.criterion,org.hi
+ bernate.engine,org.hibernate.exception,org.hibernate.jdbc,org.hiberna
+ te.metadata,org.hibernate.stat,org.hibernate.transform,org.hibernate.
+ type",org.hibernate.action;version="3.3.1.GA";uses:="org.hibernate,or
+ g.hibernate.cache,org.hibernate.collection,org.hibernate.engine,org.h
+ ibernate.persister.collection,org.hibernate.persister.entity",org.hib
+ ernate.bytecode;version="3.3.1.GA";uses:="org.hibernate.bytecode.util
+ ,org.hibernate.proxy",org.hibernate.bytecode.cglib;version="3.3.1.GA"
+ ;uses:="org.hibernate.bytecode,org.hibernate.bytecode.util,org.hibern
+ ate.proxy,org.hibernate.repackage.cglib.asm,org.hibernate.repackage.c
+ glib.beans,org.hibernate.repackage.cglib.proxy,org.hibernate.repackag
+ e.cglib.reflect,org.hibernate.repackage.cglib.transform.impl",org.hib
+ ernate.bytecode.javassist;version="3.3.1.GA";uses:="javassist.bytecod
+ e,javassist.util.proxy,org.hibernate.bytecode,org.hibernate.bytecode.
+ util,org.hibernate.proxy",org.hibernate.bytecode.util;version="3.3.1.
+ GA",org.hibernate.cache;version="3.3.1.GA";uses:="javax.transaction,n
+ et.sf.ehcache,net.sf.swarmcache,org.hibernate,org.hibernate.cache.acc
+ ess,org.hibernate.cfg,org.hibernate.engine,org.hibernate.transaction,
+ org.hibernate.type,org.jboss.cache,org.jboss.cache.optimistic,org.slf
+ 4j",org.hibernate.cache.access;version="3.3.1.GA";uses:="org.hibernat
+ e.cache",org.hibernate.cache.entry;version="3.3.1.GA";uses:="org.hibe
+ rnate,org.hibernate.collection,org.hibernate.engine,org.hibernate.eve
+ nt,org.hibernate.persister.collection,org.hibernate.persister.entity"
+ ,org.hibernate.cache.impl;version="3.3.1.GA";uses:="org.hibernate.cac
+ he,org.hibernate.cfg,org.hibernate.mapping",org.hibernate.cache.impl.
+ bridge;version="3.3.1.GA";uses:="org.hibernate.cache,org.hibernate.ca
+ che.access,org.hibernate.cfg",org.hibernate.cache.jbc2;version="3.3.1
+ .GA";uses:="javax.transaction,org.hibernate.cache,org.hibernate.cfg,o
+ rg.jboss.cache,org.jboss.cache.config,org.jboss.cache.notifications.a
+ nnotation",org.hibernate.cache.jbc2.access;version="3.3.1.GA";uses:="
+ org.hibernate.cache,org.hibernate.cache.access,org.hibernate.cache.jb
+ c2",org.hibernate.cache.jbc2.builder;version="3.3.1.GA";uses:="org.hi
+ bernate.cache,org.hibernate.cache.jbc2,org.hibernate.cfg,org.jboss.ca
+ che,org.jgroups",org.hibernate.cache.jbc2.collection;version="3.3.1.G
+ A";uses:="org.hibernate.cache,org.hibernate.cache.access,org.hibernat
+ e.cache.jbc2,org.hibernate.cache.jbc2.access,org.jboss.cache",org.hib
+ ernate.cache.jbc2.entity;version="3.3.1.GA";uses:="org.hibernate.cach
+ e,org.hibernate.cache.access,org.hibernate.cache.jbc2,org.hibernate.c
+ ache.jbc2.access,org.jboss.cache",org.hibernate.cache.jbc2.query;vers
+ ion="3.3.1.GA";uses:="org.hibernate.cache,org.hibernate.cache.jbc2,or
+ g.jboss.cache",org.hibernate.cache.jbc2.timestamp;version="3.3.1.GA";
+ uses:="org.hibernate.cache,org.hibernate.cache.jbc2,org.jboss.cache,o
+ rg.jboss.cache.notifications.annotation,org.jboss.cache.notifications
+ .event",org.hibernate.cache.jbc2.util;version="3.3.1.GA";uses:="org.h
+ ibernate.cache,org.jboss.cache,org.jboss.cache.config,org.jboss.cache
+ .optimistic",org.hibernate.cfg;version="3.3.1.GA";uses:="org.dom4j,or
+ g.hibernate,org.hibernate.bytecode,org.hibernate.cache,org.hibernate.
+ connection,org.hibernate.dialect,org.hibernate.dialect.function,org.h
+ ibernate.engine,org.hibernate.engine.query.sql,org.hibernate.event,or
+ g.hibernate.exception,org.hibernate.hql,org.hibernate.jdbc,org.hibern
+ ate.jdbc.util,org.hibernate.mapping,org.hibernate.proxy,org.hibernate
+ .tool.hbm2ddl,org.hibernate.transaction,org.hibernate.type,org.w3c.do
+ m,org.xml.sax",org.hibernate.classic;version="3.3.1.GA";uses:="org.hi
+ bernate,org.hibernate.type",org.hibernate.collection;version="3.3.1.G
+ A";uses:="org.dom4j,org.hibernate,org.hibernate.engine,org.hibernate.
+ loader,org.hibernate.persister.collection,org.hibernate.type",org.hib
+ ernate.connection;version="3.3.1.GA";uses:="javax.sql,org.hibernate",
+ org.hibernate.context;version="3.3.1.GA";uses:="javax.transaction,org
+ .hibernate,org.hibernate.classic,org.hibernate.engine,org.slf4j",org.
+ hibernate.criterion;version="3.3.1.GA";uses:="org.hibernate,org.hiber
+ nate.engine,org.hibernate.impl,org.hibernate.persister.collection,org
+ .hibernate.transform,org.hibernate.type",org.hibernate.dialect;versio
+ n="3.3.1.GA";uses:="org.hibernate,org.hibernate.dialect.function,org.
+ hibernate.dialect.lock,org.hibernate.engine,org.hibernate.exception,o
+ rg.hibernate.persister.entity,org.hibernate.sql,org.hibernate.type,or
+ g.slf4j",org.hibernate.dialect.function;version="3.3.1.GA";uses:="org
+ .hibernate,org.hibernate.dialect,org.hibernate.engine,org.hibernate.t
+ ype",org.hibernate.dialect.lock;version="3.3.1.GA";uses:="org.hiberna
+ te,org.hibernate.engine,org.hibernate.persister.entity",org.hibernate
+ .engine;version="3.3.1.GA";uses:="javax.transaction,org.hibernate,org
+ .hibernate.action,org.hibernate.cache,org.hibernate.cfg,org.hibernate
+ .classic,org.hibernate.collection,org.hibernate.connection,org.hibern
+ ate.dialect,org.hibernate.dialect.function,org.hibernate.engine.loadi
+ ng,org.hibernate.engine.query,org.hibernate.engine.query.sql,org.hibe
+ rnate.engine.transaction,org.hibernate.event,org.hibernate.exception,
+ org.hibernate.id,org.hibernate.impl,org.hibernate.jdbc,org.hibernate.
+ loader.custom,org.hibernate.persister.collection,org.hibernate.persis
+ ter.entity,org.hibernate.property,org.hibernate.proxy,org.hibernate.s
+ ql,org.hibernate.stat,org.hibernate.transform,org.hibernate.type,org.
+ slf4j",org.hibernate.engine.loading;version="3.3.1.GA";uses:="org.hib
+ ernate.collection,org.hibernate.engine,org.hibernate.persister.collec
+ tion",org.hibernate.engine.query;version="3.3.1.GA";uses:="org.hibern
+ ate,org.hibernate.engine,org.hibernate.engine.query.sql,org.hibernate
+ .event,org.hibernate.hql,org.hibernate.loader.custom.sql,org.hibernat
+ e.type",org.hibernate.engine.query.sql;version="3.3.1.GA";uses:="org.
+ hibernate,org.hibernate.type",org.hibernate.engine.transaction;versio
+ n="3.3.1.GA";uses:="org.hibernate,org.hibernate.engine,org.slf4j",org
+ .hibernate.event;version="3.3.1.GA";uses:="org.hibernate,org.hibernat
+ e.cfg,org.hibernate.collection,org.hibernate.engine,org.hibernate.per
+ sister.collection,org.hibernate.persister.entity,org.hibernate.util",
+ org.hibernate.event.def;version="3.3.1.GA";uses:="org.hibernate,org.h
+ ibernate.collection,org.hibernate.engine,org.hibernate.event,org.hibe
+ rnate.persister.collection,org.hibernate.persister.entity,org.hiberna
+ te.type",org.hibernate.exception;version="3.3.1.GA";uses:="org.hibern
+ ate,org.hibernate.dialect",org.hibernate.hql;version="3.3.1.GA";uses:
+ ="org.hibernate,org.hibernate.engine,org.hibernate.event,org.hibernat
+ e.transform,org.hibernate.type",org.hibernate.hql.antlr;version="3.3.
+ 1.GA";uses:="antlr,antlr.collections",org.hibernate.hql.ast;version="
+ 3.3.1.GA";uses:="antlr,antlr.collections,org.hibernate,org.hibernate.
+ engine,org.hibernate.event,org.hibernate.hql,org.hibernate.hql.antlr,
+ org.hibernate.hql.ast.tree,org.hibernate.hql.ast.util,org.hibernate.i
+ d,org.hibernate.type",org.hibernate.hql.ast.exec;version="3.3.1.GA";u
+ ses:="antlr.collections,org.hibernate,org.hibernate.engine,org.hibern
+ ate.engine.transaction,org.hibernate.hql.ast,org.hibernate.persister.
+ entity,org.slf4j",org.hibernate.hql.ast.tree;version="3.3.1.GA";uses:
+ ="antlr,antlr.collections,org.hibernate,org.hibernate.dialect.functio
+ n,org.hibernate.engine,org.hibernate.hql.antlr,org.hibernate.hql.ast,
+ org.hibernate.hql.ast.util,org.hibernate.param,org.hibernate.persiste
+ r.collection,org.hibernate.persister.entity,org.hibernate.sql,org.hib
+ ernate.type,org.slf4j",org.hibernate.hql.ast.util;version="3.3.1.GA";
+ uses:="antlr,antlr.collections,antlr.collections.impl,org.hibernate,o
+ rg.hibernate.dialect.function,org.hibernate.engine,org.hibernate.hql.
+ antlr,org.hibernate.hql.ast,org.hibernate.hql.ast.tree,org.hibernate.
+ persister.collection,org.hibernate.persister.entity,org.hibernate.sql
+ ,org.hibernate.type,org.slf4j",org.hibernate.hql.classic;version="3.3
+ .1.GA";uses:="org.hibernate,org.hibernate.dialect,org.hibernate.engin
+ e,org.hibernate.event,org.hibernate.hql,org.hibernate.loader,org.hibe
+ rnate.persister.collection,org.hibernate.persister.entity,org.hiberna
+ te.transform,org.hibernate.type",org.hibernate.id;version="3.3.1.GA";
+ uses:="org.hibernate,org.hibernate.dialect,org.hibernate.engine,org.h
+ ibernate.id.insert,org.hibernate.persister.entity,org.hibernate.sql,o
+ rg.hibernate.type,org.slf4j",org.hibernate.id.enhanced;version="3.3.1
+ .GA";uses:="org.hibernate,org.hibernate.dialect,org.hibernate.engine,
+ org.hibernate.id,org.hibernate.type,org.slf4j",org.hibernate.id.inser
+ t;version="3.3.1.GA";uses:="org.hibernate.dialect,org.hibernate.engin
+ e,org.hibernate.id,org.hibernate.sql",org.hibernate.impl;version="3.3
+ .1.GA";uses:="javax.naming,javax.naming.event,javax.naming.spi,javax.
+ transaction,org.hibernate,org.hibernate.cache,org.hibernate.cfg,org.h
+ ibernate.classic,org.hibernate.collection,org.hibernate.connection,or
+ g.hibernate.criterion,org.hibernate.dialect,org.hibernate.dialect.fun
+ ction,org.hibernate.engine,org.hibernate.engine.query,org.hibernate.e
+ ngine.query.sql,org.hibernate.event,org.hibernate.exception,org.hiber
+ nate.hql,org.hibernate.id,org.hibernate.jdbc,org.hibernate.loader,org
+ .hibernate.loader.custom,org.hibernate.metadata,org.hibernate.persist
+ er.collection,org.hibernate.persister.entity,org.hibernate.proxy,org.
+ hibernate.stat,org.hibernate.transaction,org.hibernate.transform,org.
+ hibernate.type,org.hibernate.util,org.slf4j",org.hibernate.intercept;
+ version="3.3.1.GA";uses:="org.hibernate,org.hibernate.engine",org.hib
+ ernate.intercept.cglib;version="3.3.1.GA";uses:="org.hibernate.engine
+ ,org.hibernate.intercept,org.hibernate.repackage.cglib.transform.impl
+ ",org.hibernate.intercept.javassist;version="3.3.1.GA";uses:="org.hib
+ ernate.bytecode.javassist,org.hibernate.engine,org.hibernate.intercep
+ t",org.hibernate.jdbc;version="3.3.1.GA";uses:="org.hibernate,org.hib
+ ernate.dialect,org.hibernate.engine,org.hibernate.transaction,org.slf
+ 4j",org.hibernate.jdbc.util;version="3.3.1.GA",org.hibernate.jmx;vers
+ ion="3.3.1.GA";uses:="javax.naming,org.hibernate,org.hibernate.classi
+ c,org.hibernate.engine,org.hibernate.metadata,org.hibernate.stat,org.
+ hibernate.util",org.hibernate.loader;version="3.3.1.GA";uses:="org.hi
+ bernate,org.hibernate.dialect,org.hibernate.engine,org.hibernate.hql,
+ org.hibernate.persister.collection,org.hibernate.persister.entity,org
+ .hibernate.sql,org.hibernate.transform,org.hibernate.type",org.hibern
+ ate.loader.collection;version="3.3.1.GA";uses:="org.hibernate,org.hib
+ ernate.engine,org.hibernate.loader,org.hibernate.persister.collection
+ ,org.hibernate.type",org.hibernate.loader.criteria;version="3.3.1.GA"
+ ;uses:="org.hibernate,org.hibernate.criterion,org.hibernate.dialect,o
+ rg.hibernate.engine,org.hibernate.impl,org.hibernate.loader,org.hiber
+ nate.persister.entity,org.hibernate.transform,org.hibernate.type",org
+ .hibernate.loader.custom;version="3.3.1.GA";uses:="org.hibernate,org.
+ hibernate.engine,org.hibernate.hql,org.hibernate.loader,org.hibernate
+ .persister.collection,org.hibernate.persister.entity,org.hibernate.tr
+ ansform,org.hibernate.type",org.hibernate.loader.custom.sql;version="
+ 3.3.1.GA";uses:="org.hibernate,org.hibernate.engine,org.hibernate.eng
+ ine.query,org.hibernate.engine.query.sql,org.hibernate.loader.custom,
+ org.hibernate.persister.collection,org.hibernate.persister.entity",or
+ g.hibernate.loader.entity;version="3.3.1.GA";uses:="org.hibernate,org
+ .hibernate.engine,org.hibernate.loader,org.hibernate.persister.collec
+ tion,org.hibernate.persister.entity,org.hibernate.transform,org.hiber
+ nate.type",org.hibernate.loader.hql;version="3.3.1.GA";uses:="org.hib
+ ernate,org.hibernate.dialect,org.hibernate.engine,org.hibernate.event
+ ,org.hibernate.hql.ast,org.hibernate.hql.ast.tree,org.hibernate.loade
+ r,org.hibernate.persister.collection,org.hibernate.persister.entity,o
+ rg.hibernate.transform,org.hibernate.type",org.hibernate.lob;version=
+ "3.3.1.GA",org.hibernate.mapping;version="3.3.1.GA";uses:="org.hibern
+ ate,org.hibernate.dialect,org.hibernate.dialect.function,org.hibernat
+ e.engine,org.hibernate.id,org.hibernate.property,org.hibernate.tool.h
+ bm2ddl,org.hibernate.type",org.hibernate.metadata;version="3.3.1.GA";
+ uses:="org.hibernate,org.hibernate.engine,org.hibernate.type",org.hib
+ ernate.param;version="3.3.1.GA";uses:="org.hibernate.engine,org.hiber
+ nate.type",org.hibernate.persister;version="3.3.1.GA";uses:="org.hibe
+ rnate,org.hibernate.cache.access,org.hibernate.cfg,org.hibernate.engi
+ ne,org.hibernate.mapping,org.hibernate.persister.collection,org.hiber
+ nate.persister.entity",org.hibernate.persister.collection;version="3.
+ 3.1.GA";uses:="org.hibernate,org.hibernate.cache,org.hibernate.cache.
+ access,org.hibernate.cache.entry,org.hibernate.cfg,org.hibernate.coll
+ ection,org.hibernate.dialect,org.hibernate.engine,org.hibernate.excep
+ tion,org.hibernate.id,org.hibernate.loader.collection,org.hibernate.m
+ apping,org.hibernate.metadata,org.hibernate.persister.entity,org.hibe
+ rnate.sql,org.hibernate.type",org.hibernate.persister.entity;version=
+ "3.3.1.GA";uses:="org.hibernate,org.hibernate.cache,org.hibernate.cac
+ he.access,org.hibernate.cache.entry,org.hibernate.dialect.lock,org.hi
+ bernate.engine,org.hibernate.id,org.hibernate.id.insert,org.hibernate
+ .intercept,org.hibernate.jdbc,org.hibernate.loader.entity,org.hiberna
+ te.mapping,org.hibernate.metadata,org.hibernate.sql,org.hibernate.tup
+ le.entity,org.hibernate.type",org.hibernate.pretty;version="3.3.1.GA"
+ ;uses:="org.hibernate,org.hibernate.engine,org.hibernate.persister.co
+ llection,org.hibernate.persister.entity,org.hibernate.type",org.hiber
+ nate.property;version="3.3.1.GA";uses:="org.hibernate,org.hibernate.e
+ ngine,org.hibernate.mapping,org.hibernate.type,org.slf4j",org.hiberna
+ te.proxy;version="3.3.1.GA";uses:="org.hibernate,org.hibernate.engine
+ ,org.hibernate.type",org.hibernate.proxy.dom4j;version="3.3.1.GA";use
+ s:="org.dom4j,org.hibernate,org.hibernate.engine,org.hibernate.proxy,
+ org.hibernate.type",org.hibernate.proxy.map;version="3.3.1.GA";uses:=
+ "org.hibernate,org.hibernate.engine,org.hibernate.proxy,org.hibernate
+ .type",org.hibernate.proxy.pojo;version="3.3.1.GA";uses:="org.hiberna
+ te.engine,org.hibernate.proxy,org.hibernate.type",org.hibernate.proxy
+ .pojo.cglib;version="3.3.1.GA";uses:="org.hibernate,org.hibernate.eng
+ ine,org.hibernate.proxy,org.hibernate.proxy.pojo,org.hibernate.repack
+ age.cglib.proxy,org.hibernate.type",org.hibernate.proxy.pojo.javassis
+ t;version="3.3.1.GA";uses:="javassist.util.proxy,org.hibernate,org.hi
+ bernate.engine,org.hibernate.proxy,org.hibernate.proxy.pojo,org.hiber
+ nate.type",org.hibernate.repackage.cglib.asm;version="3.3.1.GA",org.h
+ ibernate.repackage.cglib.asm.attrs;version="3.3.1.GA";uses:="org.hibe
+ rnate.repackage.cglib.asm",org.hibernate.repackage.cglib.beans;versio
+ n="3.3.1.GA";uses:="org.hibernate.repackage.cglib.asm,org.hibernate.r
+ epackage.cglib.core",org.hibernate.repackage.cglib.core;version="3.3.
+ 1.GA";uses:="org.hibernate.repackage.cglib.asm",org.hibernate.repacka
+ ge.cglib.proxy;version="3.3.1.GA";uses:="org.hibernate.repackage.cgli
+ b.asm,org.hibernate.repackage.cglib.core,org.hibernate.repackage.cgli
+ b.reflect",org.hibernate.repackage.cglib.reflect;version="3.3.1.GA";u
+ ses:="org.hibernate.repackage.cglib.asm,org.hibernate.repackage.cglib
+ .core",org.hibernate.repackage.cglib.transform;version="3.3.1.GA";use
+ s:="org.apache.tools.ant,org.apache.tools.ant.types,org.hibernate.rep
+ ackage.cglib.asm,org.hibernate.repackage.cglib.core",org.hibernate.re
+ package.cglib.transform.hook;version="3.3.1.GA";uses:="org.codehaus.a
+ spectwerkz.hook,org.hibernate.repackage.cglib.asm,org.hibernate.repac
+ kage.cglib.core,org.hibernate.repackage.cglib.transform",org.hibernat
+ e.repackage.cglib.transform.impl;version="3.3.1.GA";uses:="org.hibern
+ ate.repackage.cglib.asm,org.hibernate.repackage.cglib.core,org.hibern
+ ate.repackage.cglib.transform",org.hibernate.repackage.cglib.util;ver
+ sion="3.3.1.GA";uses:="org.hibernate.repackage.cglib.asm,org.hibernat
+ e.repackage.cglib.core",org.hibernate.secure;version="3.3.1.GA";uses:
+ ="javax.security.auth,javax.security.jacc,org.hibernate,org.hibernate
+ .cfg,org.hibernate.event",org.hibernate.sql;version="3.3.1.GA";uses:=
+ "org.hibernate,org.hibernate.dialect,org.hibernate.dialect.function,o
+ rg.hibernate.type",org.hibernate.stat;version="3.3.1.GA";uses:="org.h
+ ibernate.cache,org.hibernate.engine",org.hibernate.tool.hbm2ddl;versi
+ on="3.3.1.GA";uses:="org.apache.tools.ant,org.apache.tools.ant.taskde
+ fs,org.apache.tools.ant.types,org.hibernate,org.hibernate.cfg,org.hib
+ ernate.connection,org.hibernate.dialect",org.hibernate.tool.instrumen
+ t;version="3.3.1.GA";uses:="org.apache.tools.ant,org.apache.tools.ant
+ .types,org.hibernate.bytecode,org.hibernate.bytecode.util",org.hibern
+ ate.tool.instrument.cglib;version="3.3.1.GA";uses:="org.hibernate.byt
+ ecode,org.hibernate.bytecode.util,org.hibernate.tool.instrument",org.
+ hibernate.tool.instrument.javassist;version="3.3.1.GA";uses:="org.hib
+ ernate.bytecode,org.hibernate.bytecode.util,org.hibernate.tool.instru
+ ment",org.hibernate.transaction;version="3.3.1.GA";uses:="javax.namin
+ g,javax.transaction,javax.transaction.xa,org.hibernate,org.hibernate.
+ engine,org.hibernate.jdbc",org.hibernate.transform;version="3.3.1.GA"
+ ,org.hibernate.tuple;version="3.3.1.GA";uses:="org.dom4j,org.hibernat
+ e,org.hibernate.bytecode,org.hibernate.engine,org.hibernate.id,org.hi
+ bernate.mapping,org.hibernate.property,org.hibernate.type",org.hibern
+ ate.tuple.component;version="3.3.1.GA";uses:="org.hibernate,org.hiber
+ nate.engine,org.hibernate.mapping,org.hibernate.property,org.hibernat
+ e.tuple",org.hibernate.tuple.entity;version="3.3.1.GA";uses:="org.hib
+ ernate,org.hibernate.engine,org.hibernate.mapping,org.hibernate.prope
+ rty,org.hibernate.proxy,org.hibernate.tuple,org.hibernate.type",org.h
+ ibernate.type;version="3.3.1.GA";uses:="org.dom4j,org.hibernate,org.h
+ ibernate.collection,org.hibernate.dialect,org.hibernate.engine,org.hi
+ bernate.persister.collection,org.hibernate.persister.entity,org.hiber
+ nate.tuple,org.hibernate.tuple.component,org.hibernate.usertype",org.
+ hibernate.usertype;version="3.3.1.GA";uses:="org.hibernate,org.hibern
+ ate.collection,org.hibernate.engine,org.hibernate.persister.collectio
+ n,org.hibernate.type",org.hibernate.util;version="3.3.1.GA";uses:="ja
+ vax.naming,javax.transaction,org.dom4j,org.dom4j.io,org.hibernate,org
+ .hibernate.cfg,org.hibernate.dialect,org.hibernate.dialect.function,o
+ rg.hibernate.engine,org.hibernate.property,org.hibernate.type,org.slf
+ 4j,org.xml.sax"
+Bundle-Vendor: SpringSource
+Bundle-Version: 3.3.1.GA
+Tool: Bundlor 1.0.0.CI-B166
+Bundle-Name: JBoss Hibernate Object-Relational Mapper
+Bundle-ManifestVersion: 2
+Created-By: 1.5.0_15-b04 (Sun Microsystems Inc.)
+Bundle-SymbolicName: com.springsource.org.hibernate
+Import-Package: antlr;version="[2.7.6, 3.0.0)",antlr.collections;versi
+ on="[2.7.6, 3.0.0)",antlr.collections.impl;version="[2.7.6, 3.0.0)",c
+ om.mchange.v2.c3p0;version="[0.9.1, 0.9.2)";resolution:="optional",co
+ m.opensymphony.oscache.base;version="[2.1.0, 3.0.0)";resolution:="opt
+ ional",com.opensymphony.oscache.general;version="[2.1.0, 3.0.0)";reso
+ lution:="optional",javassist;version="[3.3.0.ga,3.4.0)",javassist.byt
+ ecode;version="[3.3.0.ga,3.4.0)",javassist.util.proxy;version="[3.3.0
+ .ga,3.4.0)",javax.naming;version="0",javax.naming.event;version="0",j
+ avax.naming.spi;version="0",javax.security.auth;version="0",javax.sec
+ urity.jacc;version="0";resolution:="optional",javax.sql;version="0",j
+ avax.transaction;version="[1.0.1, 2.0.0)";resolution:="optional",java
+ x.transaction.xa;version="[1.0.1, 2.0.0)";resolution:="optional",net.
+ sf.cglib.beans;version="[2.1.3, 2.2.0)",net.sf.cglib.core;version="[2
+ .1.3, 2.2.0)",net.sf.cglib.proxy;version="[2.1.3, 2.2.0)",net.sf.cgli
+ b.reflect;version="[2.1.3, 2.2.0)",net.sf.cglib.transform;version="[2
+ .1.3, 2.2.0)",net.sf.cglib.util;version="[2.1.3, 2.2.0)",net.sf.ehcac
+ he;version="[1.2.3, 2.0.0)";resolution:="optional",net.sf.swarmcache;
+ version="[1.0.0.RC2a, 1.1.0)";resolution:="optional",org.apache.commo
+ ns.collections.map;version="[3.2.0, 4.0.0)",org.apache.tools.ant;vers
+ ion="[1.7.0, 2.0.0)";resolution:="optional",org.apache.tools.ant.task
+ defs;version="[1.7.0, 2.0.0)";resolution:="optional",org.apache.tools
+ .ant.types;version="[1.7.0, 2.0.0)";resolution:="optional",org.codeha
+ us.aspectwerkz.hook;version="[0.8.1, 0.9.0)";resolution:="optional",o
+ rg.dom4j;version="[1.6.1, 1.7.0)",org.dom4j.io;version="[1.6.1, 1.7.0
+ )",org.jboss.cache;version="[1.2.2, 2.0.0)";resolution:="optional",or
+ g.jboss.cache.config;version="[1.2.2, 2.0.0)";resolution:="optional",
+ org.jboss.cache.lock;version="[1.2.2, 2.0.0)";resolution:="optional",
+ org.jboss.cache.notifications.annotation;version="[1.2.2, 2.0.0)";res
+ olution:="optional",org.jboss.cache.notifications.event;version="[1.2
+ .2, 2.0.0)";resolution:="optional",org.jboss.cache.optimistic;version
+ ="[1.2.2, 2.0.0)";resolution:="optional",org.jgroups;version="[2.2.7,
+  3.0.0)",org.logicalcobwebs.proxool;version="[0.8.3, 0.9.0)";resoluti
+ on:="optional",org.logicalcobwebs.proxool.configuration;version="[0.8
+ .3, 0.9.0)";resolution:="optional",org.slf4j;version="[1.5.2, 1.6.0)"
+ ,org.w3c.dom;version="0",org.xml.sax;version="0"
+Archiver-Version: Plexus Archiver
diff --git a/modules/agent/org.argeo.slc.agent.jcr/.project b/modules/agent/org.argeo.slc.agent.jcr/.project
deleted file mode 100644 (file)
index 5aa7b5c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.agent.jcr</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/agent/org.argeo.slc.agent.jcr/META-INF/spring/jcr-osgi.xml b/modules/agent/org.argeo.slc.agent.jcr/META-INF/spring/jcr-osgi.xml
deleted file mode 100644 (file)
index 62fca10..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xmlns:util="http://www.springframework.org/schema/util"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
-       http://www.springframework.org/schema/util\r
-       http://www.springframework.org/schema/util/spring-util-2.5.xsd">\r
-\r
-       <!-- REFERENCES -->\r
-       <reference id="repository" interface="javax.jcr.Repository"\r
-               filter="(argeo.jcr.repository.alias=slc)" />\r
-\r
-       <reference id="authenticationManager"\r
-               interface="org.springframework.security.AuthenticationManager" />\r
-\r
-       <reference id="modulesManager"\r
-               interface="org.argeo.slc.execution.ExecutionModulesManager" />\r
-\r
-       <!-- SERVICES -->\r
-       <!-- Deprecated -->\r
-       <service ref="resultListener"\r
-               interface="org.argeo.slc.core.test.tree.TreeTestResultListener" />\r
-       <service ref="resultListener" interface="org.argeo.slc.test.TestResultListener" />\r
-       <service ref="attachmentUploader" interface="org.argeo.slc.core.attachment.AttachmentUploader" />\r
-       \r
-       <service interface="org.argeo.slc.execution.ExecutionModulesListener"\r
-               ref="executionModulesListener" />\r
-       <service ref="agent" interface="org.argeo.slc.runtime.SlcAgentFactory">\r
-               <service-properties>\r
-                       <beans:entry>\r
-                               <beans:key>\r
-                                       <util:constant static-field="org.argeo.slc.jcr.SlcJcrConstants.PROPERTY_PATH" />\r
-                               </beans:key>\r
-                               <util:constant\r
-                                       static-field="org.argeo.slc.jcr.SlcJcrConstants.VM_AGENT_FACTORY_PATH" />\r
-                       </beans:entry>\r
-               </service-properties>\r
-       </service>\r
-       <service ref="agent" interface="org.argeo.slc.runtime.SlcAgent" />\r
-</beans:beans>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.agent.jcr/META-INF/spring/jcr.xml b/modules/agent/org.argeo.slc.agent.jcr/META-INF/spring/jcr.xml
deleted file mode 100644 (file)
index eb662a0..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <bean id="agent" class="org.argeo.slc.jcr.execution.JcrAgent"\r
-               init-method="init" destroy-method="destroy">\r
-               <property name="repository" ref="repository" />\r
-               <property name="modulesManager" ref="modulesManager" />\r
-       </bean>\r
-\r
-       <bean id="executionModulesListener" class="org.argeo.slc.jcr.execution.JcrExecutionModulesListener"\r
-               init-method="init" destroy-method="destroy">\r
-               <property name="agent" ref="agent" />\r
-               <property name="repository" ref="repository" />\r
-               <property name="modulesManager" ref="modulesManager" />\r
-       </bean>\r
-\r
-       <!-- Thread-bound session is used when multiple threads with various authentication \r
-               will call the component -->\r
-       <bean id="session" class="org.argeo.security.jcr.SecureThreadBoundSession">\r
-               <property name="repository" ref="repository" />\r
-       </bean>\r
-\r
-       <bean id="resultListener" class="org.argeo.slc.jcr.execution.JcrResultListener">\r
-               <property name="session" ref="session" />\r
-       </bean>\r
-\r
-       <bean id="attachmentUploader" class="org.argeo.slc.jcr.execution.JcrAttachmentUploader">\r
-               <property name="session" ref="session" />\r
-       </bean>\r
-\r
-\r
-       <bean\r
-               class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">\r
-               <property name="authenticationManager" ref="authenticationManager" />\r
-       </bean>\r
-</beans>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.agent.jcr/build.properties b/modules/agent/org.argeo.slc.agent.jcr/build.properties
deleted file mode 100644 (file)
index 7594fab..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-bin.includes = META-INF/,\
-               .
diff --git a/modules/agent/org.argeo.slc.agent.jcr/pom.xml b/modules/agent/org.argeo.slc.agent.jcr/pom.xml
deleted file mode 100644 (file)
index a27eec6..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc.modules</groupId>
-               <artifactId>agent</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.agent.jcr</artifactId>
-       <name>SLC Agent JCR</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-                               <configuration>
-                                       <instructions>
-                                               <Import-Package>
-                                                       *,
-                                                       org.argeo.slc.jcr
-                                               </Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-</project>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.agent/.project b/modules/agent/org.argeo.slc.agent/.project
deleted file mode 100644 (file)
index f167854..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.agent</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/agent/org.argeo.slc.agent/META-INF/spring/agent.xml b/modules/agent/org.argeo.slc.agent/META-INF/spring/agent.xml
deleted file mode 100644 (file)
index 38cc1d4..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"\r
-       xsi:schemaLocation="\r
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <!-- Manager -->\r
-       <bean id="modulesManager" class="org.argeo.slc.osgi.OsgiExecutionModulesManager"\r
-               init-method="init" destroy-method="destroy">\r
-               <property name="slcExecutionNotifiers" ref="slcExecutionListeners" />\r
-               <property name="bundlesManager" ref="bundlesManager" />\r
-       </bean>\r
-\r
-       <bean id="bundlesManager" class="org.argeo.slc.osgi.BundlesManager" />\r
-\r
-       <!-- Logging -->\r
-<!--   <bean id="log4Notification" class="org.argeo.slc.log4j.SlcExecutionAppender" -->\r
-<!--           init-method="init" destroy-method="destroy"> -->\r
-<!--           <property name="disabled" value="${slc.agent.log4Notification.disabled}" /> -->\r
-<!--           <property name="level" value="${slc.agent.log4Notification.level}" /> -->\r
-<!--           <property name="onlyExecutionThread" -->\r
-<!--                   value="${slc.agent.log4Notification.onlyExecutionThread}" /> -->\r
-<!--   </bean> -->\r
-\r
-\r
-</beans>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.agent/META-INF/spring/common.xml b/modules/agent/org.argeo.slc.agent/META-INF/spring/common.xml
deleted file mode 100644 (file)
index 2a3f36c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
-       default-lazy-init="false">
-
-       <bean
-               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
-               <property name="locations">
-                       <value>osgibundle:agent.properties</value>
-               </property>
-       </bean>
-</beans>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.agent/META-INF/spring/osgi.xml b/modules/agent/org.argeo.slc.agent/META-INF/spring/osgi.xml
deleted file mode 100644 (file)
index 873f6f2..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <beans:import resource="classpath:org/argeo/slc/osgi/manager.xml" />\r
-\r
-       <!-- REFERENCES -->\r
-       <list id="executionContexts" interface="org.argeo.slc.execution.ExecutionContext"\r
-               cardinality="0..N">\r
-               <listener ref="modulesManager" bind-method="register"\r
-                       unbind-method="unregister" />\r
-       </list>\r
-\r
-       <list id="executionFlows" interface="org.argeo.slc.execution.ExecutionFlow"\r
-               cardinality="0..N">\r
-               <listener ref="modulesManager" bind-method="register"\r
-                       unbind-method="unregister" />\r
-       </list>\r
-\r
-       <list id="executionModulesListeners" interface="org.argeo.slc.execution.ExecutionModulesListener"\r
-               cardinality="0..N">\r
-               <listener ref="modulesManager" bind-method="register"\r
-                       unbind-method="unregister" />\r
-       </list>\r
-\r
-       <list id="slcExecutionListeners" interface="org.argeo.slc.process.SlcExecutionNotifier"\r
-               cardinality="0..N" />\r
-\r
-       <!-- SERVICES -->\r
-       <service ref="modulesManager" interface="org.argeo.slc.execution.ExecutionModulesManager" />\r
-\r
-\r
-</beans:beans>
\ No newline at end of file
diff --git a/modules/agent/org.argeo.slc.agent/agent.properties b/modules/agent/org.argeo.slc.agent/agent.properties
deleted file mode 100644 (file)
index d4cea2e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-# Disable LOG4J notification to the process
-slc.agent.log4Notification.disabled=false
-# Notification level
-slc.agent.log4Notification.level=
-# Do not log sub threads (those started by the process)
-slc.agent.log4Notification.onlyExecutionThread=false
diff --git a/modules/agent/org.argeo.slc.agent/build.properties b/modules/agent/org.argeo.slc.agent/build.properties
deleted file mode 100644 (file)
index 7594fab..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-bin.includes = META-INF/,\
-               .
diff --git a/modules/agent/org.argeo.slc.agent/pom.xml b/modules/agent/org.argeo.slc.agent/pom.xml
deleted file mode 100644 (file)
index b1b0565..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc.modules</groupId>
-               <artifactId>agent</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.agent</artifactId>
-       <name>SLC Agent</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-                               <configuration>
-                                       <instructions>
-                                               <Import-Package>
-                                                       *,
-                                                       org.argeo.slc.core.test.tree
-                                               </Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-</project>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.agent.jcr/.project b/modules/org.argeo.slc.agent.jcr/.project
new file mode 100644 (file)
index 0000000..5aa7b5c
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.agent.jcr</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/modules/org.argeo.slc.agent.jcr/META-INF/spring/jcr-osgi.xml b/modules/org.argeo.slc.agent.jcr/META-INF/spring/jcr-osgi.xml
new file mode 100644 (file)
index 0000000..62fca10
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xmlns:util="http://www.springframework.org/schema/util"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
+       http://www.springframework.org/schema/util\r
+       http://www.springframework.org/schema/util/spring-util-2.5.xsd">\r
+\r
+       <!-- REFERENCES -->\r
+       <reference id="repository" interface="javax.jcr.Repository"\r
+               filter="(argeo.jcr.repository.alias=slc)" />\r
+\r
+       <reference id="authenticationManager"\r
+               interface="org.springframework.security.AuthenticationManager" />\r
+\r
+       <reference id="modulesManager"\r
+               interface="org.argeo.slc.execution.ExecutionModulesManager" />\r
+\r
+       <!-- SERVICES -->\r
+       <!-- Deprecated -->\r
+       <service ref="resultListener"\r
+               interface="org.argeo.slc.core.test.tree.TreeTestResultListener" />\r
+       <service ref="resultListener" interface="org.argeo.slc.test.TestResultListener" />\r
+       <service ref="attachmentUploader" interface="org.argeo.slc.core.attachment.AttachmentUploader" />\r
+       \r
+       <service interface="org.argeo.slc.execution.ExecutionModulesListener"\r
+               ref="executionModulesListener" />\r
+       <service ref="agent" interface="org.argeo.slc.runtime.SlcAgentFactory">\r
+               <service-properties>\r
+                       <beans:entry>\r
+                               <beans:key>\r
+                                       <util:constant static-field="org.argeo.slc.jcr.SlcJcrConstants.PROPERTY_PATH" />\r
+                               </beans:key>\r
+                               <util:constant\r
+                                       static-field="org.argeo.slc.jcr.SlcJcrConstants.VM_AGENT_FACTORY_PATH" />\r
+                       </beans:entry>\r
+               </service-properties>\r
+       </service>\r
+       <service ref="agent" interface="org.argeo.slc.runtime.SlcAgent" />\r
+</beans:beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.agent.jcr/META-INF/spring/jcr.xml b/modules/org.argeo.slc.agent.jcr/META-INF/spring/jcr.xml
new file mode 100644 (file)
index 0000000..eb662a0
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <bean id="agent" class="org.argeo.slc.jcr.execution.JcrAgent"\r
+               init-method="init" destroy-method="destroy">\r
+               <property name="repository" ref="repository" />\r
+               <property name="modulesManager" ref="modulesManager" />\r
+       </bean>\r
+\r
+       <bean id="executionModulesListener" class="org.argeo.slc.jcr.execution.JcrExecutionModulesListener"\r
+               init-method="init" destroy-method="destroy">\r
+               <property name="agent" ref="agent" />\r
+               <property name="repository" ref="repository" />\r
+               <property name="modulesManager" ref="modulesManager" />\r
+       </bean>\r
+\r
+       <!-- Thread-bound session is used when multiple threads with various authentication \r
+               will call the component -->\r
+       <bean id="session" class="org.argeo.security.jcr.SecureThreadBoundSession">\r
+               <property name="repository" ref="repository" />\r
+       </bean>\r
+\r
+       <bean id="resultListener" class="org.argeo.slc.jcr.execution.JcrResultListener">\r
+               <property name="session" ref="session" />\r
+       </bean>\r
+\r
+       <bean id="attachmentUploader" class="org.argeo.slc.jcr.execution.JcrAttachmentUploader">\r
+               <property name="session" ref="session" />\r
+       </bean>\r
+\r
+\r
+       <bean\r
+               class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">\r
+               <property name="authenticationManager" ref="authenticationManager" />\r
+       </bean>\r
+</beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.agent.jcr/build.properties b/modules/org.argeo.slc.agent.jcr/build.properties
new file mode 100644 (file)
index 0000000..7594fab
--- /dev/null
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,\
+               .
diff --git a/modules/org.argeo.slc.agent.jcr/pom.xml b/modules/org.argeo.slc.agent.jcr/pom.xml
new file mode 100644 (file)
index 0000000..a27eec6
--- /dev/null
@@ -0,0 +1,27 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc.modules</groupId>
+               <artifactId>agent</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.agent.jcr</artifactId>
+       <name>SLC Agent JCR</name>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <configuration>
+                                       <instructions>
+                                               <Import-Package>
+                                                       *,
+                                                       org.argeo.slc.jcr
+                                               </Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+</project>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.agent/.project b/modules/org.argeo.slc.agent/.project
new file mode 100644 (file)
index 0000000..f167854
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.agent</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/modules/org.argeo.slc.agent/META-INF/spring/agent.xml b/modules/org.argeo.slc.agent/META-INF/spring/agent.xml
new file mode 100644 (file)
index 0000000..38cc1d4
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"\r
+       xsi:schemaLocation="\r
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <!-- Manager -->\r
+       <bean id="modulesManager" class="org.argeo.slc.osgi.OsgiExecutionModulesManager"\r
+               init-method="init" destroy-method="destroy">\r
+               <property name="slcExecutionNotifiers" ref="slcExecutionListeners" />\r
+               <property name="bundlesManager" ref="bundlesManager" />\r
+       </bean>\r
+\r
+       <bean id="bundlesManager" class="org.argeo.slc.osgi.BundlesManager" />\r
+\r
+       <!-- Logging -->\r
+<!--   <bean id="log4Notification" class="org.argeo.slc.log4j.SlcExecutionAppender" -->\r
+<!--           init-method="init" destroy-method="destroy"> -->\r
+<!--           <property name="disabled" value="${slc.agent.log4Notification.disabled}" /> -->\r
+<!--           <property name="level" value="${slc.agent.log4Notification.level}" /> -->\r
+<!--           <property name="onlyExecutionThread" -->\r
+<!--                   value="${slc.agent.log4Notification.onlyExecutionThread}" /> -->\r
+<!--   </bean> -->\r
+\r
+\r
+</beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.agent/META-INF/spring/common.xml b/modules/org.argeo.slc.agent/META-INF/spring/common.xml
new file mode 100644 (file)
index 0000000..2a3f36c
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
+       default-lazy-init="false">
+
+       <bean
+               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+               <property name="locations">
+                       <value>osgibundle:agent.properties</value>
+               </property>
+       </bean>
+</beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.agent/META-INF/spring/osgi.xml b/modules/org.argeo.slc.agent/META-INF/spring/osgi.xml
new file mode 100644 (file)
index 0000000..873f6f2
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <beans:import resource="classpath:org/argeo/slc/osgi/manager.xml" />\r
+\r
+       <!-- REFERENCES -->\r
+       <list id="executionContexts" interface="org.argeo.slc.execution.ExecutionContext"\r
+               cardinality="0..N">\r
+               <listener ref="modulesManager" bind-method="register"\r
+                       unbind-method="unregister" />\r
+       </list>\r
+\r
+       <list id="executionFlows" interface="org.argeo.slc.execution.ExecutionFlow"\r
+               cardinality="0..N">\r
+               <listener ref="modulesManager" bind-method="register"\r
+                       unbind-method="unregister" />\r
+       </list>\r
+\r
+       <list id="executionModulesListeners" interface="org.argeo.slc.execution.ExecutionModulesListener"\r
+               cardinality="0..N">\r
+               <listener ref="modulesManager" bind-method="register"\r
+                       unbind-method="unregister" />\r
+       </list>\r
+\r
+       <list id="slcExecutionListeners" interface="org.argeo.slc.process.SlcExecutionNotifier"\r
+               cardinality="0..N" />\r
+\r
+       <!-- SERVICES -->\r
+       <service ref="modulesManager" interface="org.argeo.slc.execution.ExecutionModulesManager" />\r
+\r
+\r
+</beans:beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.agent/agent.properties b/modules/org.argeo.slc.agent/agent.properties
new file mode 100644 (file)
index 0000000..d4cea2e
--- /dev/null
@@ -0,0 +1,7 @@
+
+# Disable LOG4J notification to the process
+slc.agent.log4Notification.disabled=false
+# Notification level
+slc.agent.log4Notification.level=
+# Do not log sub threads (those started by the process)
+slc.agent.log4Notification.onlyExecutionThread=false
diff --git a/modules/org.argeo.slc.agent/build.properties b/modules/org.argeo.slc.agent/build.properties
new file mode 100644 (file)
index 0000000..7594fab
--- /dev/null
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,\
+               .
diff --git a/modules/org.argeo.slc.agent/pom.xml b/modules/org.argeo.slc.agent/pom.xml
new file mode 100644 (file)
index 0000000..b1b0565
--- /dev/null
@@ -0,0 +1,27 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc.modules</groupId>
+               <artifactId>agent</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.agent</artifactId>
+       <name>SLC Agent</name>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <configuration>
+                                       <instructions>
+                                               <Import-Package>
+                                                       *,
+                                                       org.argeo.slc.core.test.tree
+                                               </Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+</project>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.node.jackrabbit/.project b/modules/org.argeo.slc.node.jackrabbit/.project
new file mode 100644 (file)
index 0000000..b072cd9
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.node.jackrabbit</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/modules/org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit-osgi.xml b/modules/org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit-osgi.xml
new file mode 100644 (file)
index 0000000..8900311
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xmlns:util="http://www.springframework.org/schema/util"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
+       http://www.springframework.org/schema/util\r
+       http://www.springframework.org/schema/util/spring-util-2.5.xsd">\r
+\r
+       <!-- REFERENCES -->\r
+       <reference id="nodeRepository" interface="javax.jcr.Repository"\r
+               filter="(argeo.jcr.repository.alias=node)" />\r
+\r
+       <reference id="authenticationManager"\r
+               interface="org.springframework.security.AuthenticationManager" />\r
+\r
+       <!-- SERVICES -->\r
+       <service ref="jcrRepository" interface="javax.jcr.Repository">\r
+               <service-properties>\r
+                       <beans:entry key="argeo.jcr.repository.alias" value="slc" />\r
+               </service-properties>\r
+       </service>\r
+\r
+</beans:beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit.xml b/modules/org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit.xml
new file mode 100644 (file)
index 0000000..311698e
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <bean
+               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+               <property name="locations">
+                       <value>osgibundle:jackrabbit.properties</value>
+               </property>
+       </bean>
+
+       <bean id="jcrRepository" class="org.argeo.jackrabbit.JackrabbitContainer"
+               init-method="init" destroy-method="destroy">
+               <property name="cndFiles">
+                       <list>
+                               <value>/org/argeo/slc/jcr/slc.cnd</value>
+<!--                           <value>/org/argeo/slc/repo/repo.cnd</value> -->
+                       </list>
+               </property>
+               <property name="repository" ref="nodeRepository" />
+               <property name="bundleContext" ref="bundleContext" />
+       </bean>
+
+       <!-- Security -->
+       <bean class="org.argeo.jackrabbit.JackrabbitAuthorizations"
+               init-method="run">
+               <property name="principalPrivileges">
+                       <map>
+                               <entry key="jcr:all" value="ROLE_SLC" />
+                       </map>
+               </property>
+               <property name="repository" ref="jcrRepository" />
+       </bean>
+
+       <bean
+               class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">
+               <description><![CDATA[Executes initialization with a system authentication]]></description>
+               <property name="authenticationManager" ref="authenticationManager" />
+       </bean>
+
+</beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.node.jackrabbit/build.properties b/modules/org.argeo.slc.node.jackrabbit/build.properties
new file mode 100644 (file)
index 0000000..5f22cdd
--- /dev/null
@@ -0,0 +1 @@
+bin.includes = META-INF/
diff --git a/modules/org.argeo.slc.node.jackrabbit/jackrabbit.properties b/modules/org.argeo.slc.node.jackrabbit/jackrabbit.properties
new file mode 100644 (file)
index 0000000..e161f42
--- /dev/null
@@ -0,0 +1,7 @@
+argeo.node.repo.alias=node
+
+slc.jackrabbit.home=${user.home}/.slc/repo/jackrabbit
+slc.jackrabbit.configuration=osgibundle:/repository.xml
+slc.jackrabbit.dburl=jdbc:postgresql://air:5432/slc
+slc.jackrabbit.dbuser=argeo
+slc.jackrabbit.dbpassword=argeo
\ No newline at end of file
diff --git a/modules/org.argeo.slc.node.jackrabbit/pom.xml b/modules/org.argeo.slc.node.jackrabbit/pom.xml
new file mode 100644 (file)
index 0000000..4363c32
--- /dev/null
@@ -0,0 +1,27 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc.modules</groupId>
+               <artifactId>server</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.node.jackrabbit</artifactId>
+       <name>SLC Node Jackrabbit</name>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <configuration>
+                                       <instructions>
+                                               <Import-Package>
+                                                       *,
+                                                       org.argeo.slc.jcr
+                                               </Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+</project>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.server.repo.webapp/.project b/modules/org.argeo.slc.server.repo.webapp/.project
new file mode 100644 (file)
index 0000000..19a2b2f
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.server.repo.webapp</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/modules/org.argeo.slc.server.repo.webapp/WEB-INF/applicationContext.xml b/modules/org.argeo.slc.server.repo.webapp/WEB-INF/applicationContext.xml
new file mode 100644 (file)
index 0000000..a45053f
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+       <import resource="osgi.xml" />
+       <import resource="security.xml" />
+
+</beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.server.repo.webapp/WEB-INF/maven-servlet.xml b/modules/org.argeo.slc.server.repo.webapp/WEB-INF/maven-servlet.xml
new file mode 100644 (file)
index 0000000..04d5151
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
+       ">
+
+       <bean
+               class="org.springframework.web.servlet.handler.SimpleServletPostProcessor" />
+
+       <bean id="servletHandler"
+               class="org.springframework.web.servlet.handler.SimpleServletHandlerAdapter" />
+
+       <bean id="handlerMapping"
+               class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
+               <property name="mappings">
+                       <props>
+                               <prop key="*">mavenProxyServlet</prop>
+                       </props>
+               </property>
+       </bean>
+
+       <bean id="mavenProxyServlet" class="org.argeo.jcr.mvc.ResourceProxyServlet">
+               <property name="jcrSession" ref="jcrSession" />
+               <property name="proxy" ref="mavenProxy" />
+       </bean>
+
+       <bean id="jcrSession" class="org.argeo.security.jcr.SecureThreadBoundSession">
+               <property name="repository" ref="jcrRepository" />
+       </bean>
+</beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.server.repo.webapp/WEB-INF/osgi.xml b/modules/org.argeo.slc.server.repo.webapp/WEB-INF/osgi.xml
new file mode 100644 (file)
index 0000000..d0468b0
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xmlns:security="http://www.springframework.org/schema/security"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
+       http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">\r
+\r
+       <!-- REFRENCES -->\r
+       <!-- Security -->\r
+       <reference id="authenticationManager"\r
+               interface="org.springframework.security.AuthenticationManager" />\r
+\r
+       <!-- JCR -->\r
+       <reference id="jcrRepository" interface="javax.jcr.Repository"\r
+               filter="(argeo.jcr.repository.alias=java)" />\r
+\r
+       <!-- Maven -->\r
+       <reference id="mavenProxy" interface="org.argeo.slc.repo.maven.proxy.MavenProxyService" />\r
+\r
+</beans:beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.server.repo.webapp/WEB-INF/security.xml b/modules/org.argeo.slc.server.repo.webapp/WEB-INF/security.xml
new file mode 100644 (file)
index 0000000..ddb4d2e
--- /dev/null
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:sec="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
+
+       <bean id="springSecurityFilterChain" class="org.springframework.security.util.FilterChainProxy">
+               <sec:filter-chain-map path-type="ant">
+                       <sec:filter-chain pattern="/**"
+                               filters="httpSessionContextIntegrationFilter,logoutFilter,basicProcessingFilter,anonymousProcessingFilter,securityContextHolderAwareRequestFilter,exceptionTranslationFilter,filterInvocationInterceptor" />
+               </sec:filter-chain-map>
+       </bean>
+
+       <!-- The actual authorization checks (called last, but first here for ease 
+               of configuration) -->
+       <bean id="filterInvocationInterceptor" parent="filterInvocationInterceptorTemplate">
+               <property name="objectDefinitionSource">
+                       <value>
+                               CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
+                               PATTERN_TYPE_APACHE_ANT
+                               /public/**=IS_AUTHENTICATED_ANONYMOUSLY
+                               /**=ROLE_USER
+                       </value>
+                       <!-- <value> -->
+                       <!-- CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON -->
+                       <!-- PATTERN_TYPE_APACHE_ANT -->
+                       <!-- /config/**=ROLE_ADMINISTRATOR -->
+                       <!-- /**=IS_AUTHENTICATED_ANONYMOUSLY -->
+                       <!-- </value> -->
+               </property>
+       </bean>
+
+       <!-- Integrates the authentication information in the http sessions -->
+       <bean id="httpSessionContextIntegrationFilter"
+               class="org.springframework.security.context.HttpSessionContextIntegrationFilter">
+               <property name="allowSessionCreation" value="true" />
+       </bean>
+
+       <!-- Processes logouts, removing both session informations and the remember-me 
+               cookie from the browser -->
+       <bean id="logoutFilter" class="org.springframework.security.ui.logout.LogoutFilter">
+               <constructor-arg value="/web/" />
+               <!-- URL redirected to after logout -->
+               <constructor-arg>
+                       <list>
+                               <bean
+                                       class="org.springframework.security.ui.logout.SecurityContextLogoutHandler" />
+                       </list>
+               </constructor-arg>
+       </bean>
+
+       <!-- Double check, this may not be necessary -->
+       <bean id="securityContextHolderAwareRequestFilter"
+               class="org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter" />
+
+       <!-- Basic authentication -->
+       <bean id="basicProcessingFilter"
+               class="org.springframework.security.ui.basicauth.BasicProcessingFilter">
+               <property name="authenticationManager">
+                       <ref bean="authenticationManager" />
+               </property>
+               <property name="authenticationEntryPoint">
+                       <ref local="basicProcessingFilterEntryPoint" />
+               </property>
+       </bean>
+
+       <!-- Activate basic auth when needed -->
+       <bean id="basicProcessingFilterEntryPoint"
+               class="org.springframework.security.ui.basicauth.BasicProcessingFilterEntryPoint">
+               <property name="realmName">
+                       <value>Argeo Repository</value>
+               </property>
+       </bean>
+
+       <!-- If everything else failed, anonymous authentication -->
+       <bean id="anonymousProcessingFilter"
+               class="org.springframework.security.providers.anonymous.AnonymousProcessingFilter">
+               <property name="key" value="${argeo.security.systemKey}" />
+               <property name="userAttribute" value="anonymous,ROLE_ANONYMOUS" />
+       </bean>
+
+       <!-- Reacts to security related exceptions -->
+       <bean id="exceptionTranslationFilter"
+               class="org.springframework.security.ui.ExceptionTranslationFilter">
+               <property name="authenticationEntryPoint">
+                       <ref bean="basicProcessingFilterEntryPoint" />
+               </property>
+               <property name="accessDeniedHandler">
+                       <bean class="org.springframework.security.ui.AccessDeniedHandlerImpl">
+                               <property name="errorPage" value="/accessDenied.jsp" />
+                       </bean>
+               </property>
+       </bean>
+
+       <!-- Template for authorization checks -->
+       <bean id="filterInvocationInterceptorTemplate" abstract="true"
+               class="org.springframework.security.intercept.web.FilterSecurityInterceptor">
+               <property name="authenticationManager" ref="authenticationManager" />
+               <property name="accessDecisionManager">
+                       <bean class="org.springframework.security.vote.AffirmativeBased">
+                               <property name="allowIfAllAbstainDecisions" value="false" />
+                               <property name="decisionVoters">
+                                       <list>
+                                               <bean class="org.springframework.security.vote.RoleVoter" />
+                                               <bean class="org.springframework.security.vote.AuthenticatedVoter" />
+                                       </list>
+                               </property>
+                       </bean>
+               </property>
+       </bean>
+</beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.server.repo.webapp/WEB-INF/web.xml b/modules/org.argeo.slc.server.repo.webapp/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..a998cda
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+       version="2.5">
+
+       <display-name>Argeo SLC Repo Webapp</display-name>
+
+       <!-- General -->
+       <context-param>
+               <param-name>contextConfigLocation</param-name>
+               <param-value>/WEB-INF/applicationContext.xml</param-value>
+       </context-param>
+
+       <listener>
+               <display-name>Spring Context</display-name>
+               <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+       </listener>
+       <context-param>
+               <param-name>contextClass</param-name>
+               <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
+       </context-param>
+
+       <!-- Maven -->
+       <servlet>
+               <servlet-name>maven</servlet-name>
+               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+               <init-param>
+                       <param-name>contextClass</param-name>
+                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
+               </init-param>
+               <load-on-startup>1</load-on-startup>
+       </servlet>
+       <servlet-mapping>
+               <servlet-name>maven</servlet-name>
+               <url-pattern>/maven/*</url-pattern>
+       </servlet-mapping>
+
+       <!-- Security -->
+       <filter>
+               <filter-name>springSecurityFilterChain</filter-name>
+               <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+       </filter>
+
+       <filter-mapping>
+               <filter-name>springSecurityFilterChain</filter-name>
+               <url-pattern>/*</url-pattern>
+       </filter-mapping>
+
+</web-app>
diff --git a/modules/org.argeo.slc.server.repo.webapp/pom.xml b/modules/org.argeo.slc.server.repo.webapp/pom.xml
new file mode 100644 (file)
index 0000000..3f388ea
--- /dev/null
@@ -0,0 +1,52 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc.modules</groupId>
+               <artifactId>server</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.server.repo.webapp</artifactId>
+       <name>SLC Repo Web App</name>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <configuration>
+                                       <instructions>
+                                               <Web-ContextPath>org.argeo.slc.repo.webapp</Web-ContextPath>
+                                               <!-- TODO optimize -->
+                                               <Import-Package>
+                                                       *,
+                                                       javax.jcr,
+                                                       javax.servlet,
+                                                       javax.servlet.http,
+                                                       javax.servlet.resources,
+                                                       org.argeo.jcr.mvc,
+                                                       org.argeo.security.core,
+                                                       org.argeo.security.jcr,
+                                                       org.argeo.slc.aether.spring,
+                                                       org.argeo.slc.repo.maven.proxy,
+                                                       org.springframework.osgi.web.context.support,
+                                                       org.springframework.security,
+                                                       org.springframework.security.context,
+                                                       org.springframework.security.intercept.web,
+                                                       org.springframework.security.providers.anonymous,
+                                                       org.springframework.security.ui,
+                                                       org.springframework.security.ui.basicauth,
+                                                       org.springframework.security.ui.logout,
+                                                       org.springframework.security.util,
+                                                       org.springframework.security.vote,
+                                                       org.springframework.security.wrapper,
+                                                       org.springframework.web.context,
+                                                       org.springframework.web.filter,
+                                                       org.springframework.web.servlet,
+                                                       org.springframework.web.servlet.handler
+                                               </Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+</project>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.server.repo/.project b/modules/org.argeo.slc.server.repo/.project
new file mode 100644 (file)
index 0000000..8cec3fd
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.server.repo</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/modules/org.argeo.slc.server.repo/.settings/org.eclipse.pde.core.prefs b/modules/org.argeo.slc.server.repo/.settings/org.eclipse.pde.core.prefs
new file mode 100644 (file)
index 0000000..b3540fa
--- /dev/null
@@ -0,0 +1,4 @@
+#Sun Feb 06 14:17:19 CET 2011
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/modules/org.argeo.slc.server.repo/META-INF/spring/jcr.xml b/modules/org.argeo.slc.server.repo/META-INF/spring/jcr.xml
new file mode 100644 (file)
index 0000000..b59f938
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+       <bean id="jcrSession" class="org.argeo.security.jcr.SecureThreadBoundSession">\r
+               <property name="repository" ref="jcrRepository" />\r
+       </bean>\r
+\r
+       <bean id="jcrRepository" class="org.argeo.jackrabbit.JackrabbitContainer"\r
+               init-method="init" destroy-method="destroy">\r
+               <property name="homeDirectory" value="${osgi.instance.area}/repos/java" />\r
+               <property name="configuration" value="osgibundle:repository-h2.xml" />\r
+               <property name="variables" value="osgibundle:/repo.properties" />\r
+               <property name="cndFiles">\r
+                       <list>\r
+                               <value>/org/argeo/jcr/argeo.cnd</value>\r
+                               <value>/org/argeo/slc/jcr/slc.cnd</value>\r
+                               <value>/org/argeo/slc/repo/repo.cnd</value>\r
+                       </list>\r
+               </property>\r
+               <property name="bundleContext" ref="bundleContext" />\r
+               <property name="forceCndImport" value="${org.argeo.slc.repo.forceCndImport}" />\r
+       </bean>\r
+\r
+       <!-- Security -->\r
+       <bean class="org.argeo.jackrabbit.JackrabbitAuthorizations"\r
+               init-method="run">\r
+               <property name="principalPrivileges">\r
+                       <map>\r
+                               <entry key="jcr:all" value="ROLE_SLC" />\r
+                       </map>\r
+               </property>\r
+               <property name="repository" ref="jcrRepository" />\r
+       </bean>\r
+\r
+       <bean\r
+               class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">\r
+               <property name="authenticationManager" ref="authenticationManager" />\r
+       </bean>\r
+</beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.server.repo/META-INF/spring/maven.xml b/modules/org.argeo.slc.server.repo/META-INF/spring/maven.xml
new file mode 100644 (file)
index 0000000..89e98f6
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
+       ">
+
+       <!-- Proxied repositories -->
+       <util:list id="defaultMavenRepositories">
+               <ref local="argeo-snapshots" />
+               <ref local="argeo" />
+               <ref local="central" />
+               <ref local="com.springsource.repository.bundles.external" />
+               <ref local="com.springsource.repository.bundles.release" />
+       </util:list>
+
+<!--   <bean id="localrepo" p:url="http://localrepo:7080/org.argeo.slc.repo.webapp/maven" -->
+<!--           p:username="root" p:password="demo" -->
+<!--           class="org.argeo.slc.aether.spring.RemoteRepositoryFactory" /> -->
+
+       <bean id="central" p:url="http://repo1.maven.org/maven2"
+               class="org.argeo.slc.aether.spring.RemoteRepositoryFactory" />
+
+       <bean id="com.springsource.repository.bundles.release"
+               p:url="http://repository.springsource.com/maven/bundles/release"
+               class="org.argeo.slc.aether.spring.RemoteRepositoryFactory" />
+
+       <bean id="com.springsource.repository.bundles.external"
+               p:url="http://repository.springsource.com/maven/bundles/external"
+               class="org.argeo.slc.aether.spring.RemoteRepositoryFactory" />
+
+       <bean id="argeo" p:url="http://maven.argeo.org/argeo"
+               class="org.argeo.slc.aether.spring.RemoteRepositoryFactory" />
+
+       <bean id="argeo-snapshots" p:url="http://dev.argeo.org/maven/argeo-snapshots"
+               class="org.argeo.slc.aether.spring.RemoteRepositoryFactory" />
+
+</beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.server.repo/META-INF/spring/repo-osgi.xml b/modules/org.argeo.slc.server.repo/META-INF/spring/repo-osgi.xml
new file mode 100644 (file)
index 0000000..d154503
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xmlns:security="http://www.springframework.org/schema/security"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
+       http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">\r
+\r
+       <!-- REFERENCES -->\r
+       <!-- Security -->\r
+       <reference id="authenticationManager"\r
+               interface="org.springframework.security.AuthenticationManager" />\r
+<!--   <reference id="jcrRepository" interface="javax.jcr.Repository" -->\r
+<!--           filter="(argeo.jcr.repository.alias=slc)" /> -->\r
+       <service ref="jcrRepository" interface="javax.jcr.Repository">\r
+               <service-properties>\r
+                       <beans:entry key="argeo.jcr.repository.alias" value="java" />\r
+               </service-properties>\r
+       </service>\r
+\r
+       <!-- Maven -->\r
+<!--   <reference id="mavenRepositorySystem" interface="org.sonatype.aether.RepositorySystem" -->\r
+<!--           filter="(aether.repositorySystemType=maven)" /> -->\r
+<!--   <reference id="mavenRepositorySystemSession" interface="org.sonatype.aether.RepositorySystemSession" -->\r
+<!--           filter="(aether.repositorySystemType=maven)" /> -->\r
+\r
+       <!-- SERVICES -->\r
+       <service ref="mavenProxyService" interface="org.argeo.slc.repo.maven.proxy.MavenProxyService" />\r
+</beans:beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.server.repo/META-INF/spring/services.xml b/modules/org.argeo.slc.server.repo/META-INF/spring/services.xml
new file mode 100644 (file)
index 0000000..57e0cf6
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
+       ">
+
+       <bean
+               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+               <property name="locations">
+                       <value>osgibundle:repo.properties</value>
+               </property>
+       </bean>
+
+       <bean id="repo" class="org.argeo.slc.repo.RepoImpl" init-method="init"
+               destroy-method="destroy">
+               <property name="jcrRepository" ref="jcrRepository" />
+               <property name="nodeIndexers">
+                       <list>
+                               <bean class="org.argeo.slc.repo.ArtifactIndexer" />
+                               <bean class="org.argeo.slc.repo.JarFileIndexer" />
+                       </list>
+               </property>
+       </bean>
+
+       <bean id="mavenProxyService" class="org.argeo.slc.repo.maven.proxy.MavenProxyServiceImpl"
+               init-method="init" destroy-method="destroy">
+               <property name="jcrRepository" ref="jcrRepository" />
+               <property name="defaultRepositories" ref="defaultMavenRepositories" />
+       </bean>
+
+</beans>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.server.repo/build.properties b/modules/org.argeo.slc.server.repo/build.properties
new file mode 100644 (file)
index 0000000..ba1e43a
--- /dev/null
@@ -0,0 +1,3 @@
+bin.includes = META-INF/,\
+               repo.properties,\
+               repository-h2.xml
diff --git a/modules/org.argeo.slc.server.repo/pom.xml b/modules/org.argeo.slc.server.repo/pom.xml
new file mode 100644 (file)
index 0000000..85affbb
--- /dev/null
@@ -0,0 +1,30 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc.modules</groupId>
+               <artifactId>server</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.server.repo</artifactId>
+       <name>SLC Repo Services</name>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <configuration>
+                                       <instructions>
+                                               <Import-Package>
+                                                       *,
+                                                       org.argeo.jcr,
+                                                       org.argeo.slc.jcr,
+                                                       org.argeo.slc.repo,
+                                                       org.h2;resolution:=optional,
+                                               </Import-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+</project>
\ No newline at end of file
diff --git a/modules/org.argeo.slc.server.repo/repo.properties b/modules/org.argeo.slc.server.repo/repo.properties
new file mode 100644 (file)
index 0000000..e733996
--- /dev/null
@@ -0,0 +1 @@
+org.argeo.slc.repo.forceCndImport=false
\ No newline at end of file
diff --git a/modules/org.argeo.slc.server.repo/repository-h2.xml b/modules/org.argeo.slc.server.repo/repository-h2.xml
new file mode 100644 (file)
index 0000000..2f5c774
--- /dev/null
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.6//EN"
+                            "http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
+<Repository>
+       <!-- Shared datasource -->
+       <DataSources>
+               <DataSource name="dataSource">
+                       <param name="driver" value="org.h2.Driver" />
+                       <param name="url" value="jdbc:h2:${rep.home}/h2/repository" />
+                       <param name="user" value="sa" />
+                       <param name="password" value="" />
+                       <param name="databaseType" value="h2" />
+                       <param name="maxPoolSize" value="30" />
+               </DataSource>
+       </DataSources>
+
+       <!-- File system and datastore -->
+       <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
+               <param name="dataSourceName" value="dataSource" />
+               <param name="schema" value="default" />
+               <param name="schemaObjectPrefix" value="fs_" />
+       </FileSystem>
+       <DataStore class="org.apache.jackrabbit.core.data.FileDataStore" />
+       <!-- <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore"> 
+               <param name="dataSourceName" value="dataSource" /> <param name="schemaObjectPrefix" 
+               value="ds_" /> </DataStore> -->
+
+       <!-- Workspace templates -->
+       <Workspaces rootPath="${rep.home}/workspaces"
+               defaultWorkspace="main" />
+       <Workspace name="${wsp.name}">
+               <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
+                       <param name="dataSourceName" value="dataSource" />
+                       <param name="schema" value="default" />
+                       <param name="schemaObjectPrefix" value="${wsp.name}_fs_" />
+               </FileSystem>
+               <PersistenceManager
+                       class="org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager">
+                       <param name="dataSourceName" value="dataSource" />
+                       <param name="schemaObjectPrefix" value="${wsp.name}_pm_" />
+               </PersistenceManager>
+               <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+                       <param name="path" value="${wsp.home}/index" />
+               </SearchIndex>
+       </Workspace>
+
+       <!-- Versioning -->
+       <Versioning rootPath="${rep.home}/version">
+               <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
+                       <param name="dataSourceName" value="dataSource" />
+                       <param name="schema" value="default" />
+                       <param name="schemaObjectPrefix" value="fs_ver_" />
+               </FileSystem>
+               <PersistenceManager
+                       class="org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager">
+                       <param name="dataSourceName" value="dataSource" />
+                       <param name="schemaObjectPrefix" value="pm_ver_" />
+               </PersistenceManager>
+       </Versioning>
+
+       <!-- Indexing -->
+       <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+               <param name="path" value="${rep.home}/repository/index" />
+               <param name="extractorPoolSize" value="2" />
+               <param name="supportHighlighting" value="true" />
+       </SearchIndex>
+
+       <!-- Security -->
+       <Security appName="Jackrabbit">
+               <SecurityManager class="org.argeo.security.jackrabbit.ArgeoSecurityManager"
+                       workspaceName="security">
+               </SecurityManager>
+               <AccessManager class="org.argeo.security.jackrabbit.ArgeoAccessManager">
+               </AccessManager>
+               <LoginModule class="org.argeo.security.jackrabbit.ArgeoLoginModule">
+               </LoginModule>
+       </Security>
+</Repository>
\ No newline at end of file
index 3ff64d2d626a8ede5a7557a4d26e6df28c71f1e3..2fe89f2d85a9f2dfca790a432d7597b1d9acace7 100644 (file)
        <name>SLC Modules</name>
        <packaging>pom</packaging>
        <modules>
-               <module>agent</module>
-               <module>server</module>
+               <module>org.argeo.slc.agent</module>
+               <module>org.argeo.slc.agent.jcr</module>
+               <module>org.argeo.slc.node.jackrabbit</module>
+               <module>org.argeo.slc.server.repo</module>
+               <module>org.argeo.slc.server.repo.webapp</module>
        </modules>
+       <build>
+               <resources>
+                       <resource>
+                               <directory>.</directory>
+                               <includes>
+                                       <include>**</include>
+                               </includes>
+                               <excludes>
+                                       <exclude>.*</exclude>
+                                       <exclude>pom.xml</exclude>
+                                       <exclude>build.properties</exclude>
+                               </excludes>
+                       </resource>
+               </resources>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-clean-plugin</artifactId>
+                               <configuration>
+                                       <filesets>
+                                               <fileset>
+                                                       <directory>META-INF</directory>
+                                                       <includes>
+                                                               <include>MANIFEST.MF</include>
+                                                       </includes>
+                                               </fileset>
+                                       </filesets>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-jar-plugin</artifactId>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                       </plugin>
+               </plugins>
+       </build>
 </project>
diff --git a/modules/server/org.argeo.slc.node.jackrabbit/.project b/modules/server/org.argeo.slc.node.jackrabbit/.project
deleted file mode 100644 (file)
index b072cd9..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.node.jackrabbit</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit-osgi.xml b/modules/server/org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit-osgi.xml
deleted file mode 100644 (file)
index 8900311..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xmlns:util="http://www.springframework.org/schema/util"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
-       http://www.springframework.org/schema/util\r
-       http://www.springframework.org/schema/util/spring-util-2.5.xsd">\r
-\r
-       <!-- REFERENCES -->\r
-       <reference id="nodeRepository" interface="javax.jcr.Repository"\r
-               filter="(argeo.jcr.repository.alias=node)" />\r
-\r
-       <reference id="authenticationManager"\r
-               interface="org.springframework.security.AuthenticationManager" />\r
-\r
-       <!-- SERVICES -->\r
-       <service ref="jcrRepository" interface="javax.jcr.Repository">\r
-               <service-properties>\r
-                       <beans:entry key="argeo.jcr.repository.alias" value="slc" />\r
-               </service-properties>\r
-       </service>\r
-\r
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit.xml b/modules/server/org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit.xml
deleted file mode 100644 (file)
index 311698e..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-       <bean
-               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
-               <property name="locations">
-                       <value>osgibundle:jackrabbit.properties</value>
-               </property>
-       </bean>
-
-       <bean id="jcrRepository" class="org.argeo.jackrabbit.JackrabbitContainer"
-               init-method="init" destroy-method="destroy">
-               <property name="cndFiles">
-                       <list>
-                               <value>/org/argeo/slc/jcr/slc.cnd</value>
-<!--                           <value>/org/argeo/slc/repo/repo.cnd</value> -->
-                       </list>
-               </property>
-               <property name="repository" ref="nodeRepository" />
-               <property name="bundleContext" ref="bundleContext" />
-       </bean>
-
-       <!-- Security -->
-       <bean class="org.argeo.jackrabbit.JackrabbitAuthorizations"
-               init-method="run">
-               <property name="principalPrivileges">
-                       <map>
-                               <entry key="jcr:all" value="ROLE_SLC" />
-                       </map>
-               </property>
-               <property name="repository" ref="jcrRepository" />
-       </bean>
-
-       <bean
-               class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">
-               <description><![CDATA[Executes initialization with a system authentication]]></description>
-               <property name="authenticationManager" ref="authenticationManager" />
-       </bean>
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.node.jackrabbit/build.properties b/modules/server/org.argeo.slc.node.jackrabbit/build.properties
deleted file mode 100644 (file)
index 5f22cdd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = META-INF/
diff --git a/modules/server/org.argeo.slc.node.jackrabbit/jackrabbit.properties b/modules/server/org.argeo.slc.node.jackrabbit/jackrabbit.properties
deleted file mode 100644 (file)
index e161f42..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-argeo.node.repo.alias=node
-
-slc.jackrabbit.home=${user.home}/.slc/repo/jackrabbit
-slc.jackrabbit.configuration=osgibundle:/repository.xml
-slc.jackrabbit.dburl=jdbc:postgresql://air:5432/slc
-slc.jackrabbit.dbuser=argeo
-slc.jackrabbit.dbpassword=argeo
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.node.jackrabbit/pom.xml b/modules/server/org.argeo.slc.node.jackrabbit/pom.xml
deleted file mode 100644 (file)
index 4363c32..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc.modules</groupId>
-               <artifactId>server</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.node.jackrabbit</artifactId>
-       <name>SLC Node Jackrabbit</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-                               <configuration>
-                                       <instructions>
-                                               <Import-Package>
-                                                       *,
-                                                       org.argeo.slc.jcr
-                                               </Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-</project>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.repo.webapp/.project b/modules/server/org.argeo.slc.server.repo.webapp/.project
deleted file mode 100644 (file)
index 19a2b2f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.server.repo.webapp</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/applicationContext.xml b/modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/applicationContext.xml
deleted file mode 100644 (file)
index a45053f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
-
-       <import resource="osgi.xml" />
-       <import resource="security.xml" />
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/maven-servlet.xml b/modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/maven-servlet.xml
deleted file mode 100644 (file)
index 04d5151..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-       xmlns:util="http://www.springframework.org/schema/util"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
-       ">
-
-       <bean
-               class="org.springframework.web.servlet.handler.SimpleServletPostProcessor" />
-
-       <bean id="servletHandler"
-               class="org.springframework.web.servlet.handler.SimpleServletHandlerAdapter" />
-
-       <bean id="handlerMapping"
-               class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
-               <property name="mappings">
-                       <props>
-                               <prop key="*">mavenProxyServlet</prop>
-                       </props>
-               </property>
-       </bean>
-
-       <bean id="mavenProxyServlet" class="org.argeo.jcr.mvc.ResourceProxyServlet">
-               <property name="jcrSession" ref="jcrSession" />
-               <property name="proxy" ref="mavenProxy" />
-       </bean>
-
-       <bean id="jcrSession" class="org.argeo.security.jcr.SecureThreadBoundSession">
-               <property name="repository" ref="jcrRepository" />
-       </bean>
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/osgi.xml b/modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/osgi.xml
deleted file mode 100644 (file)
index d0468b0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xmlns:security="http://www.springframework.org/schema/security"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
-       http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">\r
-\r
-       <!-- REFRENCES -->\r
-       <!-- Security -->\r
-       <reference id="authenticationManager"\r
-               interface="org.springframework.security.AuthenticationManager" />\r
-\r
-       <!-- JCR -->\r
-       <reference id="jcrRepository" interface="javax.jcr.Repository"\r
-               filter="(argeo.jcr.repository.alias=java)" />\r
-\r
-       <!-- Maven -->\r
-       <reference id="mavenProxy" interface="org.argeo.slc.repo.maven.proxy.MavenProxyService" />\r
-\r
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/security.xml b/modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/security.xml
deleted file mode 100644 (file)
index ddb4d2e..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:sec="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:aop="http://www.springframework.org/schema/aop"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
-
-       <bean id="springSecurityFilterChain" class="org.springframework.security.util.FilterChainProxy">
-               <sec:filter-chain-map path-type="ant">
-                       <sec:filter-chain pattern="/**"
-                               filters="httpSessionContextIntegrationFilter,logoutFilter,basicProcessingFilter,anonymousProcessingFilter,securityContextHolderAwareRequestFilter,exceptionTranslationFilter,filterInvocationInterceptor" />
-               </sec:filter-chain-map>
-       </bean>
-
-       <!-- The actual authorization checks (called last, but first here for ease 
-               of configuration) -->
-       <bean id="filterInvocationInterceptor" parent="filterInvocationInterceptorTemplate">
-               <property name="objectDefinitionSource">
-                       <value>
-                               CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
-                               PATTERN_TYPE_APACHE_ANT
-                               /public/**=IS_AUTHENTICATED_ANONYMOUSLY
-                               /**=ROLE_USER
-                       </value>
-                       <!-- <value> -->
-                       <!-- CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON -->
-                       <!-- PATTERN_TYPE_APACHE_ANT -->
-                       <!-- /config/**=ROLE_ADMINISTRATOR -->
-                       <!-- /**=IS_AUTHENTICATED_ANONYMOUSLY -->
-                       <!-- </value> -->
-               </property>
-       </bean>
-
-       <!-- Integrates the authentication information in the http sessions -->
-       <bean id="httpSessionContextIntegrationFilter"
-               class="org.springframework.security.context.HttpSessionContextIntegrationFilter">
-               <property name="allowSessionCreation" value="true" />
-       </bean>
-
-       <!-- Processes logouts, removing both session informations and the remember-me 
-               cookie from the browser -->
-       <bean id="logoutFilter" class="org.springframework.security.ui.logout.LogoutFilter">
-               <constructor-arg value="/web/" />
-               <!-- URL redirected to after logout -->
-               <constructor-arg>
-                       <list>
-                               <bean
-                                       class="org.springframework.security.ui.logout.SecurityContextLogoutHandler" />
-                       </list>
-               </constructor-arg>
-       </bean>
-
-       <!-- Double check, this may not be necessary -->
-       <bean id="securityContextHolderAwareRequestFilter"
-               class="org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter" />
-
-       <!-- Basic authentication -->
-       <bean id="basicProcessingFilter"
-               class="org.springframework.security.ui.basicauth.BasicProcessingFilter">
-               <property name="authenticationManager">
-                       <ref bean="authenticationManager" />
-               </property>
-               <property name="authenticationEntryPoint">
-                       <ref local="basicProcessingFilterEntryPoint" />
-               </property>
-       </bean>
-
-       <!-- Activate basic auth when needed -->
-       <bean id="basicProcessingFilterEntryPoint"
-               class="org.springframework.security.ui.basicauth.BasicProcessingFilterEntryPoint">
-               <property name="realmName">
-                       <value>Argeo Repository</value>
-               </property>
-       </bean>
-
-       <!-- If everything else failed, anonymous authentication -->
-       <bean id="anonymousProcessingFilter"
-               class="org.springframework.security.providers.anonymous.AnonymousProcessingFilter">
-               <property name="key" value="${argeo.security.systemKey}" />
-               <property name="userAttribute" value="anonymous,ROLE_ANONYMOUS" />
-       </bean>
-
-       <!-- Reacts to security related exceptions -->
-       <bean id="exceptionTranslationFilter"
-               class="org.springframework.security.ui.ExceptionTranslationFilter">
-               <property name="authenticationEntryPoint">
-                       <ref bean="basicProcessingFilterEntryPoint" />
-               </property>
-               <property name="accessDeniedHandler">
-                       <bean class="org.springframework.security.ui.AccessDeniedHandlerImpl">
-                               <property name="errorPage" value="/accessDenied.jsp" />
-                       </bean>
-               </property>
-       </bean>
-
-       <!-- Template for authorization checks -->
-       <bean id="filterInvocationInterceptorTemplate" abstract="true"
-               class="org.springframework.security.intercept.web.FilterSecurityInterceptor">
-               <property name="authenticationManager" ref="authenticationManager" />
-               <property name="accessDecisionManager">
-                       <bean class="org.springframework.security.vote.AffirmativeBased">
-                               <property name="allowIfAllAbstainDecisions" value="false" />
-                               <property name="decisionVoters">
-                                       <list>
-                                               <bean class="org.springframework.security.vote.RoleVoter" />
-                                               <bean class="org.springframework.security.vote.AuthenticatedVoter" />
-                                       </list>
-                               </property>
-                       </bean>
-               </property>
-       </bean>
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/web.xml b/modules/server/org.argeo.slc.server.repo.webapp/WEB-INF/web.xml
deleted file mode 100644 (file)
index a998cda..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
-       version="2.5">
-
-       <display-name>Argeo SLC Repo Webapp</display-name>
-
-       <!-- General -->
-       <context-param>
-               <param-name>contextConfigLocation</param-name>
-               <param-value>/WEB-INF/applicationContext.xml</param-value>
-       </context-param>
-
-       <listener>
-               <display-name>Spring Context</display-name>
-               <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
-       </listener>
-       <context-param>
-               <param-name>contextClass</param-name>
-               <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
-       </context-param>
-
-       <!-- Maven -->
-       <servlet>
-               <servlet-name>maven</servlet-name>
-               <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-               <init-param>
-                       <param-name>contextClass</param-name>
-                       <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
-               </init-param>
-               <load-on-startup>1</load-on-startup>
-       </servlet>
-       <servlet-mapping>
-               <servlet-name>maven</servlet-name>
-               <url-pattern>/maven/*</url-pattern>
-       </servlet-mapping>
-
-       <!-- Security -->
-       <filter>
-               <filter-name>springSecurityFilterChain</filter-name>
-               <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
-       </filter>
-
-       <filter-mapping>
-               <filter-name>springSecurityFilterChain</filter-name>
-               <url-pattern>/*</url-pattern>
-       </filter-mapping>
-
-</web-app>
diff --git a/modules/server/org.argeo.slc.server.repo.webapp/pom.xml b/modules/server/org.argeo.slc.server.repo.webapp/pom.xml
deleted file mode 100644 (file)
index 3f388ea..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc.modules</groupId>
-               <artifactId>server</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.server.repo.webapp</artifactId>
-       <name>SLC Repo Web App</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-                               <configuration>
-                                       <instructions>
-                                               <Web-ContextPath>org.argeo.slc.repo.webapp</Web-ContextPath>
-                                               <!-- TODO optimize -->
-                                               <Import-Package>
-                                                       *,
-                                                       javax.jcr,
-                                                       javax.servlet,
-                                                       javax.servlet.http,
-                                                       javax.servlet.resources,
-                                                       org.argeo.jcr.mvc,
-                                                       org.argeo.security.core,
-                                                       org.argeo.security.jcr,
-                                                       org.argeo.slc.aether.spring,
-                                                       org.argeo.slc.repo.maven.proxy,
-                                                       org.springframework.osgi.web.context.support,
-                                                       org.springframework.security,
-                                                       org.springframework.security.context,
-                                                       org.springframework.security.intercept.web,
-                                                       org.springframework.security.providers.anonymous,
-                                                       org.springframework.security.ui,
-                                                       org.springframework.security.ui.basicauth,
-                                                       org.springframework.security.ui.logout,
-                                                       org.springframework.security.util,
-                                                       org.springframework.security.vote,
-                                                       org.springframework.security.wrapper,
-                                                       org.springframework.web.context,
-                                                       org.springframework.web.filter,
-                                                       org.springframework.web.servlet,
-                                                       org.springframework.web.servlet.handler
-                                               </Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-</project>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.repo/.project b/modules/server/org.argeo.slc.server.repo/.project
deleted file mode 100644 (file)
index 8cec3fd..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.server.repo</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/modules/server/org.argeo.slc.server.repo/.settings/org.eclipse.pde.core.prefs b/modules/server/org.argeo.slc.server.repo/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644 (file)
index b3540fa..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#Sun Feb 06 14:17:19 CET 2011
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/modules/server/org.argeo.slc.server.repo/META-INF/spring/jcr.xml b/modules/server/org.argeo.slc.server.repo/META-INF/spring/jcr.xml
deleted file mode 100644 (file)
index b59f938..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <bean id="jcrSession" class="org.argeo.security.jcr.SecureThreadBoundSession">\r
-               <property name="repository" ref="jcrRepository" />\r
-       </bean>\r
-\r
-       <bean id="jcrRepository" class="org.argeo.jackrabbit.JackrabbitContainer"\r
-               init-method="init" destroy-method="destroy">\r
-               <property name="homeDirectory" value="${osgi.instance.area}/repos/java" />\r
-               <property name="configuration" value="osgibundle:repository-h2.xml" />\r
-               <property name="variables" value="osgibundle:/repo.properties" />\r
-               <property name="cndFiles">\r
-                       <list>\r
-                               <value>/org/argeo/jcr/argeo.cnd</value>\r
-                               <value>/org/argeo/slc/jcr/slc.cnd</value>\r
-                               <value>/org/argeo/slc/repo/repo.cnd</value>\r
-                       </list>\r
-               </property>\r
-               <property name="bundleContext" ref="bundleContext" />\r
-               <property name="forceCndImport" value="${org.argeo.slc.repo.forceCndImport}" />\r
-       </bean>\r
-\r
-       <!-- Security -->\r
-       <bean class="org.argeo.jackrabbit.JackrabbitAuthorizations"\r
-               init-method="run">\r
-               <property name="principalPrivileges">\r
-                       <map>\r
-                               <entry key="jcr:all" value="ROLE_SLC" />\r
-                       </map>\r
-               </property>\r
-               <property name="repository" ref="jcrRepository" />\r
-       </bean>\r
-\r
-       <bean\r
-               class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">\r
-               <property name="authenticationManager" ref="authenticationManager" />\r
-       </bean>\r
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.repo/META-INF/spring/maven.xml b/modules/server/org.argeo.slc.server.repo/META-INF/spring/maven.xml
deleted file mode 100644 (file)
index 89e98f6..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-       xmlns:util="http://www.springframework.org/schema/util"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
-       ">
-
-       <!-- Proxied repositories -->
-       <util:list id="defaultMavenRepositories">
-               <ref local="argeo-snapshots" />
-               <ref local="argeo" />
-               <ref local="central" />
-               <ref local="com.springsource.repository.bundles.external" />
-               <ref local="com.springsource.repository.bundles.release" />
-       </util:list>
-
-<!--   <bean id="localrepo" p:url="http://localrepo:7080/org.argeo.slc.repo.webapp/maven" -->
-<!--           p:username="root" p:password="demo" -->
-<!--           class="org.argeo.slc.aether.spring.RemoteRepositoryFactory" /> -->
-
-       <bean id="central" p:url="http://repo1.maven.org/maven2"
-               class="org.argeo.slc.aether.spring.RemoteRepositoryFactory" />
-
-       <bean id="com.springsource.repository.bundles.release"
-               p:url="http://repository.springsource.com/maven/bundles/release"
-               class="org.argeo.slc.aether.spring.RemoteRepositoryFactory" />
-
-       <bean id="com.springsource.repository.bundles.external"
-               p:url="http://repository.springsource.com/maven/bundles/external"
-               class="org.argeo.slc.aether.spring.RemoteRepositoryFactory" />
-
-       <bean id="argeo" p:url="http://maven.argeo.org/argeo"
-               class="org.argeo.slc.aether.spring.RemoteRepositoryFactory" />
-
-       <bean id="argeo-snapshots" p:url="http://dev.argeo.org/maven/argeo-snapshots"
-               class="org.argeo.slc.aether.spring.RemoteRepositoryFactory" />
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.repo/META-INF/spring/repo-osgi.xml b/modules/server/org.argeo.slc.server.repo/META-INF/spring/repo-osgi.xml
deleted file mode 100644 (file)
index d154503..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xmlns:security="http://www.springframework.org/schema/security"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
-       http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">\r
-\r
-       <!-- REFERENCES -->\r
-       <!-- Security -->\r
-       <reference id="authenticationManager"\r
-               interface="org.springframework.security.AuthenticationManager" />\r
-<!--   <reference id="jcrRepository" interface="javax.jcr.Repository" -->\r
-<!--           filter="(argeo.jcr.repository.alias=slc)" /> -->\r
-       <service ref="jcrRepository" interface="javax.jcr.Repository">\r
-               <service-properties>\r
-                       <beans:entry key="argeo.jcr.repository.alias" value="java" />\r
-               </service-properties>\r
-       </service>\r
-\r
-       <!-- Maven -->\r
-<!--   <reference id="mavenRepositorySystem" interface="org.sonatype.aether.RepositorySystem" -->\r
-<!--           filter="(aether.repositorySystemType=maven)" /> -->\r
-<!--   <reference id="mavenRepositorySystemSession" interface="org.sonatype.aether.RepositorySystemSession" -->\r
-<!--           filter="(aether.repositorySystemType=maven)" /> -->\r
-\r
-       <!-- SERVICES -->\r
-       <service ref="mavenProxyService" interface="org.argeo.slc.repo.maven.proxy.MavenProxyService" />\r
-</beans:beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.repo/META-INF/spring/services.xml b/modules/server/org.argeo.slc.server.repo/META-INF/spring/services.xml
deleted file mode 100644 (file)
index 57e0cf6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-       xmlns:util="http://www.springframework.org/schema/util"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
-       ">
-
-       <bean
-               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
-               <property name="locations">
-                       <value>osgibundle:repo.properties</value>
-               </property>
-       </bean>
-
-       <bean id="repo" class="org.argeo.slc.repo.RepoImpl" init-method="init"
-               destroy-method="destroy">
-               <property name="jcrRepository" ref="jcrRepository" />
-               <property name="nodeIndexers">
-                       <list>
-                               <bean class="org.argeo.slc.repo.ArtifactIndexer" />
-                               <bean class="org.argeo.slc.repo.JarFileIndexer" />
-                       </list>
-               </property>
-       </bean>
-
-       <bean id="mavenProxyService" class="org.argeo.slc.repo.maven.proxy.MavenProxyServiceImpl"
-               init-method="init" destroy-method="destroy">
-               <property name="jcrRepository" ref="jcrRepository" />
-               <property name="defaultRepositories" ref="defaultMavenRepositories" />
-       </bean>
-
-</beans>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.repo/build.properties b/modules/server/org.argeo.slc.server.repo/build.properties
deleted file mode 100644 (file)
index ba1e43a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-bin.includes = META-INF/,\
-               repo.properties,\
-               repository-h2.xml
diff --git a/modules/server/org.argeo.slc.server.repo/pom.xml b/modules/server/org.argeo.slc.server.repo/pom.xml
deleted file mode 100644 (file)
index 85affbb..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc.modules</groupId>
-               <artifactId>server</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.slc.server.repo</artifactId>
-       <name>SLC Repo Services</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-                               <configuration>
-                                       <instructions>
-                                               <Import-Package>
-                                                       *,
-                                                       org.argeo.jcr,
-                                                       org.argeo.slc.jcr,
-                                                       org.argeo.slc.repo,
-                                                       org.h2;resolution:=optional,
-                                               </Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-</project>
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.repo/repo.properties b/modules/server/org.argeo.slc.server.repo/repo.properties
deleted file mode 100644 (file)
index e733996..0000000
+++ /dev/null
@@ -1 +0,0 @@
-org.argeo.slc.repo.forceCndImport=false
\ No newline at end of file
diff --git a/modules/server/org.argeo.slc.server.repo/repository-h2.xml b/modules/server/org.argeo.slc.server.repo/repository-h2.xml
deleted file mode 100644 (file)
index 2f5c774..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.6//EN"
-                            "http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
-<Repository>
-       <!-- Shared datasource -->
-       <DataSources>
-               <DataSource name="dataSource">
-                       <param name="driver" value="org.h2.Driver" />
-                       <param name="url" value="jdbc:h2:${rep.home}/h2/repository" />
-                       <param name="user" value="sa" />
-                       <param name="password" value="" />
-                       <param name="databaseType" value="h2" />
-                       <param name="maxPoolSize" value="30" />
-               </DataSource>
-       </DataSources>
-
-       <!-- File system and datastore -->
-       <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
-               <param name="dataSourceName" value="dataSource" />
-               <param name="schema" value="default" />
-               <param name="schemaObjectPrefix" value="fs_" />
-       </FileSystem>
-       <DataStore class="org.apache.jackrabbit.core.data.FileDataStore" />
-       <!-- <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore"> 
-               <param name="dataSourceName" value="dataSource" /> <param name="schemaObjectPrefix" 
-               value="ds_" /> </DataStore> -->
-
-       <!-- Workspace templates -->
-       <Workspaces rootPath="${rep.home}/workspaces"
-               defaultWorkspace="main" />
-       <Workspace name="${wsp.name}">
-               <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
-                       <param name="dataSourceName" value="dataSource" />
-                       <param name="schema" value="default" />
-                       <param name="schemaObjectPrefix" value="${wsp.name}_fs_" />
-               </FileSystem>
-               <PersistenceManager
-                       class="org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager">
-                       <param name="dataSourceName" value="dataSource" />
-                       <param name="schemaObjectPrefix" value="${wsp.name}_pm_" />
-               </PersistenceManager>
-               <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
-                       <param name="path" value="${wsp.home}/index" />
-               </SearchIndex>
-       </Workspace>
-
-       <!-- Versioning -->
-       <Versioning rootPath="${rep.home}/version">
-               <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
-                       <param name="dataSourceName" value="dataSource" />
-                       <param name="schema" value="default" />
-                       <param name="schemaObjectPrefix" value="fs_ver_" />
-               </FileSystem>
-               <PersistenceManager
-                       class="org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager">
-                       <param name="dataSourceName" value="dataSource" />
-                       <param name="schemaObjectPrefix" value="pm_ver_" />
-               </PersistenceManager>
-       </Versioning>
-
-       <!-- Indexing -->
-       <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
-               <param name="path" value="${rep.home}/repository/index" />
-               <param name="extractorPoolSize" value="2" />
-               <param name="supportHighlighting" value="true" />
-       </SearchIndex>
-
-       <!-- Security -->
-       <Security appName="Jackrabbit">
-               <SecurityManager class="org.argeo.security.jackrabbit.ArgeoSecurityManager"
-                       workspaceName="security">
-               </SecurityManager>
-               <AccessManager class="org.argeo.security.jackrabbit.ArgeoAccessManager">
-               </AccessManager>
-               <LoginModule class="org.argeo.security.jackrabbit.ArgeoLoginModule">
-               </LoginModule>
-       </Security>
-</Repository>
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.rap/.classpath b/plugins/org.argeo.slc.client.rap/.classpath
new file mode 100644 (file)
index 0000000..e2c2fae
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/plugins/org.argeo.slc.client.rap/.project b/plugins/org.argeo.slc.client.rap/.project
new file mode 100644 (file)
index 0000000..9b82af4
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+       <name>org.argeo.slc.client.rap</name>\r
+       <comment></comment>\r
+       <projects>\r
+       </projects>\r
+       <buildSpec>\r
+               <buildCommand>\r
+                       <name>org.eclipse.jdt.core.javabuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.pde.ManifestBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.pde.SchemaBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+       </buildSpec>\r
+       <natures>\r
+               <nature>org.eclipse.pde.PluginNature</nature>\r
+               <nature>org.eclipse.jdt.core.javanature</nature>\r
+       </natures>\r
+</projectDescription>\r
diff --git a/plugins/org.argeo.slc.client.rap/.settings/org.eclipse.jdt.core.prefs b/plugins/org.argeo.slc.client.rap/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..8b45224
--- /dev/null
@@ -0,0 +1,8 @@
+#Thu Apr 14 17:49:18 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.argeo.slc.client.rap/META-INF/MANIFEST.MF b/plugins/org.argeo.slc.client.rap/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..9a92688
--- /dev/null
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Rap Client for SLC
+Bundle-SymbolicName: org.argeo.slc.client.rap;singleton:=true
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-Vendor: Argeo SASU
+Require-Bundle: org.eclipse.rap.ui;resolution:=optional
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Import-Package: javax.servlet;version="2.4.0",
+ javax.servlet.http;version="2.4.0",
+ org.argeo.security.ui.rap
+Export-Package: org.argeo.slc.client.rap
diff --git a/plugins/org.argeo.slc.client.rap/build.properties b/plugins/org.argeo.slc.client.rap/build.properties
new file mode 100644 (file)
index 0000000..5dd830c
--- /dev/null
@@ -0,0 +1,5 @@
+source.. = src/main/java/\r
+output.. = target/classes/\r
+bin.includes = plugin.xml,\\r
+               META-INF/,\\r
+               .\r
diff --git a/plugins/org.argeo.slc.client.rap/icons/slc_execution_perspective.gif b/plugins/org.argeo.slc.client.rap/icons/slc_execution_perspective.gif
new file mode 100644 (file)
index 0000000..b8ca14a
Binary files /dev/null and b/plugins/org.argeo.slc.client.rap/icons/slc_execution_perspective.gif differ
diff --git a/plugins/org.argeo.slc.client.rap/plugin.xml b/plugins/org.argeo.slc.client.rap/plugin.xml
new file mode 100644 (file)
index 0000000..e51a328
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<?eclipse version="3.4"?>\r
+<plugin>\r
+\r
+   <extension\r
+         point="org.eclipse.rap.ui.entrypoint">\r
+      <entrypoint\r
+            class="org.argeo.slc.client.rap.SlcSecureRap"\r
+            parameter="slc"\r
+            id="org.argeo.slc.client.rap.slcSecureRap">\r
+      </entrypoint>\r
+   </extension>\r
+     \r
+</plugin>\r
diff --git a/plugins/org.argeo.slc.client.rap/pom.xml b/plugins/org.argeo.slc.client.rap/pom.xml
new file mode 100644 (file)
index 0000000..dcc7bde
--- /dev/null
@@ -0,0 +1,49 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>plugins</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.client.rap</artifactId>
+       <name>SLC Client RAP</name>
+       <packaging>jar</packaging>
+       <dependencies>
+
+               <!-- SLC -->
+               <dependency>
+                       <groupId>org.argeo.slc</groupId>
+                       <artifactId>org.argeo.slc.client.ui</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+
+               <!-- Argeo common distribution for RAP projects -->
+               <dependency>
+                       <groupId>org.argeo.commons.base</groupId>
+                       <artifactId>org.argeo.eclipse.dep.rap</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.mortbay.jetty</groupId>
+                                       <artifactId>org.mortbay.jetty.server</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.mortbay.jetty</groupId>
+                                       <artifactId>org.mortbay.jetty.server.util</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.eclipse.equinox</groupId>
+                                       <artifactId>org.eclipse.equinox.http.jetty</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+
+               <!-- Argeo common distribution for Secured UI -->
+               <dependency>
+                       <groupId>org.argeo.commons.security</groupId>
+                       <artifactId>org.argeo.security.ui.rap</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+       </dependencies>
+</project>
diff --git a/plugins/org.argeo.slc.client.rap/src/main/java/org/argeo/slc/client/rap/SlcSecureRap.java b/plugins/org.argeo.slc.client.rap/src/main/java/org/argeo/slc/client/rap/SlcSecureRap.java
new file mode 100644 (file)
index 0000000..438e5de
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.rap;
+
+import org.argeo.security.ui.rap.SecureEntryPoint;
+
+/**
+ * This class controls all aspects of the application's execution and is
+ * contributed through the plugin.xml.
+ */
+public class SlcSecureRap extends SecureEntryPoint {
+}
diff --git a/plugins/org.argeo.slc.client.rcp/.classpath b/plugins/org.argeo.slc.client.rcp/.classpath
new file mode 100644 (file)
index 0000000..8487250
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/plugins/org.argeo.slc.client.rcp/.project b/plugins/org.argeo.slc.client.rcp/.project
new file mode 100644 (file)
index 0000000..75fcdba
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.client.rcp</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/plugins/org.argeo.slc.client.rcp/.settings/org.eclipse.jdt.core.prefs b/plugins/org.argeo.slc.client.rcp/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..5eb7b03
--- /dev/null
@@ -0,0 +1,8 @@
+#Wed Aug 04 16:32:22 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.argeo.slc.client.rcp/META-INF/MANIFEST.MF b/plugins/org.argeo.slc.client.rcp/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..201bff6
--- /dev/null
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: SLC RCP
+Bundle-SymbolicName: org.argeo.slc.client.rcp;singleton:=true
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-Activator: org.argeo.slc.client.rcp.ClientRcpPlugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.argeo.security.ui.rcp,
+ org.argeo.slc.core.test.tree,
+ org.argeo.slc.execution,
+ org.argeo.slc.process,
+ org.argeo.slc.runtime,
+ org.argeo.slc.services,
+ org.argeo.slc.services.impl
+Export-Package: org.argeo.slc.client.rcp
diff --git a/plugins/org.argeo.slc.client.rcp/build.properties b/plugins/org.argeo.slc.client.rcp/build.properties
new file mode 100644 (file)
index 0000000..a971175
--- /dev/null
@@ -0,0 +1,8 @@
+source.. = src/main/java
+output.. = target/classes
+bin.includes = plugin.xml,\
+               META-INF/,\
+               .,\
+               icons/,\
+               splash.bmp,\
+               plugin_customization.ini
diff --git a/plugins/org.argeo.slc.client.rcp/icons/argeo-icon-256.png b/plugins/org.argeo.slc.client.rcp/icons/argeo-icon-256.png
new file mode 100644 (file)
index 0000000..a9af088
Binary files /dev/null and b/plugins/org.argeo.slc.client.rcp/icons/argeo-icon-256.png differ
diff --git a/plugins/org.argeo.slc.client.rcp/icons/argeo-trayIcon-256.png b/plugins/org.argeo.slc.client.rcp/icons/argeo-trayIcon-256.png
new file mode 100644 (file)
index 0000000..da20cf4
Binary files /dev/null and b/plugins/org.argeo.slc.client.rcp/icons/argeo-trayIcon-256.png differ
diff --git a/plugins/org.argeo.slc.client.rcp/plugin.xml b/plugins/org.argeo.slc.client.rcp/plugin.xml
new file mode 100644 (file)
index 0000000..3cc0f92
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         id="org.argeo.slc.client.rcp.product"
+         point="org.eclipse.core.runtime.products">
+      <product
+            application="org.argeo.slc.client.rcp.application"
+            name="SLC">
+         <property
+               name="windowImages"
+               value="icons/argeo-icon-256.png">
+         </property>
+         <property
+               name="appName"
+               value="SLC">
+         </property>
+         <property
+               name="preferenceCustomization"
+               value="plugin_customization.ini">
+         </property>
+      </product>
+   </extension>
+   <extension
+         id="org.argeo.slc.client.rcp.application"
+         point="org.eclipse.core.runtime.applications">
+      <application>
+         <run
+               class="org.argeo.slc.client.rcp.SlcSecureClientApplication">
+         </run>
+      </application>
+   </extension>
+   
+    <!-- RCP Specific, does not work with RAP --> 
+   <extension
+        point="org.eclipse.ui.bindings">
+     <key
+           commandId="org.argeo.slc.client.ui.refreshExecutionModulesView"
+           schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+           sequence="CTRL+R">
+     </key>
+  </extension>
+</plugin>
diff --git a/plugins/org.argeo.slc.client.rcp/plugin_customization.ini b/plugins/org.argeo.slc.client.rcp/plugin_customization.ini
new file mode 100644 (file)
index 0000000..ed3f69f
--- /dev/null
@@ -0,0 +1,5 @@
+org.eclipse.ui/DOCK_PERSPECTIVE_BAR=topRight
+org.eclipse.ui/SHOW_TEXT_ON_PERSPECTIVE_BAR=false
+org.eclipse.ui/PERSPECTIVE_BAR_SIZE=100
+org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=true
+org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false
diff --git a/plugins/org.argeo.slc.client.rcp/pom.xml b/plugins/org.argeo.slc.client.rcp/pom.xml
new file mode 100644 (file)
index 0000000..62e8609
--- /dev/null
@@ -0,0 +1,60 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>plugins</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.client.rcp</artifactId>
+       <name>SLC Client RCP</name>
+       <packaging>jar</packaging>
+       <dependencies>
+               <!-- SLC -->
+               <dependency>
+                       <groupId>org.argeo.slc</groupId>
+                       <artifactId>org.argeo.slc.client.ui</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+
+               <!-- Bundles to start -->
+               <dependency>
+                       <groupId>org.argeo.slc.modules</groupId>
+                       <artifactId>org.argeo.slc.node.jackrabbit</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.slc.modules</groupId>
+                       <artifactId>org.argeo.slc.agent</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.argeo.commons.security</groupId>
+                       <artifactId>org.argeo.security.dao.jackrabbit</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.node.repo.jackrabbit</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.node.repofactory.jackrabbit</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+
+               <!-- Security UI -->
+               <dependency>
+                       <groupId>org.argeo.commons.base</groupId>
+                       <artifactId>org.argeo.eclipse.dep.rcp</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.security</groupId>
+                       <artifactId>org.argeo.security.ui.rcp</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+       </dependencies>
+</project>
diff --git a/plugins/org.argeo.slc.client.rcp/splash.bmp b/plugins/org.argeo.slc.client.rcp/splash.bmp
new file mode 100644 (file)
index 0000000..ee502f3
Binary files /dev/null and b/plugins/org.argeo.slc.client.rcp/splash.bmp differ
diff --git a/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/ClientRcpPlugin.java b/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/ClientRcpPlugin.java
new file mode 100644 (file)
index 0000000..dbefba5
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.rcp;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class ClientRcpPlugin extends AbstractUIPlugin {
+       public static final String PLUGIN_ID = "org.argeo.slc.client.rcp";
+       private static ClientRcpPlugin plugin;
+
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+               plugin = this;
+       }
+
+       public void stop(BundleContext context) throws Exception {
+               plugin = null;
+               super.stop(context);
+       }
+
+       public static ClientRcpPlugin getDefault() {
+               return plugin;
+       }
+
+       @Override
+       protected void initializeImageRegistry(ImageRegistry reg) {
+               // TODO make it configurable
+               reg.put("argeoTrayIcon",
+                               getImageDescriptor("icons/argeo-trayIcon-256.png"));
+       }
+
+       public static ImageDescriptor getImageDescriptor(String path) {
+               return imageDescriptorFromPlugin(PLUGIN_ID, path);
+       }
+}
diff --git a/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureClientApplication.java b/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureClientApplication.java
new file mode 100644 (file)
index 0000000..1556dad
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.rcp;
+
+import org.argeo.security.ui.rcp.SecureRcp;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.window.Window.IExceptionHandler;
+import org.eclipse.ui.application.WorkbenchAdvisor;
+
+/**
+ * This class controls all aspects of the application's execution
+ */
+public class SlcSecureClientApplication extends SecureRcp {
+
+       @Override
+       protected WorkbenchAdvisor createWorkbenchAdvisor(String username) {
+               Window.setExceptionHandler(new IExceptionHandler() {
+
+                       public void handleException(Throwable t) {
+                               System.err.println("Unexpected SLC UI exception: " + t);
+
+                       }
+               });
+
+               return new SlcSecureWorkbenchAdvisor(username);
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java b/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java
new file mode 100644 (file)
index 0000000..1d2372f
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.rcp;
+
+import org.eclipse.ui.application.IWorkbenchConfigurer;
+import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
+import org.eclipse.ui.application.WorkbenchAdvisor;
+import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+
+/** Implements initial perspective and saveAndRestore status of the workbench. */
+public class SlcSecureWorkbenchAdvisor extends WorkbenchAdvisor {
+       public final static String INITIAL_PERSPECTIVE_PROPERTY = "org.argeo.security.ui.initialPerspective";
+       private String initialPerspective = System
+                       .getProperty(INITIAL_PERSPECTIVE_PROPERTY);
+       private String username;
+
+       public SlcSecureWorkbenchAdvisor(String username) {
+               super();
+               this.username = username;
+       }
+
+       public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
+                       IWorkbenchWindowConfigurer configurer) {
+               return new SlcSecureWorkbenchWindowAdvisor(configurer, username);
+       }
+
+       public String getInitialWindowPerspectiveId() {
+               return initialPerspective;
+       }
+
+       @Override
+       public void initialize(IWorkbenchConfigurer configurer) {
+               super.initialize(configurer);
+               // To remember the user's layout and window size for the next time he
+               // starts the application
+               //configurer.setSaveAndRestore(true);
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchWindowAdvisor.java b/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchWindowAdvisor.java
new file mode 100644 (file)
index 0000000..eb46844
--- /dev/null
@@ -0,0 +1,158 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.rcp;
+
+import org.argeo.security.ui.rcp.SecureWorkbenchWindowAdvisor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.DropTargetAdapter;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Tray;
+import org.eclipse.swt.widgets.TrayItem;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
+import org.eclipse.ui.part.EditorInputTransfer;
+
+/** Set here initial default size of the UI */
+public class SlcSecureWorkbenchWindowAdvisor extends
+               SecureWorkbenchWindowAdvisor {
+       public final static String IN_TRAY_PROPERTY = "org.argeo.slc.ui.inTray";
+
+       private TrayItem trayItem;
+
+       public SlcSecureWorkbenchWindowAdvisor(
+                       IWorkbenchWindowConfigurer configurer, String username) {
+               super(configurer, username);
+       }
+
+       public void postWindowOpen() {
+               String inTray = System.getProperty(IN_TRAY_PROPERTY);
+               if (inTray != null && inTray.equals("true")) {
+                       initTray();
+               }
+       }
+
+       @Override
+       public void preWindowOpen() {
+               getWindowConfigurer().addEditorAreaTransfer(
+                               EditorInputTransfer.getInstance());
+               getWindowConfigurer().configureEditorAreaDropListener(
+                               new DropTargetAdapter() {
+
+                                       @Override
+                                       public void dragEnter(DropTargetEvent event) {
+                                               System.out.println("DROP enter!!! " + event);
+                                       }
+
+                                       @Override
+                                       public void dragLeave(DropTargetEvent event) {
+                                               System.out.println("DROP leave!!! " + event);
+                                       }
+
+                                       public void drop(DropTargetEvent event) {
+                                               System.out.println("DROP drop!!! " + event);
+
+                                       }
+
+                                       @Override
+                                       public void dropAccept(DropTargetEvent event) {
+                                               System.out.println("DROP accept!!! " + event);
+                                               super.dropAccept(event);
+                                       }
+
+                               });
+               super.preWindowOpen();
+       }
+
+       @Override
+       public boolean preWindowShellClose() {
+               // hide but do not dispose if tray is supported
+               if (trayItem != null) {
+                       getWindowConfigurer().getWindow().getShell().setVisible(false);
+                       return false;
+               } else
+                       return true;
+       }
+
+       /** Init tray support */
+       protected void initTray() {
+               IWorkbenchWindow window = getWindowConfigurer().getWindow();
+               Shell shell = window.getShell();
+               final Tray tray = shell.getDisplay().getSystemTray();
+               trayItem = new TrayItem(tray, SWT.NONE);
+               if (trayItem == null)
+                       return;
+
+               // image
+               Image trayImage = ClientRcpPlugin.getDefault().getImageRegistry()
+                               .get("argeoTrayIcon");
+               trayItem.setImage(trayImage);
+               trayItem.setToolTipText("Argeo SLC");
+
+               // add pop-menu
+               // TODO: contribute more commands
+               trayItem.addListener(SWT.MenuDetect, new Listener() {
+                       public void handleEvent(Event event) {
+                               IWorkbenchWindow window = getWindowConfigurer().getWindow();
+                               Menu menu = new Menu(window.getShell(), SWT.POP_UP);
+                               MenuItem exit = new MenuItem(menu, SWT.NONE);
+                               exit.setText("Exit");
+                               exit.addListener(SWT.Selection, new Listener() {
+                                       public void handleEvent(Event event) {
+                                               getWindowConfigurer().getWorkbenchConfigurer()
+                                                               .getWorkbench().close();
+                                       }
+                               });
+                               menu.setVisible(true);
+                       }
+               });
+
+               // add behavior when clicked upon
+               trayItem.addListener(SWT.Selection, new Listener() {
+                       public void handleEvent(Event event) {
+                               Shell shell = getWindowConfigurer().getWindow().getShell();
+                               if (shell.isVisible()) {
+                                       if (shell.getMinimized())
+                                               shell.setMinimized(false);
+                                       else {
+                                               shell.setVisible(false);
+                                               shell.setMinimized(true);
+                                       }
+                               } else {
+                                       shell.setVisible(true);
+                                       shell.setActive();
+                                       shell.setFocus();
+                                       shell.setMinimized(false);
+                               }
+                       }
+               });
+
+               // start hidden
+               // shell.setVisible(false);
+       }
+
+       @Override
+       public void dispose() {
+               if (trayItem != null)
+                       trayItem.dispose();
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/.classpath b/plugins/org.argeo.slc.client.ui.dist/.classpath
new file mode 100644 (file)
index 0000000..5641c7c
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/plugins/org.argeo.slc.client.ui.dist/.project b/plugins/org.argeo.slc.client.ui.dist/.project
new file mode 100644 (file)
index 0000000..30b71ed
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.client.ui.dist</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/plugins/org.argeo.slc.client.ui.dist/.settings/org.eclipse.jdt.core.prefs b/plugins/org.argeo.slc.client.ui.dist/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..7c5d419
--- /dev/null
@@ -0,0 +1,8 @@
+#Wed Dec 08 08:27:02 CET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.argeo.slc.client.ui.dist/.settings/org.eclipse.pde.core.prefs b/plugins/org.argeo.slc.client.ui.dist/.settings/org.eclipse.pde.core.prefs
new file mode 100644 (file)
index 0000000..0e2e537
--- /dev/null
@@ -0,0 +1,4 @@
+#Wed Dec 08 08:27:02 CET 2010
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/plugins/org.argeo.slc.client.ui.dist/META-INF/MANIFEST.MF b/plugins/org.argeo.slc.client.ui.dist/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..a5c5b5d
--- /dev/null
@@ -0,0 +1,41 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Dist
+Bundle-SymbolicName: org.argeo.slc.client.ui.dist;singleton:=true
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Activator: org.argeo.slc.client.ui.dist.DistPlugin
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.ui;resolution:=optional,
+ org.eclipse.rap.ui;resolution:=optional,
+ org.eclipse.core.runtime;resolution:=optional,
+ org.eclipse.rap.ui.workbench;resolution:=optional
+Import-Package: aQute.lib.osgi;resolution:=optional,
+ javax.jcr;version="[2.0.0,3.0.0)",
+ javax.jcr.nodetype;version="2.0.0",
+ javax.jcr.query,
+ javax.jcr.query.qom;version="2.0.0",
+ javax.jcr.security,
+ javax.jcr.util;version="2.0.0",
+ org.apache.commons.io;version="1.4.0",
+ org.apache.commons.logging;version="1.1.1",
+ org.argeo,
+ org.argeo.eclipse.spring,
+ org.argeo.eclipse.ui,
+ org.argeo.eclipse.ui.dialogs,
+ org.argeo.eclipse.ui.jcr,
+ org.argeo.eclipse.ui.jcr.commands,
+ org.argeo.eclipse.ui.jcr.editors,
+ org.argeo.eclipse.ui.jcr.utils,
+ org.argeo.eclipse.ui.jcr.views,
+ org.argeo.eclipse.ui.specific,
+ org.argeo.eclipse.ui.utils,
+ org.argeo.jcr,
+ org.argeo.jcr.security,
+ org.argeo.jcr.spring,
+ org.argeo.slc.jcr,
+ org.argeo.slc.repo,
+ org.eclipse.ui.forms,
+ org.eclipse.ui.forms.editor,
+ org.eclipse.ui.forms.events,
+ org.eclipse.ui.forms.widgets
diff --git a/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/commands.xml b/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/commands.xml
new file mode 100644 (file)
index 0000000..2be2c11
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+       <bean id="org.argeo.slc.client.ui.dist.openGenericJcrQueryEditor"
+               class="org.argeo.eclipse.ui.jcr.commands.OpenGenericJcrQueryEditor"
+               scope="prototype">
+               <property name="editorId"
+                       value="org.argeo.slc.client.ui.dist.genericJcrQueryEditor" />
+       </bean>
+
+       <bean id="runInOSGi" class="org.argeo.slc.client.ui.dist.commands.RunInOsgi"
+               scope="prototype">
+               <property name="repository" ref="javaRepository" />
+               <property name="workspace" value="org.argeo.tp-1.3.1" />
+       </bean>
+       
+       <bean id="normalizeDistribution"
+               class="org.argeo.slc.client.ui.dist.commands.NormalizeDistribution"
+               scope="prototype">
+               <property name="repository" ref="javaRepository" />
+       </bean>
+       <bean id="createWorkspace"
+               class="org.argeo.slc.client.ui.dist.commands.CreateWorkspace"
+               scope="prototype">
+               <property name="repository" ref="javaRepository" />
+       </bean>
+       <bean id="copyWorkspace"
+               class="org.argeo.slc.client.ui.dist.commands.CopyWorkspace"
+               scope="prototype">
+               <property name="repository" ref="javaRepository" />
+       </bean>
+       <bean id="deleteWorkspace"
+               class="org.argeo.slc.client.ui.dist.commands.DeleteWorkspace"
+               scope="prototype">
+               <property name="repository" ref="javaRepository" />
+       </bean>
+       <bean id="manageWorkspaceAuth"
+               class="org.argeo.slc.client.ui.dist.commands.ManageWorkspaceAuth"
+               scope="prototype">
+               <property name="repository" ref="javaRepository" />
+       </bean>
+       <bean id="refreshDistributionsView"
+               class="org.argeo.slc.client.ui.dist.commands.RefreshDistributionsView"
+               scope="prototype">
+       </bean>
+       <bean id="org.argeo.slc.client.ui.dist.deleteArtifacts"
+               class="org.argeo.slc.client.ui.dist.commands.DeleteArtifacts"
+               scope="prototype">
+       </bean>
+       <bean id="refreshDistributionOverviewPage"
+               class="org.argeo.slc.client.ui.dist.commands.RefreshDistributionOverviewPage"
+               scope="prototype">
+       </bean>
+</beans>
diff --git a/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/editors.xml b/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/editors.xml
new file mode 100644 (file)
index 0000000..069bb15
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
+       xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
+
+       <bean id="org.argeo.slc.client.ui.dist.genericJcrQueryEditor"
+               class="org.argeo.eclipse.ui.jcr.editors.GenericJcrQueryEditor" scope="prototype">
+               <property name="session" ref="slcSession" />
+       </bean>
+</beans>
diff --git a/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/jcr.xml b/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/jcr.xml
new file mode 100644 (file)
index 0000000..6543412
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
+       xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
+
+       <bean id="slcSession" class="org.argeo.jcr.spring.ThreadBoundSession">
+               <property name="repository" ref="javaRepository" />
+               <property name="workspace" value="org.argeo.tp-1.3.1" />
+       </bean>
+</beans>
diff --git a/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/osgi.xml b/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/osgi.xml
new file mode 100644 (file)
index 0000000..04e4e22
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xmlns:osgi="http://www.springframework.org/schema/osgi"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"\r
+       osgi:default-timeout="30000">\r
+\r
+       <reference id="javaRepository" interface="javax.jcr.Repository"\r
+               filter="(argeo.jcr.repository.alias=java)" />\r
+</beans:beans>
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/views.xml b/plugins/org.argeo.slc.client.ui.dist/META-INF/spring/views.xml
new file mode 100644 (file)
index 0000000..7540fe2
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd 
+        http://www.springframework.org/schema/util 
+        http://www.springframework.org/schema/util/spring-util-2.5.xsd">
+
+       <!-- Views -->
+       <bean id="artifactsBrowser" class="org.argeo.slc.client.ui.dist.views.ArtifactsBrowser"
+               scope="prototype">
+               <property name="jcrSession" ref="slcSession" />
+       </bean>
+       <bean id="queryArtifactsForm" class="org.argeo.slc.client.ui.dist.views.QueryArtifactsForm"
+               scope="prototype">
+               <property name="session" ref="slcSession" />
+               <property name="columnProperties">
+                       <list>
+                               <value>slc:artifactVersion.jcr:uuid</value>
+                               <value>slc:artifactVersion.slc:groupId</value>
+                               <value>slc:artifactVersion.slc:artifactId</value>
+                               <value>slc:artifactVersion.slc:artifactVersion</value>
+                       </list>
+               </property>
+       </bean>
+       <bean id="queryBundlesForm" class="org.argeo.slc.client.ui.dist.views.QueryBundlesForm"
+               scope="prototype">
+               <property name="session" ref="slcSession" />
+               <property name="columnProperties">
+                       <list>
+                               <value>slc:artifactVersion.jcr:uuid</value>
+                               <value>slc:bundleArtifact.slc:symbolic-name</value>
+                               <value>slc:artifactVersion.slc:groupId</value>
+                               <value>slc:bundleArtifact.slc:bundle-version</value>
+                               <!-- <value>slc:bundleArtifact.slc:Fragment-Host</value> -->
+                       </list>
+               </property>
+       </bean>
+
+       <bean id="queryArtifactsText" class="org.argeo.slc.client.ui.dist.views.QueryArtifactsText"
+               scope="prototype">
+               <property name="session" ref="slcSession" />
+       </bean>
+
+       <bean id="distributionsView" class="org.argeo.slc.client.ui.dist.views.DistributionsView"
+               scope="prototype">
+               <property name="repository" ref="javaRepository" />
+       </bean>
+</beans>
diff --git a/plugins/org.argeo.slc.client.ui.dist/build.properties b/plugins/org.argeo.slc.client.ui.dist/build.properties
new file mode 100644 (file)
index 0000000..5fc538b
--- /dev/null
@@ -0,0 +1,4 @@
+source.. = src/main/java/
+output.. = target/classes/
+bin.includes = META-INF/,\
+               .
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/addItem.gif b/plugins/org.argeo.slc.client.ui.dist/icons/addItem.gif
new file mode 100644 (file)
index 0000000..a5ac28d
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/addItem.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/artifactBase.gif b/plugins/org.argeo.slc.client.ui.dist/icons/artifactBase.gif
new file mode 100644 (file)
index 0000000..fca9c53
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/artifactBase.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/artifactVersionBase.gif b/plugins/org.argeo.slc.client.ui.dist/icons/artifactVersionBase.gif
new file mode 100644 (file)
index 0000000..b6096e2
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/artifactVersionBase.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/changeRights.gif b/plugins/org.argeo.slc.client.ui.dist/icons/changeRights.gif
new file mode 100644 (file)
index 0000000..a6b251f
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/changeRights.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/distribution_perspective.gif b/plugins/org.argeo.slc.client.ui.dist/icons/distribution_perspective.gif
new file mode 100644 (file)
index 0000000..27bf10e
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/distribution_perspective.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/file.gif b/plugins/org.argeo.slc.client.ui.dist/icons/file.gif
new file mode 100644 (file)
index 0000000..ef30288
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/file.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/packageBrowser.gif b/plugins/org.argeo.slc.client.ui.dist/icons/packageBrowser.gif
new file mode 100644 (file)
index 0000000..983932f
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/packageBrowser.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/package_obj.gif b/plugins/org.argeo.slc.client.ui.dist/icons/package_obj.gif
new file mode 100644 (file)
index 0000000..131c28d
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/package_obj.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/packages.gif b/plugins/org.argeo.slc.client.ui.dist/icons/packages.gif
new file mode 100644 (file)
index 0000000..22f78af
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/packages.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/refresh.png b/plugins/org.argeo.slc.client.ui.dist/icons/refresh.png
new file mode 100644 (file)
index 0000000..a3884fb
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/refresh.png differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/removeItem.gif b/plugins/org.argeo.slc.client.ui.dist/icons/removeItem.gif
new file mode 100644 (file)
index 0000000..2b88506
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/removeItem.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/search.gif b/plugins/org.argeo.slc.client.ui.dist/icons/search.gif
new file mode 100644 (file)
index 0000000..d540a01
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/search.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/searchForm.gif b/plugins/org.argeo.slc.client.ui.dist/icons/searchForm.gif
new file mode 100644 (file)
index 0000000..cbbb3af
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/searchForm.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/search_decl_obj.gif b/plugins/org.argeo.slc.client.ui.dist/icons/search_decl_obj.gif
new file mode 100644 (file)
index 0000000..f31a02a
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/search_decl_obj.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/showSize.gif b/plugins/org.argeo.slc.client.ui.dist/icons/showSize.gif
new file mode 100644 (file)
index 0000000..2df4b45
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/showSize.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/icons/sinfocenter_obj.gif b/plugins/org.argeo.slc.client.ui.dist/icons/sinfocenter_obj.gif
new file mode 100644 (file)
index 0000000..b867103
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui.dist/icons/sinfocenter_obj.gif differ
diff --git a/plugins/org.argeo.slc.client.ui.dist/plugin.xml b/plugins/org.argeo.slc.client.ui.dist/plugin.xml
new file mode 100644 (file)
index 0000000..8479ed3
--- /dev/null
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+       <!-- Perspectives --> 
+   <extension
+         point="org.eclipse.ui.perspectives">
+      <perspective
+            name="SLC Distribution"
+            class="org.argeo.slc.client.ui.dist.DistributionPerspective"
+            id="org.argeo.slc.client.ui.dist.distributionPerspective"
+            icon="icons/distribution_perspective.gif">
+      </perspective>
+   </extension>
+   <!-- Views -->
+   <extension
+         point="org.eclipse.ui.views">
+      <view
+            class="org.argeo.eclipse.spring.SpringExtensionFactory"
+            id="org.argeo.slc.client.ui.dist.artifactsBrowser"
+            icon="icons/packageBrowser.gif"
+            name="Artifacts browser">
+      </view>
+      <view
+            class="org.argeo.eclipse.spring.SpringExtensionFactory"
+            id="org.argeo.slc.client.ui.dist.queryArtifactsForm"
+            icon="icons/searchForm.gif"
+            name="Artifacts Form">
+      </view>
+      <view
+            class="org.argeo.eclipse.spring.SpringExtensionFactory"
+            id="org.argeo.slc.client.ui.dist.queryBundlesForm"
+            icon="icons/searchForm.gif"
+            name="Bundles Form">
+      </view>
+      <view
+            class="org.argeo.eclipse.spring.SpringExtensionFactory"
+            id="org.argeo.slc.client.ui.dist.queryArtifactsText"
+            icon="icons/search.gif"
+            name="Query builder">
+      </view>
+      <view
+            class="org.argeo.eclipse.spring.SpringExtensionFactory"
+            id="org.argeo.slc.client.ui.dist.distributionsView"
+            icon="icons/search.gif"
+            name="Distributions">
+      </view>
+   </extension>
+   <!-- Editors -->
+   <extension
+           point="org.eclipse.ui.editors">
+            <editor
+                 class="org.argeo.slc.client.ui.dist.editors.GenericArtifactEditor"
+              id="org.argeo.slc.client.ui.dist.genericArtifactEditor"
+              name="Artifact editor"
+              icon="icons/artifactVersionBase.gif"
+              default="false">
+        </editor>
+            <editor
+                 class="org.argeo.slc.client.ui.dist.editors.DistributionEditor"
+              id="org.argeo.slc.client.ui.dist.distributionEditor"
+              name="Distribution editor"
+              icon="icons/distribution_perspective.gif"
+              default="false">
+        </editor>
+    </extension>
+    <!-- Commands --> 
+       <extension
+         point="org.eclipse.ui.commands">
+               <command
+            defaultHandler="org.argeo.slc.client.ui.dist.commands.ShowSizeColumn"
+            id="org.argeo.slc.client.ui.dist.showSizeColumn"
+            name="Show size column">
+            <state 
+                               id="org.argeo.slc.client.ui.dist.showSizeColumn.toggleState">
+                               <class class="org.eclipse.jface.commands.ToggleState"> 
+                                       <parameter
+                                               name="default"
+                                       value="true" />
+                               </class>
+                       </state>
+       </command>
+               <command
+            defaultHandler="org.argeo.slc.client.ui.dist.commands.RefreshArtifactBrowser"
+            id="org.argeo.slc.client.ui.dist.refreshArtifactBrowser"
+            name="Refresh Artifact Browser">
+       </command>
+               <command
+            id="org.argeo.slc.client.ui.dist.runInOSGi"
+            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+            name="Run in OSGi">
+            <commandParameter
+                       id="workspace"
+                       name="Workspace Name">
+                       </commandParameter>
+       </command>
+               <command
+            id="org.argeo.slc.client.ui.dist.normalizeDistribution"
+            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+            name="Normalize Distribution">
+            <commandParameter
+                       id="workspace"
+                       name="Workspace Name">
+                       </commandParameter>
+       </command>
+       
+               <!-- TO MANIPULATE WORKSPACES -->
+               <command
+            id="org.argeo.slc.client.ui.dist.createWorkspace"
+            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+            name="Create Workspace">
+       </command>
+       <command
+            id="org.argeo.slc.client.ui.dist.deleteWorkspace"
+            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+            name="Delete chosen Workspace">
+            <commandParameter
+                       id="org.argeo.slc.client.ui.dist.workspaceName"
+                       name="Workspace Name">
+                       </commandParameter>
+       </command>
+       <command
+            id="org.argeo.slc.client.ui.dist.copyWorkspace"
+            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+            name="Copy chosen Workspace">
+            <commandParameter
+                       id="org.argeo.slc.client.ui.dist.workspaceName"
+                       name="Workspace Name">
+                       </commandParameter>
+       </command>
+       <command
+            id="org.argeo.slc.client.ui.dist.manageWorkspaceAuth"
+            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+            name="Manage workspace authorizations">
+            <commandParameter
+                       id="org.argeo.slc.client.ui.dist.workspaceName"
+                       name="Workspace Name">
+                       </commandParameter>
+       </command>
+       <command
+            id="org.argeo.slc.client.ui.dist.refreshDistributionsView"
+            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+            name="Refresh Distributions View">
+       </command>
+       <command
+            id="org.argeo.slc.client.ui.dist.refreshDistributionOverviewPage"
+            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+            name="Refresh distribution overview page">
+       </command>
+       <command
+            id="org.argeo.slc.client.ui.dist.deleteArtifacts"
+            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+            name="Remove selected artifacts">
+       </command>
+    </extension>
+       <extension
+         id="menu:org.eclipse.ui.main.menu"
+         point="org.eclipse.ui.menus">
+    
+         <!-- View Specific Menus --> 
+               <menuContribution
+               locationURI="toolbar:org.argeo.slc.client.ui.dist.artifactsBrowser">
+            <command
+               commandId="org.argeo.slc.client.ui.dist.showSizeColumn"
+                icon="icons/showSize.gif"
+                style="toggle" 
+                label="Show sizes"
+                tooltip="Warning: showing size column might reduce overall browser reactivity">
+            </command>
+                       <command
+               commandId="org.argeo.slc.client.ui.dist.refreshArtifactBrowser"
+                icon="icons/refresh.png"
+                       label="Refresh"
+                tooltip="Refresh the whole browser">
+            </command>
+        </menuContribution>
+        <!--
+               <menuContribution
+               locationURI="toolbar:org.argeo.slc.client.ui.dist.distributionsView">
+            <command
+               commandId="org.argeo.slc.client.ui.dist.runInOSGi"
+                icon="icons/showSize.gif"
+                label="Run in OSGi"
+                tooltip="Run in a spearate OSGi runtime">
+            </command>
+        </menuContribution>
+       -->
+        <!-- Queries --> 
+               <!-- <menuContribution
+                allPopups="false"
+                locationURI="menu:org.eclipse.ui.main.menu?after=edit">
+               <menu label="Queries"
+              mnemonic="Queries"
+              id="org.argeo.slc.client.ui.dist.queryMenu">
+                <command
+                      commandId="org.argeo.slc.client.ui.dist.openGenericJcrQueryEditor"
+                      disabledIcon="icons/saveDisabled.gif"
+                      icon="icons/results.gif"
+                      label="JCR Query"
+                      style="push"
+                      tooltip="Open JCR query editor">
+                </command>
+             </menu>
+          </menuContribution> -->
+       </extension>
+  <extension
+           point="org.eclipse.ui.activities">
+        <!-- TODO: find a way to exclude evrything -->
+        <activityPatternBinding
+              activityId="org.argeo.slc.client.ui.slcActivity"
+              isEqualityPattern="true"
+              pattern="org.argeo.slc.client.ui.dist/org.argeo.slc.client.ui.dist.distributionPerspective">
+        </activityPatternBinding>
+        <activityPatternBinding
+              activityId="org.argeo.security.ui.adminActivity"
+              isEqualityPattern="true"
+              pattern="org.argeo.slc.client.ui/org.argeo.slc.client.ui.slcExecutionPerspective">
+        </activityPatternBinding>
+     </extension>
+</plugin>
diff --git a/plugins/org.argeo.slc.client.ui.dist/pom.xml b/plugins/org.argeo.slc.client.ui.dist/pom.xml
new file mode 100644 (file)
index 0000000..647520d
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>plugins</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.client.ui.dist</artifactId>
+       <name>SLC Client UI Distribution</name>
+       <packaging>jar</packaging>
+
+
+       <dependencies>
+               <!-- Commons UI -->
+               <dependency>
+                       <groupId>org.argeo.commons.base</groupId>
+                       <artifactId>org.argeo.eclipse.ui</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.base</groupId>
+                       <artifactId>org.argeo.eclipse.ui.jcr</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.base</groupId>
+                       <artifactId>org.argeo.eclipse.ui.rcp</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <scope>provided</scope>
+               </dependency>
+
+
+               <!-- SLC repo -->
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.repo</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.slc.modules</groupId>
+                       <artifactId>org.argeo.slc.server.repo</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>biz.aQute.bndlib</artifactId>
+               </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistConstants.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistConstants.java
new file mode 100644 (file)
index 0000000..6738bd5
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist;
+
+/** Constants used across the application. */
+public interface DistConstants {
+       /*
+        * MISCEALLENEOUS
+        */
+       public final static String DATE_TIME_FORMAT = "MM/dd/yyyy, HH:mm";
+       public final static String DATE_FORMAT = "MM/dd/yyyy";
+       // this should be directly got in JCR
+       public final static String JCR_IDENTIFIER = "jcr:uuid";
+
+       
+       
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistImages.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistImages.java
new file mode 100644 (file)
index 0000000..69093fb
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist;
+
+import org.eclipse.swt.graphics.Image;
+
+/** Shared icons. */
+public class DistImages {
+       public final static Image IMG_ARTIFACT_BASE = DistPlugin
+                       .getImageDescriptor("icons/artifactBase.gif").createImage();
+       public final static Image IMG_ARTIFACT_VERSION_BASE = DistPlugin
+                       .getImageDescriptor("icons/artifactVersionBase.gif").createImage();
+       public final static Image IMG_FILE = DistPlugin.getImageDescriptor(
+                       "icons/file.gif").createImage();
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistLabels.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistLabels.java
new file mode 100644 (file)
index 0000000..f04005c
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist;
+
+public class DistLabels {
+
+       public static String getLabel(String jcrName){
+               String label = null;
+               
+               
+               return label;
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistPlugin.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistPlugin.java
new file mode 100644 (file)
index 0000000..5bc3408
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+public class DistPlugin extends AbstractUIPlugin {
+       private static BundleContext bundleContext;
+       public final static String ID = "org.argeo.slc.client.ui.dist";
+
+       private static DistPlugin plugin;
+
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+               plugin = this;
+       }
+
+       public static DistPlugin getDefault() {
+               return plugin;
+       }
+
+       public static BundleContext getBundleContext() {
+               return bundleContext;
+       }
+
+       public static ImageDescriptor getImageDescriptor(String path) {
+               return imageDescriptorFromPlugin(ID, path);
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistributionPerspective.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/DistributionPerspective.java
new file mode 100644 (file)
index 0000000..65021dc
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist;
+
+import org.argeo.slc.client.ui.dist.views.ArtifactsBrowser;
+import org.argeo.slc.client.ui.dist.views.DistributionsView;
+import org.argeo.slc.client.ui.dist.views.QueryArtifactsForm;
+import org.argeo.slc.client.ui.dist.views.QueryArtifactsText;
+import org.argeo.slc.client.ui.dist.views.QueryBundlesForm;
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+public class DistributionPerspective implements IPerspectiveFactory {
+
+       public final static String ID = DistPlugin.ID + ".distributionPerspective";
+
+       public void createInitialLayout(IPageLayout layout) {
+               String editorArea = layout.getEditorArea();
+               layout.setEditorAreaVisible(true);
+               layout.setFixed(false);
+
+               IFolderLayout main = layout.createFolder("main", IPageLayout.LEFT,
+                               0.5f, editorArea);
+               main.addView(DistributionsView.ID);
+               main.addView(ArtifactsBrowser.ID);
+               main.addView(QueryArtifactsForm.ID);
+               main.addView(QueryBundlesForm.ID);
+               main.addView(QueryArtifactsText.ID);
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/BndProcess.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/BndProcess.java
new file mode 100644 (file)
index 0000000..72d6ad8
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.commands;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.jar.Manifest;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+import aQute.lib.osgi.Builder;
+import aQute.lib.osgi.Constants;
+import aQute.lib.osgi.Jar;
+
+public class BndProcess extends AbstractHandler implements Constants {
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               try {
+                       Builder b = new Builder();
+                       b.setProperty(EXPORT_PACKAGE, "org.osgi.framework");
+                       b.setProperty(PRIVATE_PACKAGE, "*");
+                       b.addClasspath(new File(
+                                       "/home/mbaudier/.m2/repository/org/eclipse/osgi/org.eclipse.osgi/3.6.1/org.eclipse.osgi-3.6.1.jar"));
+
+                       Jar jar = b.build();
+                       Manifest m = jar.getManifest();
+                       jar.write(new File(b.getBsn() + ".jar"));
+               } catch (IOException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } catch (Exception e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               }
+
+               return null;
+       }
+
+       public static void main(String[] args) {
+               try {
+                       new BndProcess().execute(null);
+               } catch (ExecutionException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               }
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/CopyWorkspace.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/CopyWorkspace.java
new file mode 100644 (file)
index 0000000..adf339e
--- /dev/null
@@ -0,0 +1,180 @@
+package org.argeo.slc.client.ui.dist.commands;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Property;
+import javax.jcr.PropertyIterator;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.nodetype.NodeType;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.argeo.jcr.JcrUtils;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.ui.IWorkbenchWindow;
+
+/**
+ * Create a copy of the chosen workspace in the current repository.
+ */
+
+public class CopyWorkspace extends AbstractHandler {
+       private static final Log log = LogFactory.getLog(CopyWorkspace.class);
+       public final static String ID = DistPlugin.ID + ".copyWorkspace";
+       public final static String PARAM_WORKSPACE_NAME = DistPlugin.ID
+                       + ".workspaceName";
+       public final static String DEFAULT_LABEL = "Duplicate";
+       public final static String DEFAULT_ICON_PATH = "icons/addItem.gif";
+
+       /* DEPENDENCY INJECTION */
+       private Repository repository;
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               String srcWorkspaceName = event.getParameter(PARAM_WORKSPACE_NAME);
+
+               if (log.isTraceEnabled())
+                       log.debug("WORKSPACE " + srcWorkspaceName + " About to be copied");
+
+               // MessageDialog.openWarning(DistPlugin.getDefault()
+               // .getWorkbench().getDisplay().getActiveShell(),
+               // "WARNING", "Not yet implemented");
+               // return null;
+
+               IWorkbenchWindow iww = DistPlugin.getDefault().getWorkbench()
+                               .getActiveWorkbenchWindow();
+               InputDialog inputDialog = new InputDialog(iww.getShell(),
+                               "New copy of the current workspace",
+                               "Choose a name for the workspace to create", "", null);
+               inputDialog.open();
+               String newWorkspaceName = inputDialog.getValue();
+               Session srcSession = null;
+               Session newSession = null;
+               try {
+                       srcSession = repository.login(srcWorkspaceName);
+
+                       // Create the workspace
+                       srcSession.getWorkspace().createWorkspace(newWorkspaceName);
+                       Node srcRootNode = srcSession.getRootNode();
+                       // log in the newly created workspace
+                       newSession = repository.login(newWorkspaceName);
+                       //newSession.save();
+                       Node newRootNode = newSession.getRootNode();
+                       copy(srcRootNode, newRootNode);
+                       newSession.save();
+
+                       CommandHelpers.callCommand(RefreshDistributionsView.ID);
+               } catch (RepositoryException re) {
+                       throw new ArgeoException(
+                                       "Unexpected error while creating the new workspace.", re);
+               } finally {
+                       if (srcSession != null)
+                               srcSession.logout();
+                       if (newSession != null)
+                               newSession.logout();
+               }
+               return null;
+       }
+
+       // FIXME : commons is frozen, cannot fix the problem directly there.
+       // test and report corresponding patch
+       private void copy(Node fromNode, Node toNode) {
+               try {
+                       if (log.isDebugEnabled())
+                               log.debug("copy node :" + fromNode.getPath());
+
+                       // FIXME : small hack to enable specific workspace copy
+                       if (fromNode.isNodeType("rep:ACL")
+                                       || fromNode.isNodeType("rep:system")) {
+                               if (log.isTraceEnabled())
+                                       log.trace("node skipped");
+                               return;
+                       }
+
+                       // add mixins
+                       for (NodeType mixinType : fromNode.getMixinNodeTypes()) {
+                               toNode.addMixin(mixinType.getName());
+                       }
+
+                       // Double check
+                       for (NodeType mixinType : toNode.getMixinNodeTypes()) {
+                               if (log.isDebugEnabled())
+                                       log.debug(mixinType.getName());
+                       }
+
+                       // process properties
+                       PropertyIterator pit = fromNode.getProperties();
+                       properties: while (pit.hasNext()) {
+                               Property fromProperty = pit.nextProperty();
+                               String propName = fromProperty.getName();
+                               try {
+                                       String propertyName = fromProperty.getName();
+                                       if (toNode.hasProperty(propertyName)
+                                                       && toNode.getProperty(propertyName).getDefinition()
+                                                                       .isProtected())
+                                               continue properties;
+
+                                       if (fromProperty.getDefinition().isProtected())
+                                               continue properties;
+
+                                       if (propertyName.equals("jcr:created")
+                                                       || propertyName.equals("jcr:createdBy")
+                                                       || propertyName.equals("jcr:lastModified")
+                                                       || propertyName.equals("jcr:lastModifiedBy"))
+                                               continue properties;
+
+                                       if (fromProperty.isMultiple()) {
+                                               toNode.setProperty(propertyName,
+                                                               fromProperty.getValues());
+                                       } else {
+                                               toNode.setProperty(propertyName,
+                                                               fromProperty.getValue());
+                                       }
+                               } catch (RepositoryException e) {
+                                       throw new ArgeoException("Cannot property " + propName, e);
+                               }
+                       }
+
+                       // recursively process children nodes
+                       NodeIterator nit = fromNode.getNodes();
+                       while (nit.hasNext()) {
+                               Node fromChild = nit.nextNode();
+                               Integer index = fromChild.getIndex();
+                               String nodeRelPath = fromChild.getName() + "[" + index + "]";
+                               Node toChild;
+                               if (toNode.hasNode(nodeRelPath))
+                                       toChild = toNode.getNode(nodeRelPath);
+                               else
+                                       toChild = toNode.addNode(fromChild.getName(), fromChild
+                                                       .getPrimaryNodeType().getName());
+                               copy(fromChild, toChild);
+                       }
+
+                       // update jcr:lastModified and jcr:lastModifiedBy in toNode in case
+                       // they existed
+                       if (!toNode.getDefinition().isProtected()
+                                       && toNode.isNodeType(NodeType.MIX_LAST_MODIFIED))
+                               JcrUtils.updateLastModified(toNode);
+
+                       // Workaround to reduce session size: artifact is a saveable unity
+                       if (toNode.isNodeType(SlcTypes.SLC_ARTIFACT))
+                               toNode.getSession().save();
+
+               } catch (RepositoryException e) {
+                       throw new ArgeoException("Cannot copy " + fromNode + " to "
+                                       + toNode, e);
+               }
+       }
+
+       /* DEPENDENCY INJECTION */
+       public void setRepository(Repository repository) {
+               this.repository = repository;
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/CreateWorkspace.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/CreateWorkspace.java
new file mode 100644 (file)
index 0000000..ccdc807
--- /dev/null
@@ -0,0 +1,61 @@
+package org.argeo.slc.client.ui.dist.commands;
+
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.ui.IWorkbenchWindow;
+
+/**
+ * Create a new empty workspace in the current repository.
+ */
+
+public class CreateWorkspace extends AbstractHandler {
+       private static final Log log = LogFactory.getLog(CreateWorkspace.class);
+       public final static String ID = DistPlugin.ID + ".createWorkspace";
+       public final static String DEFAULT_LABEL = "Create new workspace";
+       public final static String DEFAULT_ICON_PATH = "icons/addItem.gif";
+
+       /* DEPENDENCY INJECTION */
+       private Repository repository;
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               IWorkbenchWindow iww = DistPlugin.getDefault().getWorkbench()
+                               .getActiveWorkbenchWindow();
+               // TODO : add an input validator
+               InputDialog inputDialog = new InputDialog(iww.getShell(),
+                               "New workspace", "Choose a name for the workspace to create",
+                               "", null);
+               inputDialog.open();
+               String workspaceName = inputDialog.getValue();
+               Session session = null;
+               try {
+                       session = repository.login();
+                       session.getWorkspace().createWorkspace(workspaceName);
+                       CommandHelpers.callCommand(RefreshDistributionsView.ID);
+               } catch (RepositoryException re) {
+                       throw new ArgeoException(
+                                       "Unexpected error while creating the new workspace.", re);
+               } finally {
+                       if (session != null)
+                               session.logout();
+               }
+               if (log.isTraceEnabled())
+                       log.debug("WORKSPACE " + workspaceName + " CREATED");
+               return null;
+       }
+
+       /* DEPENDENCY INJECTION */
+       public void setRepository(Repository repository) {
+               this.repository = repository;
+       }
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DeleteArtifacts.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DeleteArtifacts.java
new file mode 100644 (file)
index 0000000..88e9bda
--- /dev/null
@@ -0,0 +1,69 @@
+package org.argeo.slc.client.ui.dist.commands;
+
+import java.util.Iterator;
+
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+
+import org.argeo.ArgeoException;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * Delete chosen artifacts from the current workspace.
+ */
+
+public class DeleteArtifacts extends AbstractHandler {
+       // private static final Log log = LogFactory.getLog(DeleteWorkspace.class);
+       public final static String ID = DistPlugin.ID + ".deleteArtifacts";
+       public final static String DEFAULT_LABEL = "Delete selected items";
+       public final static String DEFAULT_ICON_PATH = "icons/removeItem.gif";
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               try {
+                       IWorkbenchPart activePart = DistPlugin.getDefault().getWorkbench()
+                                       .getActiveWorkbenchWindow().getActivePage().getActivePart();
+
+                       if (activePart instanceof IEditorPart) {
+                               ISelection selector = ((IEditorPart) activePart)
+                                               .getEditorSite().getSelectionProvider().getSelection();
+                               if (selector != null
+                                               && selector instanceof IStructuredSelection) {
+                                       Iterator<?> it = ((IStructuredSelection) selector)
+                                                       .iterator();
+
+                                       String msg = "Your are about to definitively remove the "
+                                                       + ((IStructuredSelection) selector).size()
+                                                       + " selected artifacts.\n"
+                                                       + "Are you sure you want to proceed ?";
+
+                                       boolean result = MessageDialog.openConfirm(DistPlugin
+                                                       .getDefault().getWorkbench().getDisplay()
+                                                       .getActiveShell(), "Confirm Delete", msg);
+
+                                       if (result) {
+                                               while (it.hasNext()) {
+                                                       Node node = (Node) it.next();
+                                                       // we remove the artifactVersion, that is the parent
+                                                       node.getParent().remove();
+                                                       node.getSession().save();
+                                               }
+                                       }
+                               }
+                       }
+                       CommandHelpers.callCommand(RefreshDistributionOverviewPage.ID);
+               } catch (RepositoryException re) {
+                       throw new ArgeoException(
+                                       "Unexpected error while deleting artifacts.", re);
+               }
+               return null;
+       }
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DeleteWorkspace.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/DeleteWorkspace.java
new file mode 100644 (file)
index 0000000..4c77c80
--- /dev/null
@@ -0,0 +1,84 @@
+package org.argeo.slc.client.ui.dist.commands;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.nodetype.NodeType;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.MessageDialog;
+
+/**
+ * Delete chosen workspace in the current repository.
+ */
+
+public class DeleteWorkspace extends AbstractHandler {
+       private static final Log log = LogFactory.getLog(DeleteWorkspace.class);
+
+       public final static String ID = DistPlugin.ID + ".deleteWorkspace";
+       public final static String PARAM_WORKSPACE_NAME = DistPlugin.ID
+                       + ".workspaceName";
+       public final static String DEFAULT_LABEL = "Delete";
+       public final static String DEFAULT_ICON_PATH = "icons/removeItem.gif";
+
+       /* DEPENDENCY INJECTION */
+       private Repository repository;
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+
+               // MessageDialog.openWarning(DistPlugin.getDefault()
+               // .getWorkbench().getDisplay().getActiveShell(),
+               // "WARNING", "Not yet implemented");
+               // return null;
+
+               String workspaceName = event.getParameter(PARAM_WORKSPACE_NAME);
+               String msg = "Your are about to clear workspace [" + workspaceName
+                               + "].\n Do you really want to proceed ?";
+
+               boolean result = MessageDialog.openConfirm(DistPlugin.getDefault()
+                               .getWorkbench().getDisplay().getActiveShell(),
+                               "Confirm workspace clear", msg);
+               if (result) {
+                       Session session = null;
+                       try {
+                               session = repository.login(workspaceName);
+                               NodeIterator nit = session.getRootNode().getNodes();
+                               while (nit.hasNext()) {
+                                       Node node = nit.nextNode();
+                                       if (node.isNodeType(NodeType.NT_FOLDER)
+                                                       || node.isNodeType(NodeType.NT_UNSTRUCTURED)) {
+                                               String path = node.getPath();
+                                               node.remove();
+                                               session.save();
+                                               if (log.isDebugEnabled())
+                                                       log.debug("Cleared " + path + " in "
+                                                                       + workspaceName);
+                                       }
+                               }
+                               CommandHelpers.callCommand(RefreshDistributionsView.ID);
+                       } catch (RepositoryException re) {
+                               throw new ArgeoException(
+                                               "Unexpected error while deleting workspace ["
+                                                               + workspaceName + "].", re);
+                       } finally {
+                               if (session != null)
+                                       session.logout();
+                       }
+               }
+               return null;
+       }
+
+       /* DEPENDENCY INJECTION */
+       public void setRepository(Repository repository) {
+               this.repository = repository;
+       }
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/ManageWorkspaceAuth.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/ManageWorkspaceAuth.java
new file mode 100644 (file)
index 0000000..717e86b
--- /dev/null
@@ -0,0 +1,56 @@
+package org.argeo.slc.client.ui.dist.commands;
+
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.argeo.ArgeoException;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.client.ui.dist.wizards.ChangeRightsWizard;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Open a dialog to change rights on the root node of the current workspace.
+ */
+
+public class ManageWorkspaceAuth extends AbstractHandler {
+       // private static final Log log =
+       // LogFactory.getLog(ManageWorkspaceAuth.class);
+       public final static String ID = DistPlugin.ID + ".manageWorkspaceAuth";
+       public final static String PARAM_WORKSPACE_NAME = DistPlugin.ID
+                       + ".workspaceName";
+       public final static String DEFAULT_LABEL = "Manage Rights";
+       public final static String DEFAULT_ICON_PATH = "icons/changeRights.gif";
+
+       /* DEPENDENCY INJECTION */
+       private Repository repository;
+
+       private Session session;
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               String workspaceName = event.getParameter(PARAM_WORKSPACE_NAME);
+               try {
+                       session = repository.login(workspaceName);
+                       ChangeRightsWizard wizard = new ChangeRightsWizard(session);
+                       WizardDialog dialog = new WizardDialog(
+                                       HandlerUtil.getActiveShell(event), wizard);
+                       dialog.open();
+                       return null;
+               } catch (RepositoryException re) {
+                       throw new ArgeoException(
+                                       "Unexpected error while creating the new workspace.", re);
+               } finally {
+                       if (session != null)
+                               session.logout();
+               }
+       }
+
+       /* DEPENDENCY INJECTION */
+       public void setRepository(Repository repository) {
+               this.repository = repository;
+       }
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/NormalizeDistribution.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/NormalizeDistribution.java
new file mode 100644 (file)
index 0000000..e10e75f
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.commands;
+
+import javax.jcr.Node;
+import javax.jcr.Property;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.nodetype.NodeType;
+import javax.jcr.util.TraversingItemVisitor;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.jcr.JcrUtils;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.repo.ArtifactIndexer;
+import org.argeo.slc.repo.JarFileIndexer;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+
+/** Make sure than Maven and OSGi metadata are consistent */
+public class NormalizeDistribution extends AbstractHandler implements SlcNames {
+       public final static String ID = DistPlugin.ID + ".normalizeDistribution";
+       public final static String PARAM_WORKSPACE = "workspace";
+       public final static String DEFAULT_LABEL = "Normalize";
+       public final static String DEFAULT_ICON_PATH = "icons/addItem.gif";
+
+       private final static Log log = LogFactory
+                       .getLog(NormalizeDistribution.class);
+
+       private Repository repository;
+       private String artifactBasePath = "/";
+
+       private ArtifactIndexer artifactIndexer = new ArtifactIndexer();
+       private JarFileIndexer jarFileIndexer = new JarFileIndexer();
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               String workspace = event.getParameter(PARAM_WORKSPACE);
+               NormalizeJob job = new NormalizeJob(workspace);
+               job.setUser(true);
+               job.schedule();
+               return null;
+       }
+
+       public void setRepository(Repository repository) {
+               this.repository = repository;
+       }
+
+       private class NormalizeJob extends Job {
+               private String workspace;
+
+               public NormalizeJob(String workspace) {
+                       super("Normalize Distribution");
+                       this.workspace = workspace;
+               }
+
+               @Override
+               protected IStatus run(IProgressMonitor monitor) {
+                       Session session = null;
+                       try {
+                               session = repository.login(workspace);
+                               // QueryManager qm = session.getWorkspace().getQueryManager();
+                               // Query query = qm
+                               // .createQuery(
+                               // "select * from [nt:file] where NAME([nt:file]) like '%.jar'",
+                               // Query.JCR_SQL2);
+                               // // Query query = qm.createQuery("//*jar", Query.XPATH);
+                               // long count = query.execute().getRows().getSize();
+                               // if (log.isDebugEnabled())
+                               // log.debug("Count: " + count);
+                               // long count = query.execute().getRows().nextRow()
+                               // .getValue("count").getLong();
+                               monitor.beginTask("Normalize " + workspace, -1);
+                               NormalizingTraverser tiv = new NormalizingTraverser(monitor);
+                               session.getNode(artifactBasePath).accept(tiv);
+                       } catch (Exception e) {
+                               return new Status(IStatus.ERROR, DistPlugin.ID,
+                                               "Cannot normalize distribution " + workspace, e);
+                       } finally {
+                               JcrUtils.logoutQuietly(session);
+                       }
+                       return Status.OK_STATUS;
+               }
+
+       }
+
+       private class NormalizingTraverser extends TraversingItemVisitor {
+               IProgressMonitor monitor;
+
+               public NormalizingTraverser(IProgressMonitor monitor) {
+                       super();
+                       this.monitor = monitor;
+               }
+
+               @Override
+               protected void entering(Property property, int level)
+                               throws RepositoryException {
+               }
+
+               @Override
+               protected void entering(Node node, int level)
+                               throws RepositoryException {
+                       if (node.isNodeType(NodeType.NT_FILE)) {
+                               if (jarFileIndexer.support(node.getPath()))
+                                       if (artifactIndexer.support(node.getPath())) {
+                                               monitor.subTask(node.getName());
+                                               artifactIndexer.index(node);
+                                               jarFileIndexer.index(node);
+                                               node.getSession().save();
+                                               monitor.worked(1);
+                                               if (log.isDebugEnabled())
+                                                       log.debug("Processed " + node);
+                                       }
+                       }
+               }
+
+               @Override
+               protected void leaving(Property property, int level)
+                               throws RepositoryException {
+               }
+
+               @Override
+               protected void leaving(Node node, int level) throws RepositoryException {
+               }
+
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshArtifactBrowser.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshArtifactBrowser.java
new file mode 100644 (file)
index 0000000..addaf12
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.commands;
+
+import org.argeo.slc.client.ui.dist.views.ArtifactsBrowser;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Change visible state of the ArtifactBrower size column
+ */
+public class RefreshArtifactBrowser extends AbstractHandler {
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               ArtifactsBrowser view = (ArtifactsBrowser) HandlerUtil
+                               .getActiveWorkbenchWindow(event).getActivePage()
+                               .findView(ArtifactsBrowser.ID);
+               view.refresh(null);
+               return null;
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshDistributionOverviewPage.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshDistributionOverviewPage.java
new file mode 100644 (file)
index 0000000..243d12b
--- /dev/null
@@ -0,0 +1,35 @@
+package org.argeo.slc.client.ui.dist.commands;
+
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.client.ui.dist.editors.DistributionEditor;
+import org.argeo.slc.client.ui.dist.editors.DistributionOverviewPage;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.forms.editor.IFormPage;
+
+/**
+ * Force refresh of the Distribution overview page of the corresponding editor
+ */
+
+public class RefreshDistributionOverviewPage extends AbstractHandler {
+       // private static final Log log = LogFactory
+       // .getLog(RefreshDistributionOverviewPage.class);
+       public final static String ID = DistPlugin.ID
+                       + ".refreshDistributionOverviewPage";
+       public final static String DEFAULT_LABEL = "Refresh the distribution overview";
+       public final static String DEFAULT_ICON_PATH = "icons/refresh.png";
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               IWorkbenchPart activePart = DistPlugin.getDefault().getWorkbench()
+                               .getActiveWorkbenchWindow().getActivePage().getActivePart();
+               if (activePart instanceof DistributionEditor) {
+                       IFormPage ifp = ((DistributionEditor) activePart)
+                                       .getActivePageInstance();
+                       if (ifp instanceof DistributionOverviewPage)
+                               ((DistributionOverviewPage) ifp).refresh();
+               }
+               return null;
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshDistributionsView.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RefreshDistributionsView.java
new file mode 100644 (file)
index 0000000..a9ba0a9
--- /dev/null
@@ -0,0 +1,28 @@
+package org.argeo.slc.client.ui.dist.commands;
+
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.client.ui.dist.views.DistributionsView;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * Force refresh of the DistributionsView
+ */
+
+public class RefreshDistributionsView extends AbstractHandler {
+       // private static final Log log = LogFactory
+       // .getLog(RefreshDistributionsView.class);
+       public final static String ID = DistPlugin.ID + ".refreshDistributionsView";
+       public final static String DEFAULT_LABEL = "Refresh the distribution view";
+       public final static String DEFAULT_ICON_PATH = "icons/refresh.png";
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               IWorkbenchPart activePart = DistPlugin.getDefault().getWorkbench()
+                               .getActiveWorkbenchWindow().getActivePage().getActivePart();
+               if (activePart instanceof DistributionsView)
+                       ((DistributionsView) activePart).refresh();
+               return null;
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RunInOsgi.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/RunInOsgi.java
new file mode 100644 (file)
index 0000000..f274b4b
--- /dev/null
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.commands;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Property;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.query.QueryManager;
+import javax.jcr.query.QueryResult;
+import javax.jcr.query.qom.Ordering;
+import javax.jcr.query.qom.QueryObjectModel;
+import javax.jcr.query.qom.QueryObjectModelFactory;
+import javax.jcr.query.qom.Selector;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.jcr.JcrUtils;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+public class RunInOsgi extends AbstractHandler implements SlcNames {
+       private final static Log log = LogFactory.getLog(RunInOsgi.class);
+
+       private Repository repository;
+       private String workspace;
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               File targetDirectory = new File(
+                               "/home/mbaudier/dev/work/120517-ArgeoTP/" + workspace);
+
+               InputStream jarStream = null;
+               OutputStream out = null;
+               Writer writer = null;
+               Session session = null;
+               try {
+                       FileUtils.deleteDirectory(targetDirectory);
+                       targetDirectory.mkdirs();
+
+                       session = repository.login(workspace);
+                       NodeIterator bundles = listBundleArtifacts(session);
+
+                       List<File> files = new ArrayList<File>();
+                       bundles: while (bundles.hasNext()) {
+                               Node bundleNode = bundles.nextNode();
+                               String symbolicName = JcrUtils.get(bundleNode,
+                                               SLC_SYMBOLIC_NAME);
+
+                               // skip sources
+                               if (symbolicName.endsWith(".source"))
+                                       continue bundles;
+                               // skip eclipse
+                               if (symbolicName.startsWith("org.eclipse")
+                                               && !symbolicName.equals("org.eclipse.osgi"))
+                                       continue bundles;
+                               if (symbolicName.equals("org.polymap.openlayers.rap.widget"))
+                                       continue bundles;
+
+                               File targetFile = new File(targetDirectory,
+                                               bundleNode.getName());
+                               out = new FileOutputStream(targetFile);
+                               jarStream = bundleNode.getNode(Node.JCR_CONTENT)
+                                               .getProperty(Property.JCR_DATA).getBinary().getStream();
+                               IOUtils.copy(jarStream, out);
+                               if (!symbolicName.equals("org.eclipse.osgi"))
+                                       files.add(targetFile);
+                               if (log.isDebugEnabled())
+                                       log.debug("Copied " + targetFile.getName());
+
+                               IOUtils.closeQuietly(out);
+                               IOUtils.closeQuietly(jarStream);
+                       }
+
+                       StringBuffer osgiBundles = new StringBuffer("osgi.bundles=");
+                       for (int i = 0; i < files.size(); i++) {
+                               if (i != 0)
+                                       osgiBundles.append(',');
+                               osgiBundles.append(files.get(i).getName());
+                       }
+
+                       File confDir = new File(targetDirectory, "configuration");
+                       confDir.mkdirs();
+                       File confIni = new File(confDir, "config.ini");
+                       writer = new FileWriter(confIni);
+                       writer.write(osgiBundles.toString());
+                       IOUtils.closeQuietly(writer);
+               } catch (Exception e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       IOUtils.closeQuietly(jarStream);
+                       IOUtils.closeQuietly(out);
+                       IOUtils.closeQuietly(writer);
+                       JcrUtils.logoutQuietly(session);
+               }
+
+               return null;
+       }
+
+       static NodeIterator listBundleArtifacts(Session session)
+                       throws RepositoryException {
+               QueryManager queryManager = session.getWorkspace().getQueryManager();
+               QueryObjectModelFactory factory = queryManager.getQOMFactory();
+
+               final String bundleArtifactsSelector = "bundleArtifacts";
+               Selector source = factory.selector(SlcTypes.SLC_BUNDLE_ARTIFACT,
+                               bundleArtifactsSelector);
+
+               Ordering order = factory.ascending(factory.propertyValue(
+                               bundleArtifactsSelector, SlcNames.SLC_SYMBOLIC_NAME));
+               Ordering[] orderings = { order };
+
+               QueryObjectModel query = factory.createQuery(source, null, orderings,
+                               null);
+
+               QueryResult result = query.execute();
+               return result.getNodes();
+       }
+
+       public void setRepository(Repository repository) {
+               this.repository = repository;
+       }
+
+       public void setWorkspace(String workspace) {
+               this.workspace = workspace;
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/ShowSizeColumn.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/ShowSizeColumn.java
new file mode 100644 (file)
index 0000000..10ba035
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.commands;
+
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.client.ui.dist.views.ArtifactsBrowser;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.State;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Change visible state of the ArtifactBrower size column
+ */
+public class ShowSizeColumn extends AbstractHandler {
+       public final static String ID = DistPlugin.ID + ".showSizeColumn";
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               ArtifactsBrowser view = (ArtifactsBrowser) HandlerUtil
+                               .getActiveWorkbenchWindow(event).getActivePage()
+                               .findView(ArtifactsBrowser.ID);
+
+               ICommandService service = (ICommandService) PlatformUI.getWorkbench()
+                               .getService(ICommandService.class);
+               Command command = service.getCommand(ID);
+               State state = command.getState(ID + ".toggleState");
+       
+               boolean wasVisible = (Boolean) state.getValue();
+               view.setSizeVisible(!wasVisible);
+               state.setValue(!wasVisible);
+               return null;
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ArtifactDetailsPage.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ArtifactDetailsPage.java
new file mode 100644 (file)
index 0000000..23d0eb6
--- /dev/null
@@ -0,0 +1,370 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.editors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Property;
+import javax.jcr.PropertyIterator;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.nodetype.NodeType;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.argeo.slc.client.ui.dist.DistImages;
+import org.argeo.slc.client.ui.dist.utils.DistUiHelpers;
+import org.argeo.slc.client.ui.dist.utils.GenericDoubleClickListener;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+
+/**
+ * Generic editor property page. Lists all properties of current node as a
+ * complex tree. TODO: enable editing
+ */
+
+public class ArtifactDetailsPage extends FormPage implements SlcNames, SlcTypes {
+       private final static Log log = LogFactory.getLog(ArtifactDetailsPage.class);
+
+       // Main business Objects
+       private Node currentNode;
+
+       // This page widgets
+       private FormToolkit tk;
+       private TreeViewer complexTree;
+       private Text mavenSnippet;
+
+       public ArtifactDetailsPage(FormEditor editor, String title, Node currentNode) {
+               super(editor, "id", title);
+               this.currentNode = currentNode;
+       }
+
+       protected void createFormContent(IManagedForm managedForm) {
+               tk = managedForm.getToolkit();
+               ScrolledForm form = managedForm.getForm();
+               GridLayout layout = new GridLayout(1, false);
+               layout.marginWidth = 5;
+               form.getBody().setLayout(layout);
+
+               complexTree = createComplexTree(form.getBody());
+               createMavenSnipet(form.getBody());
+       }
+
+       private TreeViewer createComplexTree(Composite parent) {
+               int style = SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION;
+               Tree tree = new Tree(parent, style);
+               GridData gd = new GridData(GridData.FILL_BOTH);
+               gd.grabExcessHorizontalSpace = true;
+               gd.grabExcessVerticalSpace = true;
+               tree.setLayoutData(gd);
+               createColumn(tree, "Attribute", SWT.LEFT, 200);
+               createColumn(tree, "Value", SWT.LEFT, 200);
+               tree.setLinesVisible(true);
+               tree.setHeaderVisible(true);
+
+               TreeViewer result = new TreeViewer(tree);
+               result.setContentProvider(new TreeContentProvider());
+               result.setLabelProvider(new TreeLabelProvider());
+
+               result.setInput(currentNode);
+               result.expandToLevel(2);
+
+               result.addDoubleClickListener(new GenericDoubleClickListener(result));
+               // result.expandAll();
+               return result;
+       }
+
+       private void createMavenSnipet(Composite parent) {
+               mavenSnippet = new Text(parent, SWT.MULTI | SWT.WRAP | SWT.BORDER);
+               GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+               gd.grabExcessHorizontalSpace = true;
+               gd.heightHint = 75;
+               mavenSnippet.setLayoutData(gd);
+               mavenSnippet.setText(generateXmlSnippet());
+       }
+
+       // Helpers
+       private String generateXmlSnippet() {
+               try {
+                       StringBuffer sb = new StringBuffer();
+                       sb.append("<dependency>\n");
+                       sb.append("\t<groupeId>");
+                       sb.append(currentNode.getProperty(SLC_GROUP_ID).getString());
+                       sb.append("</groupeId>\n");
+                       sb.append("\t<artifactId>");
+                       sb.append(currentNode.getProperty(SLC_ARTIFACT_ID).getString());
+                       sb.append("</artifactId>\n");
+                       sb.append("\t<version>");
+                       sb.append(currentNode.getProperty(SLC_ARTIFACT_VERSION).getString());
+                       sb.append("</version>\n");
+                       sb.append("</dependency>");
+                       return sb.toString();
+               } catch (RepositoryException re) {
+                       throw new ArgeoException(
+                                       "unexpected error while generating maven snippet");
+               }
+       }
+
+       private static TreeColumn createColumn(Tree parent, String name, int style,
+                       int width) {
+               TreeColumn result = new TreeColumn(parent, style);
+               result.setText(name);
+               result.setWidth(width);
+               result.setMoveable(true);
+               result.setResizable(true);
+               return result;
+       }
+
+       // View specific object
+       private class ViewSpecificItems {
+               private String key;
+               private Object value;
+               private boolean isFolder;
+               private Node curNode;
+
+               public ViewSpecificItems(String key, Object value, boolean isFolder) {
+                       this.key = key;
+                       this.value = value;
+                       this.isFolder = isFolder;
+               }
+
+               public String getKey() {
+                       return key;
+               }
+
+               public void setNode(Node node) {
+                       this.curNode = node;
+               }
+
+               public Node getNode() {
+                       return curNode;
+               }
+
+               public Object getValue() {
+                       return value;
+               }
+
+               public boolean isFolder() {
+                       return isFolder;
+               }
+
+       }
+
+       // providers
+       private class TreeLabelProvider extends ColumnLabelProvider implements
+                       SlcTypes, SlcNames {
+
+               public void update(ViewerCell cell) {
+                       try {
+
+                               int colIndex = cell.getColumnIndex();
+                               Object element = cell.getElement();
+                               if (element instanceof Property) {
+                                       Property prop = (Property) element;
+                                       if (colIndex == 0)
+                                               cell.setText(DistUiHelpers.getLabelJcrName(prop
+                                                               .getName()));
+                                       else if (colIndex == 1)
+                                               cell.setText(DistUiHelpers.formatValueAsString(prop
+                                                               .getValue()));
+
+                               } else if (element instanceof ViewSpecificItems) {
+                                       if (colIndex == 0)
+                                               cell.setText(((ViewSpecificItems) element).getKey());
+                                       else if (colIndex == 1)
+                                               cell.setText(DistUiHelpers
+                                                               .formatAsString(((ViewSpecificItems) element)
+                                                                               .getValue()));
+
+                               } else if (element instanceof Node) {
+                                       Node node = (Node) element;
+                                       if (colIndex == 0) {
+                                               if (node.isNodeType(NodeType.NT_FILE)) {
+                                                       cell.setImage(DistImages.IMG_FILE);
+                                                       cell.setText(node.getName());
+                                               } else if (node.isNodeType(SLC_IMPORTED_PACKAGE))
+                                                       cell.setText("Import package");
+                                               else if (node.isNodeType(SLC_EXPORTED_PACKAGE))
+                                                       cell.setText("Export package");
+
+                                       } else if (colIndex == 1) {
+                                               if (node.isNodeType(SLC_ARTIFACT)) {
+                                                       StringBuffer sb = new StringBuffer("");
+                                                       if (node.hasProperty(SLC_ARTIFACT_CLASSIFIER)) {
+                                                               sb.append(node.getProperty(
+                                                                               SLC_ARTIFACT_CLASSIFIER).getString());
+                                                               sb.append(" ");
+                                                       }
+                                                       if (node.hasProperty(SLC_ARTIFACT_EXTENSION))
+                                                               sb.append(node.getProperty(
+                                                                               SLC_ARTIFACT_EXTENSION).getString());
+                                                       cell.setText(sb.toString());
+                                               } else if (node.isNodeType(SLC_IMPORTED_PACKAGE)
+                                                               || node.isNodeType(SLC_EXPORTED_PACKAGE))
+                                                       cell.setText(node.getProperty(SLC_NAME).getString());
+                                       }
+                               }
+                       } catch (RepositoryException e) {
+                               throw new ArgeoException(
+                                               "unexpected error while getting artifact information",
+                                               e);
+                       }
+               }
+       }
+
+       private class TreeContentProvider implements ITreeContentProvider {
+               public Object[] getElements(Object parent) {
+                       List<Object> elements = new ArrayList<Object>();
+
+                       try {
+                               Node node = (Node) parent;
+                               elements = new ArrayList<Object>();
+
+                               // Maven coordinates
+                               elements.add(node.getProperty(SLC_GROUP_ID));
+                               elements.add(node.getProperty(SLC_ARTIFACT_ID));
+                               elements.add(node.getProperty(SLC_ARTIFACT_VERSION));
+
+                               // Meta information
+                               // boolean gotSource = false;
+                               // // TODO: implement this check
+                               // elements.add(new ViewSpecificItems("Sources available",
+                               // gotSource));
+
+                               // Jars
+                               NodeIterator ni = node.getNodes();
+                               while (ni.hasNext()) {
+                                       Node child = ni.nextNode();
+                                       if (child.isNodeType(SLC_ARTIFACT)) {
+                                               // we skip sha1 files for the time being.
+                                               elements.add(child);
+                                       }
+                               }
+                       } catch (RepositoryException e) {
+                               throw new ArgeoException(
+                                               "Unexpected exception while listing node properties", e);
+                       }
+                       return elements.toArray();
+               }
+
+               public Object getParent(Object child) {
+                       return null;
+               }
+
+               public Object[] getChildren(Object parent) {
+                       Object[] result = null;
+                       try {
+                               if (parent instanceof Property) {
+                                       Property prop = (Property) parent;
+                                       if (prop.isMultiple()) {
+                                               Value[] values = prop.getValues();
+                                               return values;
+                                       }
+                               } else if (parent instanceof Node) {
+                                       Node node = (Node) parent;
+                                       if (node.hasNodes()) {
+                                               List<Object> elements = new ArrayList<Object>();
+                                               PropertyIterator pi = node.getProperties();
+                                               while (pi.hasNext()) {
+                                                       Property curProp = pi.nextProperty();
+                                                       if (!curProp.getName().startsWith("jcr:")
+                                                                       && !curProp.isMultiple())
+                                                               elements.add(curProp);
+                                               }
+
+                                               NodeIterator ni = node.getNodes();
+                                               while (ni.hasNext()) {
+                                                       Node curNode = ni.nextNode();
+                                                       if (curNode.isNodeType(SLC_IMPORTED_PACKAGE)
+                                                                       || curNode.isNodeType(SLC_EXPORTED_PACKAGE)) {
+                                                               ViewSpecificItems vsi = new ViewSpecificItems(
+                                                                               "Bundle dependencies", "", true);
+                                                               vsi.setNode(node);
+                                                               elements.add(vsi);
+                                                               break;
+                                                       }
+                                               }
+                                               return elements.toArray();
+                                       }
+                               } else if (parent instanceof ViewSpecificItems
+                                               && ((ViewSpecificItems) parent).isFolder()) {
+                                       NodeIterator ni = ((ViewSpecificItems) parent).getNode()
+                                                       .getNodes();
+                                       List<Node> elements = new ArrayList<Node>();
+                                       while (ni.hasNext()) {
+                                               Node curNode = ni.nextNode();
+                                               if (curNode.isNodeType(SLC_IMPORTED_PACKAGE)
+                                                               || curNode.isNodeType(SLC_EXPORTED_PACKAGE)) {
+                                                       elements.add(curNode);
+                                               }
+                                       }
+                                       return elements.toArray();
+                               }
+                       } catch (RepositoryException e) {
+                               throw new ArgeoException(
+                                               "Unexpected error getting multiple values property.", e);
+                       }
+                       return result;
+               }
+
+               public boolean hasChildren(Object parent) {
+                       try {
+                               if (parent instanceof Property
+                                               && ((Property) parent).isMultiple()) {
+                                       return true;
+                               } else if (parent instanceof Node && ((Node) parent).hasNodes()
+                                               && ((Node) parent).isNodeType(SLC_BUNDLE_ARTIFACT)) {
+                                       return true;
+                               } else if (parent instanceof ViewSpecificItems
+                                               && ((ViewSpecificItems) parent).isFolder()) {
+                                       return true;
+                               }
+                       } catch (RepositoryException e) {
+                               throw new ArgeoException(
+                                               "Unexpected exception while checking if property is multiple",
+                                               e);
+                       }
+                       return false;
+               }
+
+               public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+               }
+
+               public void dispose() {
+               }
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditor.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditor.java
new file mode 100644 (file)
index 0000000..4482504
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.editors;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.argeo.ArgeoException;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.jcr.SlcNames;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/**
+ * Editor to browse, analyze and modify an OSGi distribution
+ */
+public class DistributionEditor extends FormEditor implements SlcNames {
+       // private final static Log log =
+       // LogFactory.getLog(DistributionEditor.class);
+       public final static String ID = DistPlugin.ID + ".distributionEditor";
+
+       private Session session;
+
+       @Override
+       public void init(IEditorSite site, IEditorInput input)
+                       throws PartInitException {
+               DistributionEditorInput dei = (DistributionEditorInput) input;
+               try {
+                       session = dei.getRepository().login(dei.getWorkspaceName());
+               } catch (RepositoryException e) {
+                       throw new PartInitException("Cannot log to workspace "
+                                       + dei.getWorkspaceName(), e);
+               }
+               setPartName(dei.getWorkspaceName());
+               super.init(site, input);
+       }
+
+       @Override
+       protected void addPages() {
+               try {
+                       addPage(new DistributionOverviewPage(this, "Overview", session));
+               } catch (PartInitException e) {
+                       throw new ArgeoException("Cannot add distribution editor pages", e);
+               }
+       }
+
+       @Override
+       public void doSave(IProgressMonitor arg0) {
+       }
+
+       @Override
+       public void dispose() {
+               if (session != null)
+                       session.logout();
+               super.dispose();
+       }
+
+       @Override
+       public void doSaveAs() {
+       }
+
+       @Override
+       public boolean isSaveAsAllowed() {
+               return false;
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditorInput.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditorInput.java
new file mode 100644 (file)
index 0000000..38d9254
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.editors;
+
+import javax.jcr.Repository;
+
+import org.argeo.slc.jcr.SlcNames;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+
+/**
+ * An editor input pointing to a distribution
+ * */
+public class DistributionEditorInput implements IEditorInput, SlcNames {
+
+       private Repository repository;
+       private String workspaceName;
+       private String artifactsBase = "/";
+
+       public DistributionEditorInput(Repository repository, String workspaceName,
+                       String artifactsBase) {
+               super();
+               this.repository = repository;
+               this.workspaceName = workspaceName;
+               this.artifactsBase = artifactsBase;
+       }
+
+       public DistributionEditorInput(Repository repository, String workspaceName) {
+               this(repository, workspaceName, "/");
+       }
+
+       public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+               return null;
+       }
+
+       public boolean exists() {
+               return true;
+       }
+
+       public ImageDescriptor getImageDescriptor() {
+               return null;
+       }
+
+       // Dummy compulsory methods
+       public String getToolTipText() {
+               return workspaceName;
+       }
+
+       public String getName() {
+               return workspaceName;
+       }
+
+       public IPersistableElement getPersistable() {
+               return null;
+       }
+
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (!(obj instanceof DistributionEditorInput))
+                       return false;
+
+               DistributionEditorInput other = (DistributionEditorInput) obj;
+               return getRepository().equals(other.getRepository())
+                               && getWorkspaceName().equals(other.getWorkspaceName());
+       }
+
+       public Repository getRepository() {
+               return repository;
+       }
+
+       public String getWorkspaceName() {
+               return workspaceName;
+       }
+
+       public String getArtifactsBase() {
+               return artifactsBase;
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionOverviewPage.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionOverviewPage.java
new file mode 100644 (file)
index 0000000..54d2c3c
--- /dev/null
@@ -0,0 +1,308 @@
+package org.argeo.slc.client.ui.dist.editors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.query.QueryManager;
+import javax.jcr.query.QueryResult;
+import javax.jcr.query.qom.Ordering;
+import javax.jcr.query.qom.QueryObjectModel;
+import javax.jcr.query.qom.QueryObjectModelFactory;
+import javax.jcr.query.qom.Selector;
+
+import org.argeo.eclipse.ui.ErrorFeedback;
+import org.argeo.jcr.JcrUtils;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.client.ui.dist.commands.DeleteArtifacts;
+import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
+import org.argeo.slc.client.ui.dist.utils.NodeViewerComparator;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.osgi.framework.Constants;
+
+/** Table giving an overview of an OSGi distribution */
+public class DistributionOverviewPage extends FormPage implements SlcNames {
+       private TableViewer viewer;
+       private Session session;
+
+       private NodeViewerComparator comparator;
+
+       public DistributionOverviewPage(FormEditor formEditor, String title,
+                       Session session) {
+               super(formEditor, "distributionPage", title);
+               this.session = session;
+       }
+
+       @Override
+       protected void createFormContent(IManagedForm managedForm) {
+               ScrolledForm form = managedForm.getForm();
+               GridLayout layout = new GridLayout(1, false);
+               form.getBody().setLayout(layout);
+
+               // helpers to enable sorting by column
+               List<String> propertiesList = new ArrayList<String>();
+               List<Integer> propertyTypesList = new ArrayList<Integer>();
+
+               // Define the TableViewer
+               viewer = new TableViewer(form.getBody(), SWT.MULTI | SWT.H_SCROLL
+                               | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);
+
+               TableViewerColumn col = new TableViewerColumn(viewer,  SWT.V_SCROLL);
+               col.getColumn().setWidth(300);
+               col.getColumn().setText("Symbolic name");
+               col.setLabelProvider(new ColumnLabelProvider() {
+                       @Override
+                       public String getText(Object element) {
+                               return JcrUtils.get((Node) element, SLC_SYMBOLIC_NAME);
+                       }
+               });
+               col.getColumn().addSelectionListener(getSelectionAdapter(0));
+               propertiesList.add(SLC_SYMBOLIC_NAME);
+               propertyTypesList.add(PropertyType.STRING);
+
+               col = new TableViewerColumn(viewer, SWT.NONE);
+               col.getColumn().setWidth(100);
+               col.getColumn().setText("Version");
+               col.setLabelProvider(new ColumnLabelProvider() {
+                       @Override
+                       public String getText(Object element) {
+                               return JcrUtils.get((Node) element, SLC_BUNDLE_VERSION);
+                       }
+               });
+               col.getColumn().addSelectionListener(getSelectionAdapter(1));
+               propertiesList.add(SLC_BUNDLE_VERSION);
+               propertyTypesList.add(PropertyType.STRING);
+
+               col = new TableViewerColumn(viewer, SWT.NONE);
+               col.getColumn().setWidth(150);
+               col.getColumn().setText("Group ID");
+               col.setLabelProvider(new ColumnLabelProvider() {
+                       @Override
+                       public String getText(Object element) {
+                               return JcrUtils.get((Node) element, SLC_GROUP_ID);
+                       }
+               });
+               col.getColumn().addSelectionListener(getSelectionAdapter(2));
+               propertiesList.add(SLC_GROUP_ID);
+               propertyTypesList.add(PropertyType.STRING);
+
+               col = new TableViewerColumn(viewer, SWT.NONE);
+               col.getColumn().setWidth(300);
+               col.getColumn().setText("Name");
+               col.setLabelProvider(new ColumnLabelProvider() {
+                       @Override
+                       public String getText(Object element) {
+                               return JcrUtils.get((Node) element, SLC_
+                                               + Constants.BUNDLE_NAME);
+                       }
+               });
+               col.getColumn().addSelectionListener(getSelectionAdapter(3));
+               propertiesList.add(SLC_ + Constants.BUNDLE_NAME);
+               propertyTypesList.add(PropertyType.STRING);
+
+               final Table table = viewer.getTable();
+               table.setHeaderVisible(true);
+               table.setLinesVisible(true);
+               table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+               viewer.setContentProvider(new DistributionsContentProvider());
+               getSite().setSelectionProvider(viewer);
+
+               viewer.setInput(session);
+               comparator = new NodeViewerComparator(1,
+                               NodeViewerComparator.DESCENDING, propertiesList,
+                               propertyTypesList);
+               viewer.setComparator(comparator);
+
+               MenuManager menuManager = new MenuManager();
+               Menu menu = menuManager.createContextMenu(viewer.getTable());
+               menuManager.addMenuListener(new IMenuListener() {
+                       public void menuAboutToShow(IMenuManager manager) {
+                               contextMenuAboutToShow(manager);
+                       }
+               });
+               viewer.getTable().setMenu(menu);
+               getSite().registerContextMenu(menuManager, viewer);
+
+       }
+
+       @Override
+       public void setFocus() {
+               viewer.getTable().setFocus();
+       }
+
+       /** force refresh of the artifact list */
+       public void refresh() {
+               viewer.refresh();
+       }
+
+       /** Programatically configure the context menu */
+       protected void contextMenuAboutToShow(IMenuManager menuManager) {
+               IWorkbenchWindow window = DistPlugin.getDefault().getWorkbench()
+                               .getActiveWorkbenchWindow();
+
+               // Build conditions depending on element type (repo or workspace)
+
+               // Delete selected artifacts
+               CommandHelpers.refreshCommand(menuManager, window, DeleteArtifacts.ID,
+                               DeleteArtifacts.DEFAULT_LABEL,
+                               DeleteArtifacts.DEFAULT_ICON_PATH, true);
+
+       }
+
+       static NodeIterator listBundleArtifacts(Session session)
+                       throws RepositoryException {
+               QueryManager queryManager = session.getWorkspace().getQueryManager();
+               QueryObjectModelFactory factory = queryManager.getQOMFactory();
+
+               final String bundleArtifactsSelector = "bundleArtifacts";
+               Selector source = factory.selector(SlcTypes.SLC_BUNDLE_ARTIFACT,
+                               bundleArtifactsSelector);
+
+               Ordering order = factory.ascending(factory.propertyValue(
+                               bundleArtifactsSelector, SlcNames.SLC_SYMBOLIC_NAME));
+               Ordering[] orderings = { order };
+
+               QueryObjectModel query = factory.createQuery(source, null, orderings,
+                               null);
+
+               QueryResult result = query.execute();
+               return result.getNodes();
+       }
+
+       private SelectionAdapter getSelectionAdapter(final int index) {
+               SelectionAdapter selectionAdapter = new SelectionAdapter() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               Table table = viewer.getTable();
+                               comparator.setColumn(index);
+                               int dir = table.getSortDirection();
+                               if (table.getSortColumn() == table.getColumn(index)) {
+                                       dir = dir == SWT.UP ? SWT.DOWN : SWT.UP;
+                               } else {
+                                       dir = SWT.DOWN;
+                               }
+                               table.setSortDirection(dir);
+                               table.setSortColumn(table.getColumn(index));
+                               viewer.refresh();
+                       }
+               };
+               return selectionAdapter;
+       }
+
+       private static class DistributionsContentProvider implements
+                       IStructuredContentProvider {
+               private Session session;
+
+               public void dispose() {
+               }
+
+               public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+                       session = (Session) newInput;
+               }
+
+               public Object[] getElements(Object arg0) {
+                       try {
+                               List<Node> nodes = JcrUtils
+                                               .nodeIteratorToList(listBundleArtifacts(session));
+                               return nodes.toArray();
+                       } catch (RepositoryException e) {
+                               ErrorFeedback.show("Cannot list bundles", e);
+                               return null;
+                       }
+               }
+       }
+       //
+       // private class BoundedLayout extends Layout {
+       // protected Layout delegateLayout;
+       //
+       // protected Method computeSizeMethod;
+       // protected Method layoutMethod;
+       //
+       // protected boolean widthBound;
+       //
+       // public BoundedLayout(Layout delegateLayout, boolean widthBound) {
+       // setDelegateLayout(delegateLayout);
+       // this.widthBound = widthBound;
+       // }
+       //
+       // public Layout getDelegateLayout() {
+       // return delegateLayout;
+       // }
+       //
+       // public void setDelegateLayout(Layout delegateLayout) {
+       // this.delegateLayout = delegateLayout;
+       //
+       // try {
+       // computeSizeMethod = delegateLayout.getClass()
+       // .getDeclaredMethod("computeSize", Composite.class,
+       // int.class, int.class, boolean.class);
+       // computeSizeMethod.setAccessible(true);
+       //
+       // layoutMethod = delegateLayout.getClass().getDeclaredMethod(
+       // "layout", Composite.class, boolean.class);
+       // layoutMethod.setAccessible(true);
+       // } catch (Exception e) {
+       // throw new RuntimeException(e);
+       // }
+       // }
+       //
+       // @Override
+       // protected Point computeSize(Composite composite, int wHint, int hHint,
+       // boolean flushCache) {
+       // // get comp size to make sure we don't let any children exceed it
+       // Point compSize = composite.getSize();
+       //
+       // try {
+       // Point layoutComputedSize = (Point) computeSizeMethod.invoke(
+       // delegateLayout, composite, wHint, hHint, flushCache);
+       //
+       // if (widthBound) {
+       // layoutComputedSize.x = Math.min(compSize.x,
+       // layoutComputedSize.x);
+       // } else {
+       // layoutComputedSize.y = Math.min(compSize.y,
+       // layoutComputedSize.y);
+       // }
+       //
+       // return layoutComputedSize;
+       // } catch (Exception e) {
+       // throw new RuntimeException(e);
+       // }
+       // }
+       //
+       // @Override
+       // protected void layout(Composite composite, boolean flushCache) {
+       // try {
+       // layoutMethod.invoke(delegateLayout, composite, flushCache);
+       // } catch (Exception e) {
+       // throw new RuntimeException(e);
+       // }
+       // }
+       // }
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/GenericArtifactEditor.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/GenericArtifactEditor.java
new file mode 100644 (file)
index 0000000..137cef1
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.editors;
+
+import javax.jcr.Node;
+
+import org.argeo.ArgeoException;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/**
+ * 
+ * Container for the node editor page. At creation time, it takes a JCR Node
+ * that cannot be changed afterwards.
+ * 
+ */
+public class GenericArtifactEditor extends FormEditor {
+
+       // private final static Log log =
+       // LogFactory.getLog(GenericNodeEditor.class);
+       public final static String ID = DistPlugin.ID + ".genericArtifactEditor";
+
+       // business objects
+       private Node artifactNode;
+
+       // This Editor widgets
+       private ArtifactDetailsPage artifactDetailsPage;
+
+       public void init(IEditorSite site, IEditorInput input)
+                       throws PartInitException {
+               super.init(site, input);
+               GenericArtifactEditorInput gaei = (GenericArtifactEditorInput) getEditorInput();
+               artifactNode = gaei.getArtifactNode();
+               this.setPartName(gaei.getArtifactId());
+       }
+
+       @Override
+       protected void addPages() {
+               try {
+
+                       artifactDetailsPage = new ArtifactDetailsPage(this, "Main",
+                                       artifactNode);
+                       addPage(artifactDetailsPage);
+               } catch (PartInitException e) {
+                       throw new ArgeoException("Not able to add an empty page ", e);
+               }
+       }
+
+       @Override
+       public void doSaveAs() {
+               // unused compulsory method
+       }
+
+       @Override
+       public void doSave(IProgressMonitor monitor) {
+               try {
+                       // Automatically commit all pages of the editor
+                       commitPages(true);
+                       firePropertyChange(PROP_DIRTY);
+               } catch (Exception e) {
+                       throw new ArgeoException("Error while saving node", e);
+               }
+
+       }
+
+       @Override
+       public boolean isSaveAsAllowed() {
+               return true;
+       }
+
+       Node getArtifactNode() {
+               return artifactNode;
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/GenericArtifactEditorInput.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/GenericArtifactEditorInput.java
new file mode 100644 (file)
index 0000000..18e4cd9
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.editors;
+
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+
+import org.argeo.ArgeoException;
+import org.argeo.slc.jcr.SlcNames;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+
+/**
+ * An editor input based the JCR node object.
+ * */
+
+public class GenericArtifactEditorInput implements IEditorInput, SlcNames {
+
+       private final Node artifactNode;
+       // cache key properties at creation time to avoid Exception at recoring time
+       // when the session has been closed
+       private String artifactId;
+       private String groupId;
+       private String version;
+
+       public GenericArtifactEditorInput(Node artifactNode) {
+               this.artifactNode = artifactNode;
+               try {
+                       artifactId = artifactNode.getProperty(SLC_ARTIFACT_ID).getString();
+                       groupId = artifactNode.getProperty(SLC_GROUP_ID).getString();
+                       version = artifactNode.getProperty(SLC_ARTIFACT_VERSION)
+                                       .getString();
+               } catch (RepositoryException re) {
+                       throw new ArgeoException(
+                                       "unexpected error while getting node key values at creation time",
+                                       re);
+               }
+       }
+
+       public Node getArtifactNode() {
+               return artifactNode;
+       }
+
+       public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+               return null;
+       }
+
+       public boolean exists() {
+               return true;
+       }
+
+       public ImageDescriptor getImageDescriptor() {
+               return null;
+       }
+
+       public String getArtifactId() {
+               return artifactId;
+       }
+
+       public String getGroupId() {
+               return groupId;
+       }
+
+       public String getVersion() {
+               return version;
+       }
+
+       // Dummy compulsory methods
+       public String getToolTipText() {
+               return artifactId + ":" + groupId + ":" + version;
+       }
+
+       public String getName() {
+               return artifactId + ":" + groupId + ":" + version;
+       }
+
+       public IPersistableElement getPersistable() {
+               return null;
+       }
+
+       /**
+        * equals method based on coordinates
+        */
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+
+               GenericArtifactEditorInput other = (GenericArtifactEditorInput) obj;
+               if (!getGroupId().equals(other.getGroupId()))
+                       return false;
+               if (!getArtifactId().equals(other.getArtifactId()))
+                       return false;
+               if (!getVersion().equals(other.getVersion()))
+                       return false;
+               return true;
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/providers/ArtifactLabelProvider.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/providers/ArtifactLabelProvider.java
new file mode 100644 (file)
index 0000000..a8edf5a
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.providers;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+
+import javax.jcr.Node;
+import javax.jcr.Property;
+import javax.jcr.RepositoryException;
+
+import org.argeo.ArgeoException;
+import org.argeo.jcr.JcrUtils;
+import org.argeo.slc.client.ui.dist.DistConstants;
+import org.argeo.slc.client.ui.dist.DistImages;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.swt.graphics.Image;
+
+public class ArtifactLabelProvider extends ColumnLabelProvider implements
+               DistConstants, SlcTypes {
+
+       // To be able to change column order easily
+       public static final int COLUMN_TREE = 0;
+       public static final int COLUMN_DATE = 1;
+       public static final int COLUMN_SIZE = 2;
+
+       // Utils
+       protected static DateFormat timeFormatter = new SimpleDateFormat(
+                       DATE_TIME_FORMAT);
+
+       public void update(ViewerCell cell) {
+               int colIndex = cell.getColumnIndex();
+               Object element = cell.getElement();
+               cell.setText(getColumnText(element, colIndex));
+               if (element instanceof Node && colIndex == 0) {
+                       Node node = (Node) element;
+                       try {
+                               if (node.isNodeType(SLC_ARTIFACT_BASE))
+                                       cell.setImage(DistImages.IMG_ARTIFACT_BASE);
+                               else if (node.isNodeType(SLC_ARTIFACT_VERSION_BASE))
+                                       cell.setImage(DistImages.IMG_ARTIFACT_VERSION_BASE);
+                       } catch (RepositoryException e) {
+                               // Silent
+                       }
+               }
+       }
+
+       @Override
+       public Image getImage(Object element) {
+
+               if (element instanceof Node) {
+                       Node node = (Node) element;
+                       try {
+                               if (node.isNodeType(SLC_ARTIFACT_BASE)) {
+                                       return DistImages.IMG_ARTIFACT_BASE;
+                               } else if (node.isNodeType(SLC_ARTIFACT_VERSION_BASE)) {
+                                       return DistImages.IMG_ARTIFACT_VERSION_BASE;
+                               }
+                       } catch (RepositoryException e) {
+                               // Silent
+                       }
+               }
+               return null;
+       }
+
+       public String getColumnText(Object element, int columnIndex) {
+               try {
+                       if (element instanceof Node) {
+                               Node node = (Node) element;
+                               switch (columnIndex) {
+                               case COLUMN_TREE:
+                                       return node.getName();
+                               case COLUMN_SIZE:
+                                       long size = JcrUtils.getNodeApproxSize(node) / 1024;
+                                       if (size > 1024)
+                                               return size / 1024 + " MB";
+                                       else
+                                               return size + " KB";
+                               case COLUMN_DATE:
+                                       if (node.hasProperty(Property.JCR_LAST_MODIFIED))
+                                               return timeFormatter.format(node
+                                                               .getProperty(Property.JCR_LAST_MODIFIED)
+                                                               .getDate().getTime());
+                                       else
+                                               return null;
+                               }
+                       }
+               } catch (RepositoryException re) {
+                       throw new ArgeoException(
+                                       "Unexepected error while getting property values", re);
+               }
+               return null;
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/providers/ArtifactsTreeContentProvider.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/providers/ArtifactsTreeContentProvider.java
new file mode 100644 (file)
index 0000000..937290c
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.providers;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.RepositoryException;
+
+import org.argeo.ArgeoException;
+import org.argeo.eclipse.ui.jcr.utils.JcrItemsComparator;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+public class ArtifactsTreeContentProvider implements ITreeContentProvider,
+               SlcTypes {
+
+       // Utils
+       private boolean sortChildren = true;
+       private JcrItemsComparator itemComparator = new JcrItemsComparator();
+
+       public Object[] getElements(Object parent) {
+               return getChildren(parent);
+       }
+
+       public Object getParent(Object child) {
+               return null;
+       }
+
+       public Object[] getChildren(Object parent) {
+               Object[] elements = null;
+               try {
+                       if (parent instanceof Node) {
+                               Node node = (Node) parent;
+                               NodeIterator ni = node.getNodes();
+                               List<Node> nodesList = new ArrayList<Node>();
+                               while (ni.hasNext()) {
+                                       nodesList.add(ni.nextNode());
+                               }
+                               if (sortChildren) {
+                                       Node[] arr = (Node[]) nodesList.toArray(new Node[nodesList
+                                                       .size()]);
+                                       Arrays.sort(arr, itemComparator);
+                                       return arr;
+                               } else
+                                       return nodesList.toArray();
+
+                       }
+               } catch (RepositoryException e) {
+                       throw new ArgeoException(
+                                       "Unexpected exception while listing node properties", e);
+               }
+               return elements;
+       }
+
+       public boolean hasChildren(Object parent) {
+               try {
+                       if (parent instanceof Node) {
+                               Node curNode = (Node) parent;
+                               // We manually stop digging at this level
+                               if (curNode.isNodeType(SLC_ARTIFACT_VERSION_BASE))
+                                       return false;
+                               else if (curNode.hasNodes())
+                                       return true;
+                       }
+               } catch (RepositoryException e) {
+                       throw new ArgeoException(
+                                       "Unexpected exception while checking if property is multiple",
+                                       e);
+               }
+               return false;
+       }
+
+       public void setSortChildren(boolean sortChildren) {
+               this.sortChildren = sortChildren;
+       }
+
+       public boolean getSortChildren() {
+               return sortChildren;
+       }
+
+       public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+       }
+
+       public void dispose() {
+       }
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java
new file mode 100644 (file)
index 0000000..0d40a62
--- /dev/null
@@ -0,0 +1,212 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.utils;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.query.Row;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.argeo.eclipse.ui.GenericTableComparator;
+import org.argeo.slc.client.ui.dist.DistConstants;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.TableColumn;
+
+/**
+ * Centralizes and factorizes useful methods to create and manage tables that
+ * display artifacts for both editors and views.
+ */
+public class ArtifactsTableConfigurer implements SlcNames, SlcTypes,
+               DistConstants {
+       private final static Log log = LogFactory
+                       .getLog(ArtifactsTableConfigurer.class);
+       // Used in the comparator to be able to retrieve the value from a row
+       // knowing the corresponding column index.
+       private Map<Integer, String> indexToName = new HashMap<Integer, String>();
+
+       private CurrentTableComparator comparator;
+       private TableViewer viewer;
+
+       protected DateFormat timeFormatter = new SimpleDateFormat(DATE_TIME_FORMAT);
+
+       /**
+        * Create and initialize the table configurer.
+        */
+       public ArtifactsTableConfigurer(TableViewer viewer,
+                       int defaultSortColumnIndex, int direction) {
+               this.viewer = viewer;
+               comparator = new CurrentTableComparator(defaultSortColumnIndex,
+                               direction);
+       }
+
+       public GenericTableComparator getComparator() {
+               return comparator;
+       }
+
+       /**
+        * Configure column width and header label depending on the value that will
+        * be displayed in the current column.
+        * 
+        * @param jcrColumnName
+        * @param column
+        * @param columnIndex
+        */
+       public void configureColumn(String jcrColumnName, TableViewerColumn column,
+                       int columnIndex) {
+
+               if (columnIndex != -1
+                               && getSelectionAdapter(column.getColumn(), columnIndex) != null) {
+                       column.getColumn().addSelectionListener(
+                                       getSelectionAdapter(column.getColumn(), columnIndex));
+                       indexToName.put(new Integer(columnIndex), jcrColumnName);
+               }
+               Object[] objs = DistUiHelpers
+                               .getLabelAndDefaultValueWidth(jcrColumnName);
+               column.getColumn().setWidth((Integer) objs[1]);
+               column.getColumn().setText((String) objs[0]);
+       }
+
+       /**
+        * Might be used by client classes to sort the table with based on selected
+        * columns.
+        * 
+        * @param column
+        * @param index
+        * @return
+        */
+       public SelectionAdapter getSelectionAdapter(final TableColumn column,
+                       final int index) {
+
+               // A comparator must be define
+               if (comparator == null)
+                       return null;
+
+               SelectionAdapter selectionAdapter = new SelectionAdapter() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+
+                               try {
+
+                                       comparator.setColumn(index);
+                                       int dir = viewer.getTable().getSortDirection();
+                                       if (viewer.getTable().getSortColumn() == column) {
+                                               dir = dir == SWT.UP ? SWT.DOWN : SWT.UP;
+                                       } else {
+
+                                               dir = SWT.DOWN;
+                                       }
+                                       viewer.getTable().setSortDirection(dir);
+                                       viewer.getTable().setSortColumn(column);
+                                       viewer.refresh();
+                               } catch (Exception exc) {
+                                       exc.printStackTrace();
+                               }
+                       }
+               };
+               return selectionAdapter;
+       }
+
+       /**
+        * provides a label provider that returns the content of a specific cell.
+        * Specific treatment is done for some columns when the query returns a code
+        * that must be translated to the corresponding value at display time.
+        */
+       public ColumnLabelProvider getLabelProvider(final String columnName) {
+               boolean test = false;
+
+               if (test) {
+                       return new ColumnLabelProvider() {
+                               public String getText(Object element) {
+                                       return null;
+                               }
+
+                               public Image getImage(Object element) {
+                                       return null;
+                               }
+                       };
+               } else
+                       return new ColumnLabelProvider() {
+                               public String getText(Object element) {
+                                       Row row = (Row) element;
+                                       try {
+                                               return row.getValue(columnName).getString();
+                                       } catch (RepositoryException e) {
+                                               throw new ArgeoException("Cannot display row " + row, e);
+                                       }
+                               }
+
+                               public Image getImage(Object element) {
+                                       return null;
+                               }
+                       };
+       }
+
+       /** Implements comparator for various types of Artifact Table row */
+       private class CurrentTableComparator extends GenericTableComparator {
+
+               public CurrentTableComparator(int colIndex, int direction) {
+                       super(colIndex, direction);
+               }
+
+               @Override
+               public int compare(Viewer viewer, Object e1, Object e2) {
+                       int rc = 0;
+
+                       if (e1 instanceof Row) {
+                               try {
+
+                                       Value v1 = ((Row) e1).getValue(indexToName
+                                                       .get(propertyIndex));
+                                       Value v2 = ((Row) e2).getValue(indexToName
+                                                       .get(propertyIndex));
+
+                                       if (v1.getType() == PropertyType.STRING)
+                                               rc = v1.getString().compareTo(v2.getString());
+                                       else if (v1.getType() == PropertyType.DATE)
+                                               rc = v1.getDate().compareTo(v2.getDate());
+                                       else
+                                               throw new ArgeoException("comparator for object type "
+                                                               + v1.getType() + " is not yet implemented");
+                               } catch (Exception e) {
+                                       throw new ArgeoException("rows cannot be compared ", e);
+                               }
+                       } else
+                               throw new ArgeoException("Unsupported row type");
+                       // If descending order, flip the direction
+                       if (direction == DESCENDING) {
+                               rc = -rc;
+                       }
+                       return rc;
+               }
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/CommandHelpers.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/CommandHelpers.java
new file mode 100644 (file)
index 0000000..ebd8826
--- /dev/null
@@ -0,0 +1,144 @@
+package org.argeo.slc.client.ui.dist.utils;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.argeo.ArgeoException;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.Parameterization;
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.menus.CommandContributionItem;
+import org.eclipse.ui.menus.CommandContributionItemParameter;
+import org.eclipse.ui.services.IServiceLocator;
+
+/**
+ * Centralizes useful methods to manage command updates
+ */
+public class CommandHelpers {
+
+       /**
+        * Refresh the given command. 
+        */
+       public static void refreshCommand(IMenuManager menuManager,
+                       IServiceLocator locator, String cmdId, String label, String iconPath,
+                       boolean showCommand) {
+               IContributionItem ici = menuManager.find(cmdId);
+               if (ici != null)
+                       menuManager.remove(ici);
+
+               if (showCommand) {
+                       // Set Params
+                       CommandContributionItemParameter contributionItemParameter = new CommandContributionItemParameter(
+                                       locator, null, cmdId, SWT.PUSH);
+                       contributionItemParameter.label = label;
+                       contributionItemParameter.icon = DistPlugin.getImageDescriptor(iconPath);
+                       CommandContributionItem cci = new CommandContributionItem(
+                                       contributionItemParameter);
+                       cci.setId(cmdId);
+                       menuManager.add(cci);
+               }
+       }
+
+       /**
+        * Refresh the given command and optionally corresponding parameters.
+        * 
+        * @param menuManager
+        * @param locator
+        * @param cmdId
+        * @param label
+        * @param showCommand
+        *            Command must be explicitly removed from the context menu at
+        *            each refresh setting this to false.
+        * @param params
+        *            maps a paramId with a String value
+        */
+       public static void refreshParameterizedCommand(IMenuManager menuManager,
+                       IServiceLocator locator, String cmdId, String label, String iconPath,
+                       boolean showCommand, Map<String, String> params) {
+               IContributionItem ici = menuManager.find(cmdId);
+               if (ici != null)
+                       menuManager.remove(ici);
+               
+               if (showCommand) {
+                       // Set Params
+                       CommandContributionItemParameter contributionItemParameter = new CommandContributionItemParameter(
+                                       locator, null, cmdId, SWT.PUSH);
+                       contributionItemParameter.label = label;
+                       contributionItemParameter.icon = DistPlugin.getImageDescriptor(iconPath);
+
+                       if (params != null)
+                               contributionItemParameter.parameters = params;
+
+                       CommandContributionItem cci = new CommandContributionItem(
+                                       contributionItemParameter);
+                       cci.setId(cmdId);
+                       menuManager.add(cci);
+               }
+       }
+
+       /** Helper to call a command without parameter easily */
+       public static void callCommand(String commandID) {
+               callCommand(commandID, null);
+       }
+
+       /** Helper to call a command with a single parameter easily */
+       public static void callCommand(String commandID, String parameterID,
+                       String parameterValue) {
+               Map<String, String> params = new HashMap<String, String>();
+               params.put(parameterID, parameterValue);
+               callCommand(commandID, params);
+       }
+
+       /**
+        * Helper to call a command with a map of parameters easily
+        * 
+        * @param paramMap
+        *            a map that links various commands ids with corresponding
+        *            String values.
+        */
+       public static void callCommand(String commandID,
+                       Map<String, String> paramMap) {
+               try {
+                       IWorkbench iw = DistPlugin.getDefault().getWorkbench();
+                       IHandlerService handlerService = (IHandlerService) iw
+                                       .getService(IHandlerService.class);
+                       ICommandService cmdService = (ICommandService) iw
+                                       .getActiveWorkbenchWindow().getService(
+                                                       ICommandService.class);
+                       Command cmd = cmdService.getCommand(commandID);
+
+                       ArrayList<Parameterization> parameters = null;
+                       ParameterizedCommand pc; 
+
+                       if (paramMap != null) {
+                               // Set parameters of the command to launch :
+                               parameters = new ArrayList<Parameterization>();
+                               Parameterization parameterization;
+                               for (String id : paramMap.keySet()) {
+                                       parameterization = new Parameterization(
+                                                       cmd.getParameter(id), paramMap.get(id));
+                                       parameters.add(parameterization);
+                               }
+                               pc = new ParameterizedCommand(cmd,
+                                               parameters.toArray(new Parameterization[parameters.size()]));
+                       } else 
+                               pc = new ParameterizedCommand(cmd, null);
+                       
+                       // build the parameterized command
+                       // execute the command
+                       handlerService.executeCommand(pc, null);
+               } catch (Exception e) {
+                       throw new ArgeoException(
+                                       "Unexepected exception while opening node editor", e);
+               }
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/DistUiHelpers.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/DistUiHelpers.java
new file mode 100644 (file)
index 0000000..ce39103
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.utils;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.argeo.slc.client.ui.dist.DistConstants;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.SlcTypes;
+
+public class DistUiHelpers implements DistConstants, SlcTypes, SlcNames {
+       private final static Log log = LogFactory.getLog(DistUiHelpers.class);
+       private final static DateFormat df = new SimpleDateFormat(DATE_TIME_FORMAT);
+
+       /**
+        * Returns a user-friendly label for a given jcr property name. If the
+        * corresponding mapping is not found, the input String is returned. If
+        * input String is null "(No name)" is returned
+        */
+       public static String getLabelJcrName(String jcrName) {
+               return (String) getLabelAndDefaultValueWidth(jcrName)[0];
+       }
+
+       /**
+        * Returns a label ( (String) object[0] )and default value width ( (int)
+        * object[1] ) for a given property name
+        */
+       public static Object[] getLabelAndDefaultValueWidth(String propertyName) {
+               // to avoid npe :
+               if (propertyName == null)
+                       return new Object[] { "(No name)", 60 };
+
+               // ArtifactId
+               if (propertyName.equals(SLC_ARTIFACT + "." + SLC_ARTIFACT_ID)
+                               || propertyName.equals(SLC_ARTIFACT_BASE + "."
+                                               + SLC_ARTIFACT_ID)
+                               || propertyName.equals(SLC_ARTIFACT_VERSION_BASE + "."
+                                               + SLC_ARTIFACT_ID)
+                               || propertyName.equals(SLC_ARTIFACT_ID)) {
+                       return new Object[] { "Artifact ID", 200 };
+               } // GroupId
+               else if (propertyName.equals(SLC_ARTIFACT + "." + SLC_GROUP_ID)
+                               || propertyName.equals(SLC_ARTIFACT_BASE + "." + SLC_GROUP_ID)
+                               || propertyName.equals(SLC_ARTIFACT_VERSION_BASE + "."
+                                               + SLC_GROUP_ID) || propertyName.equals(SLC_GROUP_ID)) {
+                       return new Object[] { "Group ID", 120 };
+               } // Version
+               else if (propertyName.equals(SLC_ARTIFACT + "." + SLC_ARTIFACT_VERSION)
+                               || propertyName.equals(SLC_ARTIFACT_VERSION_BASE + "."
+                                               + SLC_ARTIFACT_VERSION)
+                               || propertyName.equals(SLC_ARTIFACT_VERSION)) {
+                       return new Object[] { "Version", 60 };
+               } else if (propertyName.equals(SLC_ARTIFACT + "."
+                               + SLC_ARTIFACT_CLASSIFIER)
+                               || propertyName.equals(SLC_ARTIFACT_CLASSIFIER)) {
+                       return new Object[] { "Classifier", 60 };
+               } else if (propertyName.equals(SLC_ARTIFACT + "."
+                               + SLC_ARTIFACT_EXTENSION)
+                               || propertyName.equals(SLC_ARTIFACT_EXTENSION)) {
+                       return new Object[] { "Type", 40 };
+               } else if (propertyName.equals(SLC_BUNDLE_ARTIFACT + "."
+                               + SLC_SYMBOLIC_NAME)
+                               || propertyName.equals(SLC_SYMBOLIC_NAME)) {
+                       return new Object[] { "Symbolic name", 180 };
+               } else if (propertyName.equals(SLC_BUNDLE_ARTIFACT + "."
+                               + SLC_BUNDLE_VERSION)
+                               || propertyName.equals(SLC_BUNDLE_VERSION)) {
+                       return new Object[] { "Bundle version", 120 };
+               } else if (propertyName
+                               .equals(SLC_BUNDLE_ARTIFACT + "." + SLC_MANIFEST)
+                               || propertyName.equals(SLC_MANIFEST)) {
+                       return new Object[] { "Manifest", 60 };
+               } // TODO remove hard coded strings
+               else if (propertyName.equals("slc:Bundle-ManifestVersion")) {
+                       return new Object[] { "Bundle Manifest Version", 60 };
+               } else if (propertyName.equals("slc:Manifest-Version")) {
+                       return new Object[] { "Manifest Version", 60 };
+               } else if (propertyName.equals("slc:Bundle-Vendor")) {
+                       return new Object[] { "Bundle Vendor", 60 };
+               } else if (propertyName.equals("slc:Bundle-SymbolicName")) {
+                       return new Object[] { "Bundle symbolic name", 60 };
+               } else if (propertyName.equals("slc:Bundle-Name")) {
+                       return new Object[] { "Bundle name", 60 };
+               } else if (propertyName.equals("slc:Bundle-DocURL")) {
+                       return new Object[] { "Doc URL", 120 };
+               } else if (propertyName.equals("slc:Bundle-Licence")) {
+                       return new Object[] { "Bundle licence", 120 };
+               } else if (propertyName.equals(SLC_ARTIFACT_VERSION_BASE + "."
+                               + JCR_IDENTIFIER)) {
+                       return new Object[] { "UUID", 0 };
+               } else {
+                       if (log.isTraceEnabled())
+                               log.trace("No Column label provider defined for property: ["
+                                               + propertyName + "]");
+                       return new Object[] { propertyName, 60 };
+               }
+       }
+
+       public static String formatValueAsString(Value value) {
+               try {
+                       String strValue;
+
+                       if (value.getType() == PropertyType.BINARY)
+                               strValue = "<binary>";
+                       else if (value.getType() == PropertyType.DATE)
+                               strValue = df.format(value.getDate().getTime());
+                       else
+                               strValue = value.getString();
+                       return strValue;
+               } catch (RepositoryException e) {
+                       throw new ArgeoException("unexpected error while formatting value",
+                                       e);
+               }
+       }
+
+       public static String formatAsString(Object value) {
+               String strValue;
+               if (value instanceof Calendar)
+                       strValue = df.format(((Calendar) value).getTime());
+               else
+                       strValue = value.toString();
+               return strValue;
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/GenericDoubleClickListener.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/GenericDoubleClickListener.java
new file mode 100644 (file)
index 0000000..d18b3f0
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.utils;
+
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.nodetype.NodeType;
+import javax.jcr.query.Row;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.argeo.eclipse.ui.jcr.utils.JcrFileProvider;
+import org.argeo.eclipse.ui.specific.FileHandler;
+import org.argeo.slc.client.ui.dist.DistConstants;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.client.ui.dist.editors.GenericArtifactEditor;
+import org.argeo.slc.client.ui.dist.editors.GenericArtifactEditorInput;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * Centralizes the management of double click on an ArtifactTreeViewer
+ */
+public class GenericDoubleClickListener implements IDoubleClickListener,
+               SlcTypes, SlcNames, DistConstants {
+
+       private final static Log log = LogFactory
+                       .getLog(GenericDoubleClickListener.class);
+
+       private TreeViewer viewer;
+
+       private JcrFileProvider jfp;
+       private FileHandler fileHandler;
+
+       public GenericDoubleClickListener(TreeViewer viewer) {
+               this.viewer = viewer;
+               jfp = new JcrFileProvider();
+               fileHandler = new FileHandler(jfp);
+       }
+
+       public void doubleClick(DoubleClickEvent event) {
+               if (event.getSelection() == null || event.getSelection().isEmpty())
+                       return;
+               Object obj = ((IStructuredSelection) event.getSelection())
+                               .getFirstElement();
+               try {
+                       if (obj instanceof Node) {
+                               Node node = (Node) obj;
+                               if (node.isNodeType(SLC_ARTIFACT_VERSION_BASE)) {
+                                       GenericArtifactEditorInput gaei = new GenericArtifactEditorInput(
+                                                       node);
+                                       DistPlugin.getDefault().getWorkbench()
+                                                       .getActiveWorkbenchWindow().getActivePage()
+                                                       .openEditor(gaei, GenericArtifactEditor.ID);
+                               } else if (node.isNodeType(NodeType.NT_FILE)) {
+                                       String name = node.getName();
+                                       String id = node.getIdentifier();
+                                       jfp.setReferenceNode(node);
+                                       fileHandler.openFile(name, id);
+                               }
+
+                       } else if (obj instanceof Row) {
+                               Row row = (Row) obj;
+                               // String uuid;
+                               // try {
+                               // uuid = row.getValue(
+                               // SLC_ARTIFACT_VERSION_BASE + "." + JCR_IDENTIFIER)
+                               // .getString();
+                               // } catch (ItemNotFoundException infe) {
+                               // MessageDialog.openError(DistPlugin.getDefault()
+                               // .getWorkbench().getActiveWorkbenchWindow()
+                               // .getShell(), "Invalid request",
+                               // "The request must return a value for "
+                               // + SLC_ARTIFACT_VERSION_BASE + "."
+                               // + JCR_IDENTIFIER
+                               // + " in order to open the artifact editor");
+                               // return;
+                               // }
+                               // Node node =
+                               // row.getNode(SLC_ARTIFACT_VERSION_BASE).getSession()
+                               // .getNodeByIdentifier(uuid);
+
+                               Node node = row.getNode(SLC_ARTIFACT_VERSION_BASE);
+                               if (node == null)
+                                       MessageDialog.openError(DistPlugin.getDefault()
+                                                       .getWorkbench().getActiveWorkbenchWindow()
+                                                       .getShell(), "Invalid request",
+                                                       "The request must return a "
+                                                                       + SLC_ARTIFACT_VERSION_BASE + " node "
+                                                                       + " in order to open the artifact editor");
+                               else {
+                                       GenericArtifactEditorInput gaei = new GenericArtifactEditorInput(
+                                                       node);
+                                       DistPlugin.getDefault().getWorkbench()
+                                                       .getActiveWorkbenchWindow().getActivePage()
+                                                       .openEditor(gaei, GenericArtifactEditor.ID);
+                               }
+                       }
+               } catch (RepositoryException re) {
+                       throw new ArgeoException(
+                                       "Repository error while getting node info", re);
+               } catch (PartInitException pie) {
+                       throw new ArgeoException(
+                                       "Unexepected exception while opening artifact editor", pie);
+               }
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/NodeViewerComparator.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/utils/NodeViewerComparator.java
new file mode 100644 (file)
index 0000000..8a0ad60
--- /dev/null
@@ -0,0 +1,151 @@
+package org.argeo.slc.client.ui.dist.utils;
+
+import java.math.BigDecimal;
+import java.util.Calendar;
+import java.util.List;
+
+import javax.jcr.Node;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.ValueFormatException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.argeo.eclipse.ui.GenericTableComparator;
+import org.eclipse.jface.viewers.Viewer;
+
+public class NodeViewerComparator extends GenericTableComparator {
+       private final static Log log = LogFactory
+                       .getLog(NodeViewerComparator.class);
+
+       protected List<String> propertiesList;
+       protected List<Integer> propertyTypesList;
+       protected Integer propertyType;
+       protected String property;
+
+       public NodeViewerComparator(int defaultColIndex, int defaultDirection,
+                       List<String> propertiesList, List<Integer> propertyTypesList) {
+               super(defaultColIndex, defaultDirection);
+               this.propertiesList = propertiesList;
+               this.propertyTypesList = propertyTypesList;
+               this.propertyIndex = defaultColIndex;
+               this.propertyType = propertyTypesList.get(defaultColIndex);
+               this.property = propertiesList.get(defaultColIndex);
+               setColumn(defaultColIndex);
+       }
+
+       @Override
+       public int compare(Viewer viewer, Object e1, Object e2) {
+               int rc = 0;
+               long lc = 0;
+
+               try {
+                       Node n1 = (Node) e1;
+                       Node n2 = (Node) e2;
+
+                       Value v1 = null;
+                       Value v2 = null;
+                       if (n1.hasProperty(property))
+                               v1 = n1.getProperty(property).getValue();
+                       if (n2.hasProperty(property))
+                               v2 = n2.getProperty(property).getValue();
+
+                       if (v2 == null && v1 == null)
+                               return 0;
+                       else if (v2 == null)
+                               return -1;
+                       else if (v1 == null)
+                               return 1;
+
+                       switch (propertyType) {
+                       case PropertyType.STRING:
+                               rc = v1.getString().compareTo(v2.getString());
+                               break;
+                       case PropertyType.BOOLEAN:
+                               boolean b1 = v1.getBoolean();
+                               boolean b2 = v2.getBoolean();
+                               if (b1 == b2)
+                                       rc = 0;
+                               else
+                                       // we assume true is greater than false
+                                       rc = b1 ? 1 : -1;
+                               break;
+                       case PropertyType.DATE:
+                               Calendar c1 = v1.getDate();
+                               Calendar c2 = v2.getDate();
+                               if (c1 == null || c2 == null)
+                                       log.trace("undefined date");
+                               lc = c1.getTimeInMillis() - c2.getTimeInMillis();
+                               if (lc < Integer.MIN_VALUE)
+                                       // rc = Integer.MIN_VALUE;
+                                       rc = -1;
+                               else if (lc > Integer.MAX_VALUE)
+                                       // rc = Integer.MAX_VALUE;
+                                       rc = 1;
+                               else
+                                       rc = (int) lc;
+                               break;
+                       case PropertyType.LONG:
+                               long l1;
+                               long l2;
+                               // FIXME sometimes an empty string is set instead of the id 
+                               try {
+                                       l1 = v1.getLong();
+                               } catch (ValueFormatException ve) {
+                                       l1 = 0;
+                               }
+                               try {
+                                       l2 = v2.getLong();
+                               } catch (ValueFormatException ve) {
+                                       l2 = 0;
+                               }
+
+                               lc = l1 - l2;
+                               if (lc < Integer.MIN_VALUE)
+                                       // rc = Integer.MIN_VALUE;
+                                       rc = -1;
+                               else if (lc > Integer.MAX_VALUE)
+                                       // rc = Integer.MAX_VALUE;
+                                       rc = 1;
+                               else
+                                       rc = (int) lc;
+                               break;
+                       case PropertyType.DECIMAL:
+                               BigDecimal bd1 = v1.getDecimal();
+                               BigDecimal bd2 = v2.getDecimal();
+                               rc = bd1.compareTo(bd2);
+                               break;
+                       default:
+                               throw new ArgeoException(
+                                               "Unimplemented comparaison for PropertyType "
+                                                               + propertyType);
+                       }
+
+                       // If descending order, flip the direction
+                       if (direction == DESCENDING) {
+                               rc = -rc;
+                       }
+
+               } catch (RepositoryException re) {
+                       throw new ArgeoException("Unexpected error "
+                                       + "while comparing nodes", re);
+               }
+               return rc;
+       }
+
+       @Override
+       public void setColumn(int column) {
+               if (column == this.propertyIndex) {
+                       // Same column as last sort; toggle the direction
+                       direction = 1 - direction;
+               } else {
+                       // New column; do a descending sort
+                       this.propertyIndex = column;
+                       this.propertyType = propertyTypesList.get(column);
+                       this.property = propertiesList.get(column);
+                       direction = ASCENDING;
+               }
+       }
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/AbstractQueryArtifactsView.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/AbstractQueryArtifactsView.java
new file mode 100644 (file)
index 0000000..940d868
--- /dev/null
@@ -0,0 +1,231 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.views;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.query.Query;
+import javax.jcr.query.QueryResult;
+import javax.jcr.query.Row;
+import javax.jcr.query.RowIterator;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.argeo.eclipse.ui.GenericTableComparator;
+import org.argeo.slc.client.ui.dist.utils.ArtifactsTableConfigurer;
+import org.argeo.slc.client.ui.dist.utils.GenericDoubleClickListener;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.part.ViewPart;
+
+/** Factorizes useful methods to build a query view in a sashForm */
+public abstract class AbstractQueryArtifactsView extends ViewPart implements
+               SlcTypes {
+       private static final Log log = LogFactory
+                       .getLog(AbstractQueryArtifactsView.class);
+
+       // shortcuts
+       final protected static String SAVB = "[" + SLC_ARTIFACT_VERSION_BASE + "]";
+       final protected static String SBA = "[" + SLC_BUNDLE_ARTIFACT + "]";
+       final protected static String SIP = "[" + SLC_IMPORTED_PACKAGE + "]";
+       final protected static String SEP = "[" + SLC_EXPORTED_PACKAGE + "]";
+
+       /* DEPENDENCY INJECTION */
+       private Session session;
+       private List<String> columnProperties;
+
+       // This page widgets
+       private TableViewer viewer;
+       private List<TableViewerColumn> tableViewerColumns = new ArrayList<TableViewerColumn>();
+       private ArtifactsTableConfigurer tableConfigurer;
+       private GenericTableComparator comparator;
+
+       // to be set by client to display all columns
+       private boolean displayAllColumns = false;
+
+       protected void createResultPart(Composite parent) {
+               viewer = new TableViewer(parent);
+               Table table = viewer.getTable();
+               table.getParent().setLayout(new GridLayout(1, false));
+               table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+               viewer.getTable().setHeaderVisible(true);
+               viewer.getTable().setLinesVisible(true);
+
+               viewer.setLabelProvider(new ViewLabelProvider());
+               viewer.setContentProvider(new ViewContentProvider());
+               viewer.addDoubleClickListener(new GenericDoubleClickListener(null));
+
+               tableConfigurer = new ArtifactsTableConfigurer(viewer, 1,
+                               GenericTableComparator.DESCENDING);
+
+               comparator = tableConfigurer.getComparator();
+               viewer.setComparator(comparator);
+       }
+
+       protected void executeQuery(String statement) {
+               try {
+                       Calendar stStamp = new GregorianCalendar();
+                       if (log.isDebugEnabled()) {
+                               log.debug("Executed query: " + statement);
+                       }
+                       QueryResult qr = session.getWorkspace().getQueryManager()
+                                       .createQuery(statement, Query.JCR_SQL2).execute();
+
+                       if (log.isDebugEnabled()) {
+                               Calendar enStamp = new GregorianCalendar();
+                               long duration = enStamp.getTimeInMillis()
+                                               - stStamp.getTimeInMillis();
+                               log.debug("Query executed in : " + duration / 1000 + "s.");
+                       }
+
+                       // remove previous columns
+                       for (TableViewerColumn tvc : tableViewerColumns)
+                               tvc.getColumn().dispose();
+
+                       // If a pre(-defined list of columns has been injected, we use it,
+                       // otherwise we display all results of the resultSet
+                       if (!displayAllColumns && columnProperties != null) {
+                               int i = 0;
+
+                               Iterator<String> it = columnProperties.iterator();
+                               while (it.hasNext()) {
+                                       String columnName = it.next();
+
+                                       TableViewerColumn tvc = new TableViewerColumn(viewer,
+                                                       SWT.NONE);
+                                       tableConfigurer.configureColumn(columnName, tvc, i);
+                                       tvc.setLabelProvider(tableConfigurer
+                                                       .getLabelProvider(columnName));
+                                       tableViewerColumns.add(tvc);
+                                       i++;
+                               }
+                       } else {
+                               int i = 0;
+                               for (final String columnName : qr.getColumnNames()) {
+                                       TableViewerColumn tvc = new TableViewerColumn(viewer,
+                                                       SWT.NONE);
+                                       // Small hack to remove prefix from the column name
+                                       // String tmpStr = columnName.substring(columnName
+                                       // .lastIndexOf(".") + 1);
+                                       tableConfigurer.configureColumn(columnName, tvc, i);
+                                       tvc.setLabelProvider(tableConfigurer
+                                                       .getLabelProvider(columnName));
+                                       tableViewerColumns.add(tvc);
+                                       i++;
+                               }
+                       }
+                       // We must create a local list because query result can be read only
+                       // once.
+                       try {
+                               List<Row> rows = new ArrayList<Row>();
+                               RowIterator rit = qr.getRows();
+                               while (rit.hasNext()) {
+                                       rows.add(rit.nextRow());
+                               }
+                               viewer.setInput(rows);
+                       } catch (RepositoryException e) {
+                               throw new ArgeoException("Cannot read query result", e);
+                       }
+
+               } catch (RepositoryException e) {
+                       ErrorDialog.openError(null, "Error", "Cannot execute JCR query: "
+                                       + statement, new Status(IStatus.ERROR,
+                                       "org.argeo.eclipse.ui.jcr", e.getMessage()));
+               }
+       }
+
+       /**
+        * Client must use this method to display all columns of the result set
+        * instead of a limited predifined and injected set
+        **/
+       public void displayAllColumns(boolean flag) {
+               displayAllColumns = flag;
+       }
+
+       // Can be overridden by subclasses.
+       protected String generateSelectStatement() {
+               StringBuffer sb = new StringBuffer("select " + SAVB + ".* ");
+               return sb.toString();
+       }
+
+       protected String generateFromStatement() {
+               StringBuffer sb = new StringBuffer(" from ");
+               sb.append(SAVB);
+               sb.append(" ");
+               return sb.toString();
+       }
+
+       // Providers
+       protected class ViewContentProvider implements IStructuredContentProvider {
+
+               public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
+               }
+
+               public void dispose() {
+               }
+
+               @SuppressWarnings("unchecked")
+               public Object[] getElements(Object obj) {
+                       return ((List<String[]>) obj).toArray();
+               }
+       }
+
+       protected class ViewLabelProvider extends LabelProvider implements
+                       ITableLabelProvider {
+               public String getColumnText(Object obj, int index) {
+                       if (!(obj instanceof String[]))
+                               return "Object is not properly formatted ";
+
+                       String[] value = (String[]) obj;
+
+                       return value[index];
+               }
+
+               public Image getColumnImage(Object obj, int index) {
+                       return null;
+               }
+       }
+
+       /* DEPENDENCY INJECTION */
+       public void setSession(Session session) {
+               this.session = session;
+       }
+
+       public void setColumnProperties(List<String> columnProperties) {
+               this.columnProperties = columnProperties;
+       }
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/ArtifactsBrowser.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/ArtifactsBrowser.java
new file mode 100644 (file)
index 0000000..71cb36e
--- /dev/null
@@ -0,0 +1,297 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.views;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+
+import javax.jcr.Node;
+import javax.jcr.Property;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.Value;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.argeo.jcr.JcrUtils;
+import org.argeo.slc.client.ui.dist.DistConstants;
+import org.argeo.slc.client.ui.dist.DistImages;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.client.ui.dist.providers.ArtifactsTreeContentProvider;
+import org.argeo.slc.client.ui.dist.utils.GenericDoubleClickListener;
+import org.argeo.slc.jcr.SlcTypes;
+import org.argeo.slc.repo.RepoConstants;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.ui.part.ViewPart;
+
+/**
+ * Basic View to browse a maven based repository.
+ * 
+ * By Default size of the various bundles is not computed but it can be
+ * activated the view command.
+ */
+
+public class ArtifactsBrowser extends ViewPart implements DistConstants,
+               RepoConstants {
+       private final static Log log = LogFactory.getLog(ArtifactsBrowser.class);
+       public final static String ID = DistPlugin.ID + ".artifactsBrowser";
+
+       /* DEPENDENCY INJECTION */
+       private Session jcrSession;
+
+       // Business objects
+       private Node rootNode;
+
+       // This page widgets
+       private TreeViewer artifactTreeViewer;
+       private boolean isSizeVisible = false;
+
+       // To be able to configure columns easily
+       public static final int COLUMN_TREE = 0;
+       public static final int COLUMN_DATE = 1;
+       public static final int COLUMN_SIZE = 2;
+       private static final int SIZE_COL_WIDTH = 55;
+
+       @Override
+       public void createPartControl(Composite parent) {
+               // Enable the different parts to fill the whole page when the tab is
+               // maximized
+               parent.setLayout(new FillLayout());
+               artifactTreeViewer = createArtifactsTreeViewer(parent);
+
+               // context menu : it is completely defined in the plugin.xml file.
+               // Nothing in the context menu for the time being
+               // MenuManager menuManager = new MenuManager();
+               // Menu menu =
+               // menuManager.createContextMenu(artifactTreeViewer.getTree());
+               // artifactTreeViewer.getTree().setMenu(menu);
+               // getSite().registerContextMenu(menuManager, artifactTreeViewer);
+
+               getSite().setSelectionProvider(artifactTreeViewer);
+               // packagesViewer.setComparer(new NodeViewerComparer());
+
+               // Model initialisation
+               if (jcrSession != null) {
+                       try {
+                               rootNode = jcrSession.getNode(ARTIFACTS_BASE_PATH);
+                               artifactTreeViewer.setInput(rootNode);
+                       } catch (RepositoryException e) {
+                               throw new ArgeoException("Cannot load base artifact nodes", e);
+                       }
+               }
+       }
+
+       protected TreeViewer createArtifactsTreeViewer(Composite parent) {
+               int style = SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION;
+               Tree tree = new Tree(parent, style);
+               createColumn(tree, "Artifacts", SWT.LEFT, 300);
+               createColumn(tree, "Date created", SWT.LEFT, 105);
+               createColumn(tree, "Size", SWT.RIGHT, 0);
+               tree.setLinesVisible(true);
+               tree.setHeaderVisible(true);
+
+               TreeViewer viewer = new TreeViewer(tree);
+
+               viewer.setContentProvider(new ArtifactsTreeContentProvider());
+               viewer.setLabelProvider(new ArtifactLabelProvider());
+               viewer.addSelectionChangedListener(new ArtifactTreeSelectionListener());
+               viewer.addDoubleClickListener(new GenericDoubleClickListener(viewer));
+               viewer.setInput(rootNode);
+
+               return viewer;
+       }
+
+       private static TreeColumn createColumn(Tree parent, String name, int style,
+                       int width) {
+               TreeColumn result = new TreeColumn(parent, style);
+               result.setText(name);
+               result.setWidth(width);
+               result.setMoveable(true);
+               result.setResizable(true);
+               return result;
+       }
+
+       protected TreeViewer getArtifactTreeViewer() {
+               return artifactTreeViewer;
+       }
+
+       @Override
+       public void setFocus() {
+               // TODO Auto-generated method stub
+
+       }
+
+       /**
+        * Refresh the given element of the tree browser. If null is passed as a
+        * parameter, it refreshes the whole tree
+        */
+       public void refresh(Object element) {
+               if (element == null) {
+                       artifactTreeViewer.refresh(rootNode);
+               } else
+                       artifactTreeViewer.refresh(element);
+       }
+
+       /** Returns wether size column is visible or not */
+       public boolean isSizeVisible() {
+               return isSizeVisible;
+       }
+
+       /** Sets the visibility of the size column */
+       public void setSizeVisible(boolean visible) {
+               if (isSizeVisible == visible)
+                       return; // nothing has changed
+               else
+                       isSizeVisible = visible;
+
+               if (visible) {
+                       artifactTreeViewer.getTree().getColumn(COLUMN_SIZE)
+                                       .setWidth(SIZE_COL_WIDTH);
+               } else {
+                       // we just hide the column, we don't refresh the whole tree.
+                       artifactTreeViewer.getTree().getColumn(COLUMN_SIZE).setWidth(0);
+               }
+       }
+
+       private class ArtifactLabelProvider extends ColumnLabelProvider implements
+                       DistConstants, SlcTypes {
+
+               // Utils
+               protected DateFormat timeFormatter = new SimpleDateFormat(
+                               DATE_TIME_FORMAT);
+
+               public void update(ViewerCell cell) {
+                       int colIndex = cell.getColumnIndex();
+                       Object element = cell.getElement();
+                       cell.setText(getColumnText(element, colIndex));
+
+                       if (element instanceof Node && colIndex == 0) {
+                               Node node = (Node) element;
+                               try {
+                                       if (node.isNodeType(SLC_ARTIFACT_BASE))
+                                               cell.setImage(DistImages.IMG_ARTIFACT_BASE);
+                                       else if (node.isNodeType(SLC_ARTIFACT_VERSION_BASE))
+                                               cell.setImage(DistImages.IMG_ARTIFACT_VERSION_BASE);
+                               } catch (RepositoryException e) {
+                                       // Silent
+                               }
+                       }
+               }
+
+               @Override
+               public Image getImage(Object element) {
+
+                       if (element instanceof Node) {
+                               Node node = (Node) element;
+                               try {
+                                       if (node.isNodeType(SLC_ARTIFACT_BASE)) {
+                                               return DistImages.IMG_ARTIFACT_BASE;
+                                       } else if (node.isNodeType(SLC_ARTIFACT_VERSION_BASE)) {
+                                               return DistImages.IMG_ARTIFACT_VERSION_BASE;
+                                       }
+                               } catch (RepositoryException e) {
+                                       // Silent
+                               }
+                       }
+                       return null;
+               }
+
+               public String getColumnText(Object element, int columnIndex) {
+                       try {
+                               if (element instanceof Node) {
+                                       Node node = (Node) element;
+                                       switch (columnIndex) {
+                                       case COLUMN_TREE:
+                                               return node.getName();
+                                       case COLUMN_SIZE:
+                                               if (isSizeVisible) {
+                                                       long size = JcrUtils.getNodeApproxSize(node) / 1024;
+                                                       if (size > 1024)
+                                                               return size / 1024 + " MB";
+                                                       else
+                                                               return size + " KB";
+                                               } else
+                                                       return "";
+                                       case COLUMN_DATE:
+                                               if (node.hasProperty(Property.JCR_CREATED))
+                                                       return timeFormatter.format(node
+                                                                       .getProperty(Property.JCR_CREATED)
+                                                                       .getDate().getTime());
+                                               else
+                                                       return null;
+                                       }
+                               }
+                       } catch (RepositoryException re) {
+                               throw new ArgeoException(
+                                               "Unexepected error while getting property values", re);
+                       }
+                       return null;
+               }
+
+               private String formatValueAsString(Value value) {
+                       // TODO enhance this method
+                       try {
+                               String strValue;
+
+                               if (value.getType() == PropertyType.BINARY)
+                                       strValue = "<binary>";
+                               else if (value.getType() == PropertyType.DATE)
+                                       strValue = timeFormatter.format(value.getDate().getTime());
+                               else
+                                       strValue = value.getString();
+                               return strValue;
+                       } catch (RepositoryException e) {
+                               throw new ArgeoException(
+                                               "unexpected error while formatting value", e);
+                       }
+               }
+       }
+
+       private class ArtifactTreeSelectionListener implements
+                       ISelectionChangedListener {
+
+               public void selectionChanged(SelectionChangedEvent event) {
+                       ISelection selection = event.getSelection();
+                       if (selection != null && selection instanceof IStructuredSelection) {
+                               IStructuredSelection iss = (IStructuredSelection) selection;
+                               if (iss.size() == 1) {
+                                       artifactTreeViewer.refresh(iss.getFirstElement());
+                               }
+                       }
+
+               }
+
+       }
+
+       /* DEPENDENCY INJECTION */
+       public void setJcrSession(Session jcrSession) {
+               this.jcrSession = jcrSession;
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/DistributionsView.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/DistributionsView.java
new file mode 100644 (file)
index 0000000..6ac3d79
--- /dev/null
@@ -0,0 +1,269 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.views;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.eclipse.ui.AbstractTreeContentProvider;
+import org.argeo.eclipse.ui.ErrorFeedback;
+import org.argeo.eclipse.ui.TreeParent;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.client.ui.dist.commands.CopyWorkspace;
+import org.argeo.slc.client.ui.dist.commands.CreateWorkspace;
+import org.argeo.slc.client.ui.dist.commands.DeleteWorkspace;
+import org.argeo.slc.client.ui.dist.commands.ManageWorkspaceAuth;
+import org.argeo.slc.client.ui.dist.commands.NormalizeDistribution;
+import org.argeo.slc.client.ui.dist.editors.DistributionEditor;
+import org.argeo.slc.client.ui.dist.editors.DistributionEditorInput;
+import org.argeo.slc.client.ui.dist.utils.CommandHelpers;
+import org.argeo.slc.jcr.SlcNames;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.TreeViewerColumn;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.ViewPart;
+
+/**
+ * Browse and manipulate distributions (like merge, rename, etc.). Only support
+ * one single repository currently.
+ */
+
+public class DistributionsView extends ViewPart implements SlcNames {
+       private final static Log log = LogFactory.getLog(DistributionsView.class);
+       public final static String ID = DistPlugin.ID + ".distributionsView";
+
+       private Repository repository;
+
+       private TreeViewer viewer;
+
+       @Override
+       public void createPartControl(Composite parent) {
+               // Define the TableViewer
+               viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL
+                               | SWT.FULL_SELECTION | SWT.BORDER);
+
+               TreeViewerColumn col = new TreeViewerColumn(viewer, SWT.NONE);
+               col.getColumn().setWidth(200);
+               col.getColumn().setText("Workspace");
+               col.setLabelProvider(new ColumnLabelProvider() {
+                       @Override
+                       public String getText(Object element) {
+                               return element.toString();
+                       }
+               });
+
+               final Tree table = viewer.getTree();
+               table.setHeaderVisible(true);
+               table.setLinesVisible(true);
+
+               viewer.setContentProvider(new DistributionsContentProvider());
+               viewer.addDoubleClickListener(new DistributionsDCL());
+
+               MenuManager menuManager = new MenuManager();
+               Menu menu = menuManager.createContextMenu(viewer.getTree());
+               menuManager.addMenuListener(new IMenuListener() {
+                       public void menuAboutToShow(IMenuManager manager) {
+                               contextMenuAboutToShow(manager);
+                       }
+               });
+               viewer.getTree().setMenu(menu);
+               getSite().registerContextMenu(menuManager, viewer);
+
+               viewer.setInput(getSite());
+
+       }
+
+       @Override
+       public void setFocus() {
+               viewer.getTree().setFocus();
+       }
+
+       /**
+        * Force refresh of the whole view
+        */
+       public void refresh() {
+               viewer.setContentProvider(new DistributionsContentProvider());
+       }
+
+       public void setRepository(Repository repository) {
+               this.repository = repository;
+       }
+
+       /** Programatically configure the context menu */
+       protected void contextMenuAboutToShow(IMenuManager menuManager) {
+               IWorkbenchWindow window = DistPlugin.getDefault().getWorkbench()
+                               .getActiveWorkbenchWindow();
+               // Get Current selected item :
+               Object firstElement = ((IStructuredSelection) viewer.getSelection())
+                               .getFirstElement();
+
+               if (firstElement instanceof TreeParent) {
+                       TreeParent tp = (TreeParent) firstElement;
+                       String wsName = tp.getName();
+
+                       // Build conditions depending on element type (repo or distribution
+                       // for the time being)
+                       boolean isDistribElem = false; // , isRepoElem = false;
+
+                       // if (tp instanceof RepositoryElem){
+                       // isRepoElem = true;
+                       // } else
+                       if (tp instanceof DistributionElem) {
+                               isDistribElem = true;
+                       }
+
+                       // create workspace
+                       CommandHelpers.refreshCommand(menuManager, window,
+                                       CreateWorkspace.ID, CreateWorkspace.DEFAULT_LABEL,
+                                       CreateWorkspace.DEFAULT_ICON_PATH,
+                                       tp instanceof RepositoryElem);
+
+                       // Normalize workspace
+                       Map<String, String> params = new HashMap<String, String>();
+                       params.put(NormalizeDistribution.PARAM_WORKSPACE, wsName);
+                       CommandHelpers.refreshParameterizedCommand(menuManager, window,
+                                       NormalizeDistribution.ID,
+                                       NormalizeDistribution.DEFAULT_LABEL,
+                                       NormalizeDistribution.DEFAULT_ICON_PATH, isDistribElem,
+                                       params);
+
+                       // Copy workspace
+                       params = new HashMap<String, String>();
+                       params.put(CopyWorkspace.PARAM_WORKSPACE_NAME, wsName);
+                       CommandHelpers.refreshParameterizedCommand(menuManager, window,
+                                       CopyWorkspace.ID, CopyWorkspace.DEFAULT_LABEL,
+                                       CopyWorkspace.DEFAULT_ICON_PATH, isDistribElem, params);
+
+                       // Delete Workspace
+                       params = new HashMap<String, String>();
+                       params.put(DeleteWorkspace.PARAM_WORKSPACE_NAME, wsName);
+                       CommandHelpers.refreshParameterizedCommand(menuManager, window,
+                                       DeleteWorkspace.ID, DeleteWorkspace.DEFAULT_LABEL,
+                                       DeleteWorkspace.DEFAULT_ICON_PATH, isDistribElem, params);
+
+                       // Manage workspace authorizations
+                       params = new HashMap<String, String>();
+                       params.put(ManageWorkspaceAuth.PARAM_WORKSPACE_NAME, wsName);
+                       CommandHelpers.refreshParameterizedCommand(menuManager, window,
+                                       ManageWorkspaceAuth.ID, ManageWorkspaceAuth.DEFAULT_LABEL,
+                                       ManageWorkspaceAuth.DEFAULT_ICON_PATH, isDistribElem,
+                                       params);
+               }
+       }
+
+       private class DistributionsContentProvider extends
+                       AbstractTreeContentProvider {
+
+               public Object[] getElements(Object arg0) {
+                       return new Object[] { new RepositoryElem("java", repository) };
+               }
+
+       }
+
+       private static class RepositoryElem extends TreeParent {
+               // private final Repository repository;
+               private Session defaultSession;
+
+               public RepositoryElem(String name, Repository repository) {
+                       super(name);
+                       // this.repository = repository;
+                       try {
+                               defaultSession = repository.login();
+                               String[] workspaceNames = defaultSession.getWorkspace()
+                                               .getAccessibleWorkspaceNames();
+                               for (String workspace : workspaceNames)
+                                       addChild(new DistributionElem(repository, workspace));
+                       } catch (RepositoryException e) {
+                               ErrorFeedback.show("Cannot log to repository", e);
+                       }
+               }
+
+               @Override
+               public synchronized void dispose() {
+                       if (log.isTraceEnabled())
+                               log.trace("Disposing RepositoryElement");
+                       if (defaultSession != null)
+                               defaultSession.logout();
+                       super.dispose();
+               }
+       }
+
+       private static class DistributionElem extends TreeParent {
+               private final String workspaceName;
+               private final Repository repository;
+
+               public DistributionElem(Repository repository, String workspaceName) {
+                       super(workspaceName);
+                       this.workspaceName = workspaceName;
+                       this.repository = repository;
+               }
+
+               public String getWorkspaceName() {
+                       return workspaceName;
+               }
+
+               public Repository getRepository() {
+                       return repository;
+               }
+       }
+
+       @Override
+       public void dispose() {
+               super.dispose();
+       }
+
+       private class DistributionsDCL implements IDoubleClickListener {
+
+               public void doubleClick(DoubleClickEvent event) {
+                       if (event.getSelection() == null || event.getSelection().isEmpty())
+                               return;
+                       Object obj = ((IStructuredSelection) event.getSelection())
+                                       .getFirstElement();
+                       if (obj instanceof DistributionElem) {
+                               DistributionElem distributionElem = (DistributionElem) obj;
+                               DistributionEditorInput dei = new DistributionEditorInput(
+                                               distributionElem.getRepository(),
+                                               distributionElem.getWorkspaceName());
+                               try {
+                                       DistPlugin.getDefault().getWorkbench()
+                                                       .getActiveWorkbenchWindow().getActivePage()
+                                                       .openEditor(dei, DistributionEditor.ID);
+                               } catch (PartInitException e) {
+                                       ErrorFeedback.show("Cannot open editor for "
+                                                       + distributionElem.getWorkspaceName(), e);
+                               }
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/ModulesView.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/ModulesView.java
new file mode 100644 (file)
index 0000000..0c0a679
--- /dev/null
@@ -0,0 +1,406 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.views;
+
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.eclipse.ui.TreeParent;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.part.ViewPart;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.packageadmin.ExportedPackage;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+public class ModulesView extends ViewPart {
+       private final static Log log = LogFactory.getLog(ModulesView.class);
+
+       private TreeViewer viewer;
+
+       private PackageAdmin packageAdmin;
+
+       private Comparator<ExportedPackage> exportedPackageComparator = new Comparator<ExportedPackage>() {
+
+               public int compare(ExportedPackage o1, ExportedPackage o2) {
+                       if (!o1.getName().equals(o2.getName()))
+                               return o1.getName().compareTo(o2.getName());
+                       else
+                               return o1.getVersion().compareTo(o2.getVersion());
+               }
+       };
+
+       @Override
+       public void createPartControl(Composite parent) {
+               viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+               viewer.setContentProvider(new ModulesContentProvider());
+               viewer.setLabelProvider(new ModulesLabelProvider());
+               viewer.setInput(DistPlugin.getBundleContext());
+       }
+
+       @Override
+       public void setFocus() {
+               viewer.getTree().setFocus();
+       }
+
+       private class ModulesContentProvider implements ITreeContentProvider {
+
+               public Object[] getElements(Object inputElement) {
+                       return getChildren(inputElement);
+               }
+
+               public Object[] getChildren(Object parentElement) {
+                       if (parentElement instanceof BundleContext) {
+                               BundleContext bundleContext = (BundleContext) parentElement;
+                               Bundle[] bundles = bundleContext.getBundles();
+
+                               TreeParent bundlesNode = new TreeParent("Bundles");
+                               for (Bundle bundle : bundles) {
+                                       if (bundle.getState() == Bundle.ACTIVE)
+                                               bundlesNode.addChild(new BundleNode(bundle));
+                               }
+
+                               // scan packages
+                               ServiceReference paSr = bundleContext
+                                               .getServiceReference(PackageAdmin.class.getName());
+                               // TODO: make a cleaner referencing
+                               packageAdmin = (PackageAdmin) bundleContext.getService(paSr);
+
+                               Bundle bundle1 = null;
+                               Bundle bundle2 = null;
+
+                               Map<Bundle, Set<ExportedPackage>> importedPackages = new HashMap<Bundle, Set<ExportedPackage>>();
+                               Map<String, Set<ExportedPackage>> packages = new TreeMap<String, Set<ExportedPackage>>();
+                               for (Bundle bundle : bundles) {
+                                       if (bundle.getSymbolicName()
+                                                       .equals("org.argeo.security.ui"))
+                                               bundle1 = bundle;
+                                       if (bundle.getSymbolicName().equals(
+                                                       "org.argeo.security.equinox"))
+                                               bundle2 = bundle;
+
+                                       ExportedPackage[] pkgs = packageAdmin
+                                                       .getExportedPackages(bundle);
+                                       if (pkgs != null)
+                                               for (ExportedPackage pkg : pkgs) {
+                                                       if (!packages.containsKey(pkg.getName()))
+                                                               packages.put(pkg.getName(),
+                                                                               new TreeSet<ExportedPackage>(
+                                                                                               exportedPackageComparator));
+                                                       Set<ExportedPackage> expPackages = (Set<ExportedPackage>) packages
+                                                                       .get(pkg.getName());
+                                                       expPackages.add(pkg);
+
+                                                       // imported
+                                                       for (Bundle b : pkg.getImportingBundles()) {
+                                                               if (bundle.getBundleId() != b.getBundleId()) {
+                                                                       if (!importedPackages.containsKey(b))
+                                                                               importedPackages
+                                                                                               .put(b,
+                                                                                                               new TreeSet<ExportedPackage>(
+                                                                                                                               exportedPackageComparator));
+                                                                       Set<ExportedPackage> impPackages = (Set<ExportedPackage>) importedPackages
+                                                                                       .get(b);
+                                                                       impPackages.add(pkg);
+                                                               }
+                                                       }
+                                               }
+                               }
+
+                               TreeParent mPackageNode = new TreeParent("Multiple Packages");
+                               TreeParent aPackageNode = new TreeParent("All Packages");
+                               for (String packageName : packages.keySet()) {
+                                       Set<ExportedPackage> pkgs = packages.get(packageName);
+                                       if (pkgs.size() > 1) {
+                                               MultiplePackagesNode mpn = new MultiplePackagesNode(
+                                                               packageName, pkgs);
+                                               mPackageNode.addChild(mpn);
+                                               aPackageNode.addChild(mpn);
+                                       } else {
+                                               aPackageNode.addChild(new ExportedPackageNode(pkgs
+                                                               .iterator().next()));
+                                       }
+                               }
+
+                               // Map<String, Set<String>> traces1 = new TreeMap<String,
+                               // Set<String>>();
+                               // Map<String, ExportedPackage> space1 =
+                               // dependencySpace(bundle1,
+                               // importedPackages, traces1);
+                               // Map<String, Set<String>> traces2 = new TreeMap<String,
+                               // Set<String>>();
+                               // Map<String, ExportedPackage> space2 =
+                               // dependencySpace(bundle2,
+                               // importedPackages, traces2);
+                               // for (String key : space1.keySet()) {
+                               // if (space2.containsKey(key)) {
+                               // ExportedPackage pkg1 = space1.get(key);
+                               // ExportedPackage pkg2 = space2.get(key);
+                               // if (!pkg1.getVersion().equals(pkg2.getVersion())) {
+                               // log.debug("\n##" + pkg1 + " <> " + pkg2);
+                               // log.debug("# Traces for "
+                               // + bundle1.getSymbolicName());
+                               // for (String trace : traces1.get(pkg1.getName())) {
+                               // log.debug(trace);
+                               // }
+                               // log.debug("# Traces for "
+                               // + bundle2.getSymbolicName());
+                               // for (String trace : traces2.get(pkg2.getName())) {
+                               // log.debug(trace);
+                               // }
+                               // }
+                               // }
+                               // }
+
+                               return new Object[] { bundlesNode, mPackageNode, aPackageNode };
+                       } else if (parentElement instanceof TreeParent) {
+                               return ((TreeParent) parentElement).getChildren();
+                       } else {
+                               return null;
+                       }
+               }
+
+               public Object getParent(Object element) {
+                       // TODO Auto-generated method stub
+                       return null;
+               }
+
+               public boolean hasChildren(Object element) {
+                       if (element instanceof TreeParent) {
+                               return ((TreeParent) element).hasChildren();
+                       }
+                       return false;
+               }
+
+               public void dispose() {
+                       // TODO Auto-generated method stub
+
+               }
+
+               public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+                       // TODO Auto-generated method stub
+
+               }
+
+       }
+
+       protected Map<String, ExportedPackage> dependencySpace(Bundle bundle,
+                       Map<Bundle, Set<ExportedPackage>> importedPackages,
+                       Map<String, Set<String>> traces) {
+               log.debug("Dependency space for " + bundle.getSymbolicName());
+               Map<String, ExportedPackage> space = new TreeMap<String, ExportedPackage>();
+               fillDependencySpace(space, bundle, importedPackages,
+                               bundle.getSymbolicName(), traces);
+               return space;
+       }
+
+       /** Recursive */
+       protected void fillDependencySpace(Map<String, ExportedPackage> space,
+                       Bundle bundle, Map<Bundle, Set<ExportedPackage>> importedPackages,
+                       String currTrace, Map<String, Set<String>> traces) {
+               if (importedPackages.containsKey(bundle)) {
+                       Set<ExportedPackage> imports = importedPackages.get(bundle);
+                       // log.debug("## Fill dependency space for " + bundle + " : ");
+                       for (ExportedPackage pkg : imports) {
+                               if (!traces.containsKey(pkg.getName()))
+                                       traces.put(pkg.getName(), new TreeSet<String>());
+                               traces.get(pkg.getName()).add(currTrace);
+                               if (!space.containsKey(pkg.getName())) {
+                                       space.put(pkg.getName(), pkg);
+                                       Bundle exportingBundle = pkg.getExportingBundle();
+                                       // if (bundle.getBundleId() !=
+                                       // exportingBundle.getBundleId())
+                                       fillDependencySpace(space, exportingBundle,
+                                                       importedPackages, currTrace + " > "
+                                                                       + exportingBundle.getSymbolicName(), traces);
+                               }
+                       }
+               }
+       }
+
+       private class ModulesLabelProvider extends LabelProvider implements
+                       ITableLabelProvider {
+
+               public Image getColumnImage(Object element, int columnIndex) {
+                       // TODO Auto-generated method stub
+                       return null;
+               }
+
+               public String getColumnText(Object element, int columnIndex) {
+                       return getText(element);
+               }
+
+       }
+
+       class BundleNode extends TreeParent {
+               private final Bundle bundle;
+
+               public BundleNode(Bundle bundle) {
+                       super(bundle.getSymbolicName());
+                       this.bundle = bundle;
+
+                       // Registered services
+                       ServiceReference[] registeredServices = bundle
+                                       .getRegisteredServices();
+                       if (registeredServices != null) {
+                               TreeParent registeredServicesNode = new TreeParent(
+                                               "Registered Services");
+                               addChild(registeredServicesNode);
+                               for (ServiceReference sr : registeredServices) {
+                                       if (sr != null)
+                                               registeredServicesNode
+                                                               .addChild(new ServiceReferenceNode(sr));
+                               }
+                       }
+
+                       // Used services
+                       ServiceReference[] usedServices = bundle.getRegisteredServices();
+                       if (usedServices != null) {
+                               TreeParent usedServicesNode = new TreeParent("Used Services");
+                               addChild(usedServicesNode);
+                               for (ServiceReference sr : usedServices) {
+                                       if (sr != null)
+                                               usedServicesNode.addChild(new ServiceReferenceNode(sr));
+                               }
+                       }
+               }
+
+               public Bundle getBundle() {
+                       return bundle;
+               }
+
+       }
+
+       class ServiceReferenceNode extends TreeParent {
+               private final ServiceReference serviceReference;
+
+               public ServiceReferenceNode(ServiceReference serviceReference) {
+                       super(serviceReference.toString());
+                       this.serviceReference = serviceReference;
+
+                       Bundle[] usedBundles = serviceReference.getUsingBundles();
+                       if (usedBundles != null) {
+                               TreeParent usingBundles = new TreeParent("Using Bundles");
+                               addChild(usingBundles);
+                               for (Bundle b : usedBundles) {
+                                       if (b != null)
+                                               usingBundles.addChild(new TreeParent(b
+                                                               .getSymbolicName()));
+                               }
+                       }
+
+                       TreeParent properties = new TreeParent("Properties");
+                       addChild(properties);
+                       for (String key : serviceReference.getPropertyKeys()) {
+                               properties.addChild(new TreeParent(key + "="
+                                               + serviceReference.getProperty(key)));
+                       }
+
+               }
+
+               public ServiceReference getServiceReference() {
+                       return serviceReference;
+               }
+
+       }
+
+       class MultiplePackagesNode extends TreeParent {
+               private String packageName;
+               private Set<ExportedPackage> exportedPackages;
+
+               public MultiplePackagesNode(String packageName,
+                               Set<ExportedPackage> exportedPackages) {
+                       super(packageName);
+                       this.packageName = packageName;
+                       this.exportedPackages = exportedPackages;
+                       for (ExportedPackage pkg : exportedPackages) {
+                               addChild(new ExportedPackageNode(pkg));
+                       }
+               }
+
+       }
+
+       class ConflictingPackageNode extends TreeParent {
+               private ExportedPackage exportedPackage;
+
+               public ConflictingPackageNode(ExportedPackage exportedPackage) {
+                       super(exportedPackage.getName() + " - "
+                                       + exportedPackage.getVersion() + " ("
+                                       + exportedPackage.getExportingBundle() + ")");
+                       this.exportedPackage = exportedPackage;
+
+                       TreeParent bundlesNode = new TreeParent("Dependent Bundles");
+                       this.addChild(bundlesNode);
+                       Map<String, Bundle> bundles = new TreeMap<String, Bundle>();
+                       for (Bundle b : exportedPackage.getImportingBundles()) {
+                               bundles.put(b.getSymbolicName(), b);
+                       }
+                       for (String key : bundles.keySet()) {
+                               addDependentBundles(bundlesNode, bundles.get(key));
+                       }
+               }
+       }
+
+       protected void addDependentBundles(TreeParent parent, Bundle bundle) {
+               TreeParent bundleNode = new TreeParent(bundle.toString());
+               parent.addChild(bundleNode);
+               Map<String, Bundle> bundles = new TreeMap<String, Bundle>();
+               ExportedPackage[] pkgs = packageAdmin.getExportedPackages(bundle);
+               if (pkgs != null)
+                       for (ExportedPackage pkg : pkgs) {
+                               for (Bundle b : pkg.getImportingBundles()) {
+                                       if (!bundles.containsKey(b.getSymbolicName())
+                                                       && b.getBundleId() != bundle.getBundleId()) {
+                                               bundles.put(b.getSymbolicName(), b);
+                                       }
+                               }
+                       }
+
+               for (String key : bundles.keySet()) {
+                       addDependentBundles(bundleNode, bundles.get(key));
+               }
+       }
+
+       class ExportedPackageNode extends TreeParent {
+               private ExportedPackage exportedPackage;
+
+               public ExportedPackageNode(ExportedPackage exportedPackage) {
+                       super(exportedPackage.getName() + " - "
+                                       + exportedPackage.getVersion() + " ("
+                                       + exportedPackage.getExportingBundle() + ")");
+                       this.exportedPackage = exportedPackage;
+                       for (Bundle bundle : exportedPackage.getImportingBundles()) {
+                               addChild(new BundleNode(bundle));
+                       }
+               }
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryArtifactsForm.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryArtifactsForm.java
new file mode 100644 (file)
index 0000000..e7ee355
--- /dev/null
@@ -0,0 +1,171 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.views;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.jcr.SlcNames;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+
+/** Query SLC Repo to get some artifacts given some predefined parameters */
+public class QueryArtifactsForm extends AbstractQueryArtifactsView implements
+               SlcNames {
+       private static final Log log = LogFactory.getLog(QueryArtifactsForm.class);
+       public static final String ID = DistPlugin.ID + ".queryArtifactsForm";
+
+       // widgets
+       private Button executeBtn;
+       private Text groupId;
+       private Text artifactId;
+       private Text version;
+       private SashForm sashForm;
+
+       private Composite top, bottom;
+
+       @Override
+       public void createPartControl(Composite parent) {
+
+               sashForm = new SashForm(parent, SWT.VERTICAL);
+               sashForm.setSashWidth(4);
+               // Enable the different parts to fill the whole page when the tab is
+               // maximized
+               sashForm.setLayout(new FillLayout());
+
+               top = new Composite(sashForm, SWT.NONE);
+               top.setLayout(new GridLayout(1, false));
+
+               bottom = new Composite(sashForm, SWT.NONE);
+               bottom.setLayout(new GridLayout(1, false));
+
+               sashForm.setWeights(new int[] { 25, 75 });
+
+               createQueryForm(top);
+               createResultPart(bottom);
+       }
+
+       public void createQueryForm(Composite parent) {
+               Label lbl;
+               GridData gd;
+
+               GridLayout gl = new GridLayout(2, false);
+               gl.marginTop = 5;
+               parent.setLayout(gl);
+
+               // lbl = new Label(parent, SWT.SINGLE);
+               // lbl.setText("Query by coordinates");
+               // gd = new GridData();
+               // gd.horizontalSpan = 2;
+               // lbl.setLayoutData(gd);
+
+               // Group ID
+               lbl = new Label(parent, SWT.SINGLE);
+               lbl.setText("Group ID");
+               groupId = new Text(parent, SWT.SINGLE | SWT.BORDER);
+               gd = new GridData(GridData.FILL_HORIZONTAL);
+               gd.grabExcessHorizontalSpace = true;
+               groupId.setLayoutData(gd);
+
+               // Artifact ID
+               lbl = new Label(parent, SWT.SINGLE);
+               lbl.setText("Artifact ID");
+               artifactId = new Text(parent, SWT.SINGLE | SWT.BORDER);
+               gd = new GridData(GridData.FILL_HORIZONTAL);
+               gd.grabExcessHorizontalSpace = true;
+               artifactId.setLayoutData(gd);
+
+               // Version
+               lbl = new Label(parent, SWT.SINGLE);
+               lbl.setText("Version");
+               version = new Text(parent, SWT.SINGLE | SWT.BORDER);
+               gd = new GridData(GridData.FILL_HORIZONTAL);
+               gd.grabExcessHorizontalSpace = true;
+               version.setLayoutData(gd);
+
+               executeBtn = new Button(parent, SWT.PUSH);
+               executeBtn.setText("Search");
+               gd = new GridData();
+               gd.horizontalSpan = 2;
+               executeBtn.setLayoutData(gd);
+
+               Listener executeListener = new Listener() {
+                       public void handleEvent(Event event) {
+                               refreshQuery();
+                       }
+               };
+               executeBtn.addListener(SWT.Selection, executeListener);
+       }
+
+       public void refreshQuery() {
+               String queryStr = generateSelectStatement() + generateFromStatement()
+                               + generateWhereStatement();
+               executeQuery(queryStr);
+               bottom.layout();
+               sashForm.layout();
+       }
+
+       private String generateWhereStatement() {
+               try {
+                       boolean hasFirstClause = false;
+                       StringBuffer sb = new StringBuffer(" where ");
+
+                       if (groupId.getText() != null
+                                       && !groupId.getText().trim().equals("")) {
+                               sb.append("[" + SLC_GROUP_ID + "] like '"
+                                               + groupId.getText().replace('*', '%') + "'");
+                               hasFirstClause = true;
+                       }
+
+                       if (artifactId.getText() != null
+                                       && !artifactId.getText().trim().equals("")) {
+                               if (hasFirstClause)
+                                       sb.append(" AND ");
+                               sb.append("[" + SLC_ARTIFACT_ID + "] like '"
+                                               + artifactId.getText().replace('*', '%') + "'");
+                               hasFirstClause = true;
+                       }
+
+                       if (version.getText() != null
+                                       && !version.getText().trim().equals("")) {
+                               if (hasFirstClause)
+                                       sb.append(" AND ");
+                               sb.append("[" + SLC_ARTIFACT_VERSION + "] like '"
+                                               + version.getText().replace('*', '%') + "'");
+                       }
+
+                       return sb.toString();
+               } catch (Exception e) {
+                       throw new ArgeoException(
+                                       "Cannot generate where statement to get artifacts", e);
+               }
+       }
+
+       @Override
+       public void setFocus() {
+               executeBtn.setFocus();
+       }
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryArtifactsText.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryArtifactsText.java
new file mode 100644 (file)
index 0000000..f78b610
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.views;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.jcr.SlcNames;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+
+/** Query SLC Repo to get some artifacts with a JCR SQL 2 request. */
+public class QueryArtifactsText extends AbstractQueryArtifactsView implements
+               SlcNames {
+       private static final Log log = LogFactory.getLog(QueryArtifactsText.class);
+       public static final String ID = DistPlugin.ID + ".queryArtifactsText";
+
+       // widgets
+       private Button executeBtn;
+       private Text queryText;
+       private SashForm sashForm;
+
+       private Composite top, bottom;
+
+       @Override
+       public void createPartControl(Composite parent) {
+
+               sashForm = new SashForm(parent, SWT.VERTICAL);
+               sashForm.setSashWidth(4);
+               // Enable the different parts to fill the whole page when the tab is
+               // maximized
+               sashForm.setLayout(new FillLayout());
+
+               top = new Composite(sashForm, SWT.NONE);
+               top.setLayout(new GridLayout(1, false));
+
+               bottom = new Composite(sashForm, SWT.NONE);
+               bottom.setLayout(new GridLayout(1, false));
+
+               sashForm.setWeights(new int[] { 25, 75 });
+
+               createQueryForm(top);
+               createResultPart(bottom);
+       }
+
+       public void createQueryForm(Composite parent) {
+               Label lbl;
+               GridData gd;
+
+               GridLayout gl = new GridLayout(2, false);
+               gl.marginTop = 5;
+               parent.setLayout(gl);
+
+               lbl = new Label(parent, SWT.SINGLE);
+               lbl.setText("Enter a JCR:SQL2 Query");
+
+               executeBtn = new Button(parent, SWT.PUSH);
+               executeBtn.setText("Search");
+
+               queryText = new Text(parent, SWT.MULTI | SWT.WRAP | SWT.BORDER);
+               gd = new GridData(GridData.FILL_HORIZONTAL);
+               gd.grabExcessHorizontalSpace = true;
+               gd.heightHint = 100;
+               gd.horizontalSpan = 2;
+               queryText.setLayoutData(gd);
+
+               String query = generateSelectStatement() + generateFromStatement()
+                               + generateWhereStatement();
+               queryText.setText(query);
+
+               Listener executeListener = new Listener() {
+                       public void handleEvent(Event event) {
+                               refreshQuery();
+                       }
+               };
+               executeBtn.addListener(SWT.Selection, executeListener);
+       }
+
+       public void refreshQuery() {
+               String queryStr = queryText.getText();
+               executeQuery(queryStr);
+               bottom.layout();
+               sashForm.layout();
+       }
+
+       private String generateWhereStatement() {
+               StringBuffer sb = new StringBuffer(" where ");
+               return sb.toString();
+       }
+
+       @Override
+       public void setFocus() {
+               executeBtn.setFocus();
+       }
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryBundlesForm.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/views/QueryBundlesForm.java
new file mode 100644 (file)
index 0000000..51b621b
--- /dev/null
@@ -0,0 +1,189 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.views;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.argeo.slc.client.ui.dist.DistPlugin;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+
+/** Query SLC Repo to get some artifacts given some predefined parameters */
+public class QueryBundlesForm extends AbstractQueryArtifactsView implements
+               SlcNames, SlcTypes {
+       private static final Log log = LogFactory.getLog(QueryBundlesForm.class);
+       public static final String ID = DistPlugin.ID + ".queryBundlesForm";
+
+       // widgets
+       private Button executeBtn;
+       private Text symbolicName;
+       private Text importedPackage;
+       private Text exportedPackage;
+       private SashForm sashForm;
+
+       private Composite top, bottom;
+
+       @Override
+       public void createPartControl(Composite parent) {
+
+               sashForm = new SashForm(parent, SWT.VERTICAL);
+               sashForm.setSashWidth(4);
+               // Enable the different parts to fill the whole page when the tab is
+               // maximized
+               sashForm.setLayout(new FillLayout());
+
+               top = new Composite(sashForm, SWT.NONE);
+               top.setLayout(new GridLayout(1, false));
+
+               bottom = new Composite(sashForm, SWT.NONE);
+               bottom.setLayout(new GridLayout(1, false));
+
+               sashForm.setWeights(new int[] { 25, 75 });
+
+               createQueryForm(top);
+               createResultPart(bottom);
+       }
+
+       public void createQueryForm(Composite parent) {
+               Label lbl;
+               GridData gd;
+
+               GridLayout gl = new GridLayout(2, false);
+               gl.marginTop = 5;
+               parent.setLayout(gl);
+
+               // Bundle Name
+               lbl = new Label(parent, SWT.SINGLE);
+               lbl.setText("Symbolic name");
+               symbolicName = new Text(parent, SWT.SINGLE | SWT.BORDER);
+               gd = new GridData(GridData.FILL_HORIZONTAL);
+               gd.grabExcessHorizontalSpace = true;
+               symbolicName.setLayoutData(gd);
+
+               // imported package
+               lbl = new Label(parent, SWT.SINGLE);
+               lbl.setText("Imported package");
+               importedPackage = new Text(parent, SWT.SINGLE | SWT.BORDER);
+               gd = new GridData(GridData.FILL_HORIZONTAL);
+               gd.grabExcessHorizontalSpace = true;
+               importedPackage.setLayoutData(gd);
+
+               // exported package
+               lbl = new Label(parent, SWT.SINGLE);
+               lbl.setText("Exported package");
+               exportedPackage = new Text(parent, SWT.SINGLE | SWT.BORDER);
+               gd = new GridData(GridData.FILL_HORIZONTAL);
+               gd.grabExcessHorizontalSpace = true;
+               exportedPackage.setLayoutData(gd);
+
+               executeBtn = new Button(parent, SWT.PUSH);
+               executeBtn.setText("Search");
+               gd = new GridData();
+               gd.horizontalSpan = 2;
+               executeBtn.setLayoutData(gd);
+
+               Listener executeListener = new Listener() {
+                       public void handleEvent(Event event) {
+                               refreshQuery();
+                       }
+               };
+               executeBtn.addListener(SWT.Selection, executeListener);
+       }
+
+       public void refreshQuery() {
+               String queryStr = generateStatement();
+               executeQuery(queryStr);
+               bottom.layout();
+               sashForm.layout();
+       }
+
+       private String generateStatement() {
+               try {
+                       // shortcuts
+                       boolean hasFirstClause = false;
+                       boolean ipClause = importedPackage.getText() != null
+                                       && !importedPackage.getText().trim().equals("");
+                       boolean epClause = exportedPackage.getText() != null
+                                       && !exportedPackage.getText().trim().equals("");
+
+                       StringBuffer sb = new StringBuffer();
+                       // Select
+                       sb.append("select " + SBA + ".*, " + SAVB + ".* ");
+                       sb.append(" from " + SAVB);
+
+                       // join
+                       sb.append(" inner join ");
+                       sb.append(SBA);
+                       sb.append(" on isdescendantnode(" + SBA + ", " + SAVB + ") ");
+                       if (ipClause) {
+                               sb.append(" inner join ");
+                               sb.append(SIP);
+                               sb.append(" on isdescendantnode(" + SIP + ", " + SBA + ") ");
+                       }
+
+                       if (epClause) {
+                               sb.append(" inner join ");
+                               sb.append(SEP);
+                               sb.append(" on isdescendantnode(" + SEP + ", " + SBA + ") ");
+                       }
+
+                       // where
+                       sb.append(" where ");
+                       if (symbolicName.getText() != null
+                                       && !symbolicName.getText().trim().equals("")) {
+                               sb.append(SBA + ".[" + SLC_SYMBOLIC_NAME + "] like '"
+                                               + symbolicName.getText().replace('*', '%') + "'");
+                               hasFirstClause = true;
+                       }
+
+                       if (ipClause) {
+                               if (hasFirstClause)
+                                       sb.append(" AND ");
+                               sb.append(SIP + ".[" + SLC_NAME + "] like '"
+                                               + importedPackage.getText().replace('*', '%') + "'");
+                               hasFirstClause = true;
+                       }
+
+                       if (epClause) {
+                               if (hasFirstClause)
+                                       sb.append(" AND ");
+                               sb.append(SEP + ".[" + SLC_NAME + "] like '"
+                                               + exportedPackage.getText().replace('*', '%') + "'");
+                       }
+                       return sb.toString();
+               } catch (Exception e) {
+                       throw new ArgeoException(
+                                       "Cannot generate where statement to get artifacts", e);
+               }
+       }
+
+       @Override
+       public void setFocus() {
+               executeBtn.setFocus();
+       }
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/wizards/ChangeRightsWizard.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/wizards/ChangeRightsWizard.java
new file mode 100644 (file)
index 0000000..772a8c2
--- /dev/null
@@ -0,0 +1,49 @@
+package org.argeo.slc.client.ui.dist.wizards;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.argeo.ArgeoException;
+import org.argeo.jcr.JcrUtils;
+import org.eclipse.jface.wizard.Wizard;
+
+/**
+ * Small wizard to manage authorizations on the root node of the current
+ * workspace
+ */
+public class ChangeRightsWizard extends Wizard {
+
+       private Session currentSession;
+
+       // This page widget
+       private ChooseRightsPage page;
+
+       public ChangeRightsWizard(Session currentSession) {
+               super();
+               this.currentSession = currentSession;
+       }
+
+       @Override
+       public void addPages() {
+               try {
+                       page = new ChooseRightsPage();
+                       addPage(page);
+               } catch (Exception e) {
+                       throw new ArgeoException("Cannot add page to wizard ", e);
+               }
+       }
+
+       @Override
+       public boolean performFinish() {
+               if (!canFinish())
+                       return false;
+               try {
+                       JcrUtils.addPrivilege(currentSession, "/", page.getGroupName(),
+                                       page.getAuthTypeStr());
+               } catch (RepositoryException re) {
+                       throw new ArgeoException(
+                                       "Unexpected error while setting privileges", re);
+               }
+               return true;
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/wizards/ChooseRightsPage.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/wizards/ChooseRightsPage.java
new file mode 100644 (file)
index 0000000..251ea61
--- /dev/null
@@ -0,0 +1,95 @@
+package org.argeo.slc.client.ui.dist.wizards;
+
+import java.util.regex.Pattern;
+
+import javax.jcr.security.Privilege;
+
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+public class ChooseRightsPage extends WizardPage implements ModifyListener {
+
+       // This page widget
+       private Text groupNameTxt;
+       private Combo authorizationCmb;
+
+       // Define acceptable chars for the technical name
+       private static Pattern p = Pattern.compile("^[A-Za-z0-9]+$");
+
+       // USABLE SHORTCUTS
+       protected final static String[] validAuthType = { Privilege.JCR_READ,
+                       Privilege.JCR_WRITE, Privilege.JCR_ALL };
+
+       public ChooseRightsPage() {
+               super("Main");
+               setTitle("Manange authorizations on the current workspace");
+       }
+
+       public void createControl(Composite parent) {
+               // specify subject
+               Composite composite = new Composite(parent, SWT.NONE);
+               composite.setLayout(new GridLayout(2, false));
+               Label lbl = new Label(composite, SWT.LEAD);
+               lbl.setText("Group or user name (no blank, no special chars)");
+               lbl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+               groupNameTxt = new Text(composite, SWT.LEAD | SWT.BORDER);
+               groupNameTxt.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
+                               false));
+               if (groupNameTxt != null)
+                       groupNameTxt.addModifyListener(this);
+
+               // Choose rigths
+               new Label(composite, SWT.NONE).setText("Choose corresponding rights");
+               authorizationCmb = new Combo(composite, SWT.BORDER | SWT.V_SCROLL);
+               authorizationCmb.setItems(validAuthType);
+               GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+               authorizationCmb.setLayoutData(gd);
+
+               authorizationCmb.select(0);
+
+               // Compulsory
+               setControl(composite);
+       }
+
+       protected String getGroupName() {
+               return groupNameTxt.getText();
+       }
+
+       protected String getAuthTypeStr() {
+               return authorizationCmb.getItem(authorizationCmb.getSelectionIndex());
+       }
+
+       private static boolean match(String s) {
+               return p.matcher(s).matches();
+       }
+
+       public void modifyText(ModifyEvent event) {
+               String message = checkComplete();
+               if (message != null)
+                       setMessage(message, WizardPage.ERROR);
+               else {
+                       setMessage("Complete", WizardPage.INFORMATION);
+                       setPageComplete(true);
+               }
+       }
+
+       /** @return error message or null if complete */
+       protected String checkComplete() {
+               String groupStr = groupNameTxt.getText();
+               if (groupStr == null || "".equals(groupStr))
+                       return "Please enter the name of the corresponding group.";
+               // Remove regexp check for the time being.
+               // else if (!match(groupStr))
+               // return
+               // "Please use only alphanumerical chars for the short technical name.";
+               return null;
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui/.classpath b/plugins/org.argeo.slc.client.ui/.classpath
new file mode 100644 (file)
index 0000000..5641c7c
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/plugins/org.argeo.slc.client.ui/.project b/plugins/org.argeo.slc.client.ui/.project
new file mode 100644 (file)
index 0000000..ed71a2e
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.client.ui</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/plugins/org.argeo.slc.client.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/org.argeo.slc.client.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..95d6b05
--- /dev/null
@@ -0,0 +1,12 @@
+#Wed Aug 04 16:31:36 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.argeo.slc.client.ui/.settings/org.eclipse.pde.core.prefs b/plugins/org.argeo.slc.client.ui/.settings/org.eclipse.pde.core.prefs
new file mode 100644 (file)
index 0000000..31cbfae
--- /dev/null
@@ -0,0 +1,3 @@
+#Tue Jul 27 14:24:51 CEST 2010
+eclipse.preferences.version=1
+resolve.requirebundle=false
diff --git a/plugins/org.argeo.slc.client.ui/META-INF/MANIFEST.MF b/plugins/org.argeo.slc.client.ui/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..f7ddb79
--- /dev/null
@@ -0,0 +1,56 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Ui
+Bundle-SymbolicName: org.argeo.slc.client.ui;singleton:=true
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-Activator: org.argeo.slc.client.ui.ClientUiPlugin
+Require-Bundle: org.eclipse.ui;resolution:=optional,
+ org.eclipse.core.runtime;resolution:=optional,
+ org.eclipse.rap.ui;resolution:=optional,
+ org.eclipse.rap.ui.workbench;resolution:=optional
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.argeo.slc.client.ui,
+ org.argeo.slc.client.ui.views
+Import-Package: javax.jcr;version="2.0.0",
+ javax.jcr.nodetype;version="2.0.0",
+ javax.jcr.observation;version="2.0.0",
+ javax.jcr.query;version="2.0.0",
+ org.apache.commons.io;version="1.4.0",
+ org.apache.commons.logging;version="1.1.1",
+ org.argeo,
+ org.argeo.eclipse.spring,
+ org.argeo.eclipse.ui,
+ org.argeo.eclipse.ui.jcr,
+ org.argeo.eclipse.ui.specific,
+ org.argeo.jcr,
+ org.argeo.jcr.spring,
+ org.argeo.slc,
+ org.argeo.slc.build,
+ org.argeo.slc.client.ui,
+ org.argeo.slc.core.attachment,
+ org.argeo.slc.core.execution,
+ org.argeo.slc.core.runtime,
+ org.argeo.slc.core.structure.tree,
+ org.argeo.slc.core.test.tree,
+ org.argeo.slc.dao.process,
+ org.argeo.slc.dao.test,
+ org.argeo.slc.dao.test.tree,
+ org.argeo.slc.deploy,
+ org.argeo.slc.execution,
+ org.argeo.slc.jcr,
+ org.argeo.slc.jcr.execution,
+ org.argeo.slc.msg.test.tree,
+ org.argeo.slc.process,
+ org.argeo.slc.runtime,
+ org.argeo.slc.services,
+ org.argeo.slc.services.impl,
+ org.argeo.slc.test,
+ org.eclipse.core.expressions,
+ org.eclipse.ui.forms,
+ org.eclipse.ui.forms.editor,
+ org.eclipse.ui.forms.widgets,
+ org.eclipse.ui.plugin,
+ org.springframework.beans.factory,
+ org.springframework.context,
+ org.springframework.core.io.support
diff --git a/plugins/org.argeo.slc.client.ui/META-INF/spring/commands.xml b/plugins/org.argeo.slc.client.ui/META-INF/spring/commands.xml
new file mode 100644 (file)
index 0000000..6ed132d
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+       <bean id="updateModule"
+               class="org.argeo.slc.client.ui.commands.UpdateModule"
+               scope="prototype">
+               <property name="modulesManager" ref="modulesManager"/>
+       </bean>
+<!--   <bean name="runSlc/Flow" -->
+<!--           class="org.argeo.slc.client.ui.commands.RunSlcFlow" -->
+<!--           scope="prototype"> -->
+<!--           <property name="modulesManager" ref="modulesManager"/> -->
+<!--   </bean> -->
+
+       <!-- Result list view commands-->
+<!--   <bean id="org.argeo.slc.client.ui.refreshResultList" -->
+<!--           class="org.argeo.slc.client.ui.commands.ResultListViewRefreshHandler" -->
+<!--           scope="prototype"> -->
+<!--   </bean> -->
+
+<!--   <bean id="org.argeo.slc.client.ui.removeSelectedResultFromResultList" -->
+<!--           class="org.argeo.slc.client.ui.commands.RemoveSelectedResultFromResultList" -->
+<!--           scope="prototype"> -->
+<!--   </bean> -->
+
+
+<!--   <bean id="org.argeo.slc.client.ui.refreshExecutionModulesView" -->
+<!--           class="org.argeo.slc.client.ui.commands.ExecutionModulesViewRefreshHandler" -->
+<!--           scope="prototype"> -->
+<!--   </bean> -->
+<!--   <bean id="org.argeo.slc.client.ui.refreshProcessList" -->
+<!--           class="org.argeo.slc.client.ui.commands.ProcessListViewRefreshHandler" -->
+<!--           scope="prototype"> -->
+<!--   </bean> -->
+<!--   <bean id="org.argeo.slc.client.ui.displayProcessDetails" -->
+<!--           class="org.argeo.slc.client.ui.commands.ProcessDetailsDisplayHandler" -->
+<!--           scope="prototype"> -->
+<!--   </bean> -->
+<!--   <bean id="org.argeo.slc.client.ui.displayResultDetails" -->
+<!--           class="org.argeo.slc.client.ui.commands.ResultDetailsDisplayHandler" -->
+<!--           scope="prototype"> -->
+<!--   </bean> -->
+<!--   <bean id="org.argeo.slc.client.ui.launchBatch" class="org.argeo.slc.client.ui.commands.LaunchBatchHandler" -->
+<!--           scope="prototype"> -->
+<!--   </bean> -->
+<!--   <bean id="org.argeo.slc.client.ui.removeSelectedFromBatch" -->
+<!--           class="org.argeo.slc.client.ui.commands.RemoveSelectedProcessFromBatchHandler" -->
+<!--           scope="prototype"> -->
+<!--   </bean> -->
+<!--   <bean id="org.argeo.slc.client.ui.clearBatch" class="org.argeo.slc.client.ui.commands.ClearBatchHandler" -->
+<!--           scope="prototype"> -->
+<!--   </bean> -->
+<!--   <bean id="org.argeo.slc.client.ui.manageBundles" class="org.argeo.slc.client.ui.commands.ManageBundlesHandler" -->
+<!--           scope="prototype"> -->
+<!--   </bean>  -->
+</beans>
diff --git a/plugins/org.argeo.slc.client.ui/META-INF/spring/controllers.xml b/plugins/org.argeo.slc.client.ui/META-INF/spring/controllers.xml
new file mode 100644 (file)
index 0000000..229d6d1
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+       <bean id="processController" class="org.argeo.slc.client.ui.controllers.ProcessController">
+       </bean>
+</beans>
diff --git a/plugins/org.argeo.slc.client.ui/META-INF/spring/editors.xml b/plugins/org.argeo.slc.client.ui/META-INF/spring/editors.xml
new file mode 100644 (file)
index 0000000..31267a1
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+       <bean id="processEditor" class="org.argeo.slc.client.ui.editors.ProcessEditor"
+               scope="prototype">
+               <property name="processController" ref="processController" />
+               <property name="modulesManager" ref="modulesManager" />
+               <property name="session">
+                       <bean factory-bean="repository" factory-method="login" />
+               </property>
+       </bean>
+</beans>
diff --git a/plugins/org.argeo.slc.client.ui/META-INF/spring/jcr.xml b/plugins/org.argeo.slc.client.ui/META-INF/spring/jcr.xml
new file mode 100644 (file)
index 0000000..b2043e2
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+       <bean id="session" class="org.argeo.jcr.spring.ThreadBoundSession">
+               <property name="repository" ref="repository" />
+       </bean>
+</beans>
diff --git a/plugins/org.argeo.slc.client.ui/META-INF/spring/osgi.xml b/plugins/org.argeo.slc.client.ui/META-INF/spring/osgi.xml
new file mode 100644 (file)
index 0000000..0c121d3
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+       xmlns:osgi="http://www.springframework.org/schema/osgi"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+       http://www.springframework.org/schema/beans   \r
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"\r
+       osgi:default-timeout="30000">\r
+\r
+       <beans:description>SLC UI</beans:description>\r
+\r
+       <!-- REFERENCES -->\r
+       <reference id="repository" interface="javax.jcr.Repository"\r
+               filter="(argeo.jcr.repository.alias=slc)" />\r
+       <list id="agentFactories" interface="org.argeo.slc.runtime.SlcAgentFactory">\r
+               <osgi:listener ref="processController" bind-method="register"\r
+                       unbind-method="unregister" />\r
+       </list>\r
+       <reference id="modulesManager"\r
+               interface="org.argeo.slc.execution.ExecutionModulesManager" />\r
+\r
+\r
+       <!-- Services exposed by the current bundle -->\r
+\r
+       <!-- Listeners used by the execution modules -->\r
+<!--   <service ref="testManagerServiceAdapter" -->\r
+<!--           interface="org.argeo.slc.core.test.tree.TreeTestResultListener" /> -->\r
+<!--   <service ref="slcExecutionServiceAdapter" interface="org.argeo.slc.process.SlcExecutionNotifier" /> -->\r
+\r
+\r
+\r
+<!--   <reference id="slcExecutionService" interface="org.argeo.slc.services.SlcExecutionService" /> -->\r
+<!--   <reference id="testManagerService" interface="org.argeo.slc.services.TestManagerService" /> -->\r
+<!--   <reference id="oxmBean" interface="org.argeo.slc.client.oxm.OxmInterface" /> -->\r
+\r
+       <!-- References Needed -->\r
+       <!-- <reference id="marshaller" interface="org.springframework.oxm.Marshaller" \r
+               /> <reference id="unmarshaller" interface="org.springframework.oxm.Unmarshaller" \r
+               /> -->\r
+\r
+       <!-- DAO -->\r
+<!--   <reference id="testResultCollectionDao" -->\r
+<!--           interface="org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao" -->\r
+<!--           context-class-loader="service-provider" /> -->\r
+\r
+<!--   <reference id="treeTestResultDao" interface="org.argeo.slc.dao.test.tree.TreeTestResultDao" -->\r
+<!--           context-class-loader="service-provider" /> -->\r
+\r
+\r
+<!--   <reference id="slcExecutionDao" interface="org.argeo.slc.dao.process.SlcExecutionDao" -->\r
+<!--           context-class-loader="service-provider" /> -->\r
+\r
+       <!-- Content providers are deported in an other bundle for UI not to depend \r
+               on DB used implementation. We use bean-name reference because interface is \r
+               not enough to choose between various been with same interface -->\r
+<!--   <reference id="processListTableLabelProvider" interface="org.eclipse.jface.viewers.ITableLabelProvider" -->\r
+<!--           bean-name="processListTableLabelProvider" /> -->\r
+<!--   <reference id="processListStructuredContentProvider" -->\r
+<!--           interface="org.eclipse.jface.viewers.IStructuredContentProvider" -->\r
+<!--           bean-name="processListStructuredContentProvider" /> -->\r
+<!--   <reference id="processDetailContentProvider" -->\r
+<!--           interface="org.eclipse.jface.viewers.ITreeContentProvider" bean-name="processDetailContentProvider" /> -->\r
+<!--   <reference id="resultDetailContentProvider" -->\r
+<!--           interface="org.eclipse.jface.viewers.ITreeContentProvider" bean-name="resultDetailContentProvider" /> -->\r
+<!--   <reference id="resultDetailLabelProvider" interface="org.eclipse.jface.viewers.ITableLabelProvider" -->\r
+<!--           bean-name="resultDetailLabelProvider" /> -->\r
+\r
+\r
+       <!-- TODO : what is it for ? -->\r
+<!--   <list id="slcAgents" interface="org.argeo.slc.runtime.SlcAgent" /> -->\r
+</beans:beans>
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui/META-INF/spring/views.xml b/plugins/org.argeo.slc.client.ui/META-INF/spring/views.xml
new file mode 100644 (file)
index 0000000..9c4b4a9
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+       <bean id="jcrExecutionModulesView" class="org.argeo.slc.client.ui.views.JcrExecutionModulesView"
+               scope="prototype">
+               <property name="session" ref="session" />
+               <property name="modulesManager" ref="modulesManager" />
+       </bean>
+
+       <bean id="jcrProcessListView" class="org.argeo.slc.client.ui.views.JcrProcessListView"
+               scope="prototype">
+               <property name="session" ref="session" />
+       </bean>
+
+       <bean id="jcrResultListView" class="org.argeo.slc.client.ui.views.JcrResultListView"
+               scope="prototype">
+               <property name="session" ref="session" />
+       </bean>
+
+</beans>
diff --git a/plugins/org.argeo.slc.client.ui/build.properties b/plugins/org.argeo.slc.client.ui/build.properties
new file mode 100644 (file)
index 0000000..a1c313d
--- /dev/null
@@ -0,0 +1,6 @@
+source.. = src/main/java
+output.. = target/classes
+bin.includes = plugin.xml,\
+               META-INF/,\
+               .,\
+               icons/
diff --git a/plugins/org.argeo.slc.client.ui/icons/agent.gif b/plugins/org.argeo.slc.client.ui/icons/agent.gif
new file mode 100644 (file)
index 0000000..0a1fa96
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/agent.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/agentFactory.gif b/plugins/org.argeo.slc.client.ui/icons/agentFactory.gif
new file mode 100644 (file)
index 0000000..b51ae39
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/agentFactory.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/archive.png b/plugins/org.argeo.slc.client.ui/icons/archive.png
new file mode 100644 (file)
index 0000000..fb36f36
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/archive.png differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/batch.gif b/plugins/org.argeo.slc.client.ui/icons/batch.gif
new file mode 100644 (file)
index 0000000..b8ca14a
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/batch.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/choices.gif b/plugins/org.argeo.slc.client.ui/icons/choices.gif
new file mode 100644 (file)
index 0000000..da2f577
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/choices.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/clear_batch.gif b/plugins/org.argeo.slc.client.ui/icons/clear_batch.gif
new file mode 100644 (file)
index 0000000..28a3785
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/clear_batch.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/computer.png b/plugins/org.argeo.slc.client.ui/icons/computer.png
new file mode 100644 (file)
index 0000000..ff64b84
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/computer.png differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/edit_parameters.gif b/plugins/org.argeo.slc.client.ui/icons/edit_parameters.gif
new file mode 100644 (file)
index 0000000..94eedf6
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/edit_parameters.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/error.gif b/plugins/org.argeo.slc.client.ui/icons/error.gif
new file mode 100644 (file)
index 0000000..64b4384
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/error.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/excel.png b/plugins/org.argeo.slc.client.ui/icons/excel.png
new file mode 100644 (file)
index 0000000..eb6158e
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/excel.png differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/executionSpec.gif b/plugins/org.argeo.slc.client.ui/icons/executionSpec.gif
new file mode 100644 (file)
index 0000000..1ff93cb
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/executionSpec.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/executionSpecAttribute.gif b/plugins/org.argeo.slc.client.ui/icons/executionSpecAttribute.gif
new file mode 100644 (file)
index 0000000..bee687c
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/executionSpecAttribute.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/executionSpecs.gif b/plugins/org.argeo.slc.client.ui/icons/executionSpecs.gif
new file mode 100644 (file)
index 0000000..0b63124
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/executionSpecs.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/execution_module.gif b/plugins/org.argeo.slc.client.ui/icons/execution_module.gif
new file mode 100644 (file)
index 0000000..983932f
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/execution_module.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/failed.gif b/plugins/org.argeo.slc.client.ui/icons/failed.gif
new file mode 100644 (file)
index 0000000..3e9d893
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/failed.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/flow.png b/plugins/org.argeo.slc.client.ui/icons/flow.png
new file mode 100644 (file)
index 0000000..114193f
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/flow.png differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/folder.gif b/plugins/org.argeo.slc.client.ui/icons/folder.gif
new file mode 100644 (file)
index 0000000..42e027c
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/folder.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/folder.png b/plugins/org.argeo.slc.client.ui/icons/folder.png
new file mode 100644 (file)
index 0000000..6937ed4
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/folder.png differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/kill.png b/plugins/org.argeo.slc.client.ui/icons/kill.png
new file mode 100644 (file)
index 0000000..cfbf9d1
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/kill.png differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/launch.gif b/plugins/org.argeo.slc.client.ui/icons/launch.gif
new file mode 100644 (file)
index 0000000..ec477ea
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/launch.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/module.png b/plugins/org.argeo.slc.client.ui/icons/module.png
new file mode 100644 (file)
index 0000000..0afea5b
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/module.png differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/module_stopped.gif b/plugins/org.argeo.slc.client.ui/icons/module_stopped.gif
new file mode 100644 (file)
index 0000000..c88284a
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/module_stopped.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/passed.gif b/plugins/org.argeo.slc.client.ui/icons/passed.gif
new file mode 100644 (file)
index 0000000..23c97f0
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/passed.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/process_completed.png b/plugins/org.argeo.slc.client.ui/icons/process_completed.png
new file mode 100644 (file)
index 0000000..0ad64e7
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/process_completed.png differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/process_details.gif b/plugins/org.argeo.slc.client.ui/icons/process_details.gif
new file mode 100644 (file)
index 0000000..c81630a
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/process_details.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/process_error.png b/plugins/org.argeo.slc.client.ui/icons/process_error.png
new file mode 100644 (file)
index 0000000..e66c98e
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/process_error.png differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/process_running.png b/plugins/org.argeo.slc.client.ui/icons/process_running.png
new file mode 100644 (file)
index 0000000..471c091
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/process_running.png differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/process_scheduled.gif b/plugins/org.argeo.slc.client.ui/icons/process_scheduled.gif
new file mode 100644 (file)
index 0000000..b7f03d5
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/process_scheduled.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/processes.gif b/plugins/org.argeo.slc.client.ui/icons/processes.gif
new file mode 100644 (file)
index 0000000..364c0e7
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/processes.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/processes.png b/plugins/org.argeo.slc.client.ui/icons/processes.png
new file mode 100644 (file)
index 0000000..364c0e7
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/processes.png differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/refresh.png b/plugins/org.argeo.slc.client.ui/icons/refresh.png
new file mode 100644 (file)
index 0000000..a3884fb
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/refresh.png differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/relaunch.gif b/plugins/org.argeo.slc.client.ui/icons/relaunch.gif
new file mode 100644 (file)
index 0000000..8f943a8
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/relaunch.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/removeAll.png b/plugins/org.argeo.slc.client.ui/icons/removeAll.png
new file mode 100644 (file)
index 0000000..73053c4
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/removeAll.png differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/remove_one.gif b/plugins/org.argeo.slc.client.ui/icons/remove_one.gif
new file mode 100644 (file)
index 0000000..2cd9c54
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/remove_one.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/result_details.gif b/plugins/org.argeo.slc.client.ui/icons/result_details.gif
new file mode 100644 (file)
index 0000000..4017f6d
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/result_details.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/results.gif b/plugins/org.argeo.slc.client.ui/icons/results.gif
new file mode 100644 (file)
index 0000000..0dc862c
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/results.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/slc_execution_perspective.gif b/plugins/org.argeo.slc.client.ui/icons/slc_execution_perspective.gif
new file mode 100644 (file)
index 0000000..b8ca14a
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/slc_execution_perspective.gif differ
diff --git a/plugins/org.argeo.slc.client.ui/icons/system.png b/plugins/org.argeo.slc.client.ui/icons/system.png
new file mode 100644 (file)
index 0000000..71f44d0
Binary files /dev/null and b/plugins/org.argeo.slc.client.ui/icons/system.png differ
diff --git a/plugins/org.argeo.slc.client.ui/plugin.xml b/plugins/org.argeo.slc.client.ui/plugin.xml
new file mode 100644 (file)
index 0000000..bd42332
--- /dev/null
@@ -0,0 +1,290 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+       <!-- Views --> 
+   <extension
+         point="org.eclipse.ui.views">
+          <view
+                id="org.argeo.slc.client.ui.jcrExecutionModulesView"
+                class="org.argeo.eclipse.spring.SpringExtensionFactory"
+                icon="icons/execution_module.gif"
+                name="Execution"
+                restorable="true">
+          </view>
+          <view
+                id="org.argeo.slc.client.ui.jcrResultListView"
+                class="org.argeo.eclipse.spring.SpringExtensionFactory"
+                icon="icons/results.gif"
+                name="Results"
+                restorable="true">
+          </view>
+          <view
+                id="org.argeo.slc.client.ui.jcrProcessListView"
+                class="org.argeo.eclipse.spring.SpringExtensionFactory"
+                name="Processes"
+                icon="icons/processes.gif"
+                restorable="true">
+          </view>
+          <!--
+          <view
+                id="org.argeo.slc.client.ui.executionModulesView"
+                class="org.argeo.eclipse.spring.SpringExtensionFactory"
+                icon="icons/execution_module.gif"
+                name="Execution Modules"
+                restorable="true">
+          </view>
+          <view
+                class="org.argeo.eclipse.spring.SpringExtensionFactory"
+                icon="icons/results.gif"
+                id="org.argeo.slc.client.ui.resultListView"
+                name="Results"
+                restorable="true">
+          </view>
+          <view
+                allowMultiple="true"
+                class="org.argeo.eclipse.spring.SpringExtensionFactory"
+                icon="icons/result_details.gif"
+                id="org.argeo.slc.client.ui.resultDetailView"
+                name="Result details"
+                restorable="true">
+          </view>
+          <view
+                id="org.argeo.slc.client.ui.processListView"
+                class="org.argeo.eclipse.spring.SpringExtensionFactory"
+                name="Processes"
+                icon="icons/processes.gif"
+                restorable="true">
+          </view>
+          <view
+                allowMultiple="true"
+                class="org.argeo.eclipse.spring.SpringExtensionFactory"
+                icon="icons/process_details.gif"
+                id="org.argeo.slc.client.ui.processDetailView"
+                name="Process details"
+                restorable="true">
+          </view>
+          <view
+                class="org.argeo.eclipse.spring.SpringExtensionFactory"
+                icon="icons/edit_parameters.gif"
+                id="org.argeo.slc.client.ui.processParametersView"
+                name="Process Parameters"
+                restorable="true">
+          </view>
+          <view
+                class="org.argeo.eclipse.spring.SpringExtensionFactory"
+                icon="icons/batch.gif"
+                id="org.argeo.slc.client.ui.processBuilderView"
+                name="Batch"
+                restorable="true">
+          </view>
+          -->
+   </extension>
+       
+       <!-- Commands definitions --> 
+       <extension
+       point="org.eclipse.ui.commands">
+               <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.slc.client.ui.updateModule"
+               name="Update Module">
+           </command>
+           <!--
+               <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.slc.client.ui.runSlc/Flow"
+               name="org.argeo.slc.demo.minimal:hello">
+           </command>
+           -->
+           <!-- Result List
+               <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.slc.client.ui.refreshResultList"
+               name="Refresh Result List">
+           </command>
+               <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.slc.client.ui.removeSelectedResultFromResultList"
+               name="Remove selected results from list">
+           </command>
+               <command 
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.slc.client.ui.displayResultDetails"
+               name="Display Result Details">
+               </command>
+        -->
+           <!-- Execution Modules
+           <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.slc.client.ui.refreshExecutionModulesView"
+               name="Refresh Execution Modules View">
+               </command>
+                -->
+           <!-- Batch
+           <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.slc.client.ui.launchBatch"
+               name="Launch Batch">
+           </command>
+           <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.slc.client.ui.removeSelectedFromBatch"
+               name="Remove Selected From Batch">
+               </command>
+           <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.slc.client.ui.clearBatch"
+               name="Clear Batch">
+               </command>
+                -->
+           <!-- Process List
+           <command
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.slc.client.ui.refreshProcessList"
+               name="Refresh Process List ">
+               </command>
+               <command 
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.slc.client.ui.displayProcessDetails"
+               name="DisplayProcessDetails">
+                       <commandParameter
+                       id="org.argeo.slc.client.commands.processUuid"
+                       name="Process UUID">
+                       </commandParameter>
+               </command>
+               <command 
+               defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
+               id="org.argeo.slc.client.ui.manageBundles"
+               name="Manage Bundles">
+               </command>
+                -->
+    </extension>
+   
+       <!-- Menu definitions -->
+       <extension
+       id="menu:org.eclipse.ui.main.menu"
+        point="org.eclipse.ui.menus">
+               <menuContribution
+               locationURI="toolbar:org.argeo.slc.client.ui.jcrExecutionModulesView">
+                       <command
+                               commandId="org.argeo.slc.client.ui.updateModule"
+                               icon="icons/refresh.png"
+                               label="Update module"
+                               tooltip="Update module">
+                       </command>
+                       <!--
+                       <command
+                               commandId="org.argeo.slc.client.ui.runSlc/Flow"
+                               icon="icons/launch.gif"
+                               label="Run SLC Flow"
+                               tooltip="Run SLC Flow">
+                       </command>
+                       -->
+               </menuContribution>   
+        <!--
+               <menuContribution
+               locationURI="menu:fileMenu">
+               </menuContribution>
+               <menuContribution
+                       locationURI="toolbar:org.argeo.slc.client.ui.resultListView">
+            <command
+               commandId="org.argeo.slc.client.ui.refreshResultList"
+                icon="icons/refresh.png"
+                label="Refresh result list"
+                tooltip="Refresh the result list">
+            </command>
+            <command
+               commandId="org.argeo.slc.client.ui.removeSelectedResultFromResultList"
+                icon="icons/removeAll.png"
+                label="Remove selected"
+                tooltip="Remove selected items from the result list (Also on server side, cannot be undone)">
+            </command>
+               </menuContribution>
+               <menuContribution
+               locationURI="toolbar:org.argeo.slc.client.ui.executionModulesView">
+                       <command
+                               commandId="org.argeo.slc.client.ui.refreshExecutionModulesView"
+                               icon="icons/refresh.png"
+                               label="Refresh execution modules"
+                               tooltip="Refresh the execution modules view.">
+                       </command>
+               </menuContribution>   
+               <menuContribution
+                       locationURI="toolbar:org.argeo.slc.client.ui.processBuilderView">
+                       <command
+                               commandId="org.argeo.slc.client.ui.launchBatch"
+                               icon="icons/launch.gif"
+                               label="Launch Batch"
+                               tooltip="Launch the batch built in the process builder view.">
+                       </command>
+                       <command
+                               commandId="org.argeo.slc.client.ui.clearBatch"
+                               label="Clear Batch"
+                               icon="icons/clear_batch.gif"
+                               tooltip="Clear the batch built in the process builder view.">
+                       </command>
+                       <command
+                               commandId="org.argeo.slc.client.ui.removeSelectedFromBatch"
+                               icon="icons/remove_one.gif"
+                               label="Remove Selected From Batch"
+                               tooltip="Remove selected process from process builder view.">
+                       </command>
+               </menuContribution>
+               -->
+       </extension>
+   <extension
+         point="org.eclipse.ui.perspectives">
+      <perspective
+            class="org.argeo.slc.client.ui.SlcExecutionPerspective"
+            icon="icons/slc_execution_perspective.gif"
+            id="org.argeo.slc.client.ui.slcExecutionPerspective"
+            name="SLC Execution">
+      </perspective>
+   </extension>
+   <extension
+         point="org.eclipse.ui.editors">
+      <editor
+            class="org.argeo.eclipse.spring.SpringExtensionFactory"
+            default="false"
+            icon="icons/batch.gif"
+            id="org.argeo.slc.client.ui.processEditor"
+            name="Process">
+      </editor>
+   </extension>
+   <extension
+         point="org.eclipse.ui.elementFactories">
+      <factory
+            class="org.argeo.slc.client.ui.editors.ProcessEditorInputFactory"
+            id="org.argeo.slc.client.ui.processEditorInputFactory">
+      </factory>
+   </extension>
+   <extension
+           point="org.eclipse.ui.activities">
+     </extension>
+  <extension
+           point="org.eclipse.ui.activities">
+        <activity
+              description="SLC users"
+              id="org.argeo.slc.client.ui.slcActivity"
+              name="SLC">
+                 <enabledWhen>
+                   <with variable="roles">
+                     <iterate ifEmpty="false" operator="or">
+                       <equals value="ROLE_SLC" />
+                     </iterate>
+                   </with>
+                 </enabledWhen>
+        </activity>
+        <!-- TODO: find a way to exclude evrything -->
+        <activityPatternBinding
+              activityId="org.argeo.slc.client.ui.slcActivity"
+              isEqualityPattern="true"
+              pattern="org.argeo.slc.client.ui/org.argeo.slc.client.ui.slcExecutionPerspective">
+        </activityPatternBinding>
+        <activityPatternBinding
+              activityId="org.argeo.security.ui.adminActivity"
+              isEqualityPattern="true"
+              pattern="org.argeo.slc.client.ui/org.argeo.slc.client.ui.slcExecutionPerspective">
+        </activityPatternBinding>
+     </extension>
+</plugin>
diff --git a/plugins/org.argeo.slc.client.ui/pom.xml b/plugins/org.argeo.slc.client.ui/pom.xml
new file mode 100644 (file)
index 0000000..95c2787
--- /dev/null
@@ -0,0 +1,71 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>plugins</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.client.ui</artifactId>
+       <name>SLC Client UI</name>
+       <packaging>jar</packaging>
+
+
+       <dependencies>
+               <!-- SLC Client UI -->
+               <!-- <dependency> -->
+               <!-- <groupId>org.argeo.slc</groupId> -->
+               <!-- <artifactId>org.argeo.slc.client.oxm</artifactId> -->
+               <!-- <version>${version.slc}</version> -->
+               <!-- </dependency> -->
+               <!-- <dependency> -->
+               <!-- <groupId>org.argeo.slc</groupId> -->
+               <!-- <artifactId>org.argeo.slc.client.core</artifactId> -->
+               <!-- <version>${version.slc}</version> -->
+               <!-- </dependency> -->
+
+               <!-- SLC -->
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.core</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.support.jcr</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.server</artifactId>
+                       <version>1.1.3-SNAPSHOT</version>
+               </dependency>
+
+               <!-- Argeo Eclipse -->
+               <dependency>
+                       <groupId>org.argeo.commons.base</groupId>
+                       <artifactId>org.argeo.eclipse.ui</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.base</groupId>
+                       <artifactId>org.argeo.eclipse.ui.jcr</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+
+               <!-- Eclipse and RCP only dependency, needed at compile time -->
+               <dependency>
+                       <groupId>org.argeo.commons.base</groupId>
+                       <artifactId>org.argeo.eclipse.ui.rcp</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.base</groupId>
+                       <artifactId>org.argeo.eclipse.dep.rcp</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <scope>provided</scope>
+               </dependency>
+       </dependencies>
+</project>
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/ClientUiPlugin.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/ClientUiPlugin.java
new file mode 100644 (file)
index 0000000..9d794fb
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/** The activator class controls the plug-in life cycle */
+public class ClientUiPlugin extends AbstractUIPlugin {
+       public static final String ID = "org.argeo.slc.client.ui";
+       private static ClientUiPlugin plugin;
+
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+               plugin = this;
+       }
+
+       public void stop(BundleContext context) throws Exception {
+               plugin = null;
+               super.stop(context);
+       }
+
+       public static ClientUiPlugin getDefault() {
+               return plugin;
+       }
+
+       /** Creates the image */
+       public static Image img(String path) {
+               return getImageDescriptor(path).createImage();
+       }
+
+       public static ImageDescriptor getImageDescriptor(String path) {
+               return imageDescriptorFromPlugin(ID, path);
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/SlcExecutionPerspective.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/SlcExecutionPerspective.java
new file mode 100644 (file)
index 0000000..a95970c
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui;
+
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+public class SlcExecutionPerspective implements IPerspectiveFactory {
+
+       public void createInitialLayout(IPageLayout layout) {
+               String editorArea = layout.getEditorArea();
+               layout.setEditorAreaVisible(true);
+               layout.setFixed(false);
+
+               // Create the main ui layout
+
+               // For a vertical split, the part on top gets the specified ratio of the
+               // current space and the part on bottom gets the rest. Likewise, for a
+               // horizontal split, the part at left gets the specified ratio of the
+               // current space.
+               // IFolderLayout main = layout.createFolder("main", IPageLayout.RIGHT,
+               // 0.3f, editorArea);
+               IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT,
+                               0.3f, editorArea);
+
+               IFolderLayout bottom = layout.createFolder("bottom",
+                               IPageLayout.BOTTOM, 0.65f, editorArea);
+               bottom.addView("org.argeo.security.ui.logView");
+               bottom.addView("org.argeo.slc.client.ui.jcrProcessListView");
+
+               // IFolderLayout topRight = layout.createFolder("topRight",
+               // IPageLayout.RIGHT, 0.6f, "main");
+
+               // add the views to the corresponding place holder
+               left.addView("org.argeo.slc.client.ui.jcrExecutionModulesView");
+               left.addView("org.argeo.slc.client.ui.jcrResultListView");
+
+               // main.addView("org.argeo.slc.client.ui.processBuilderView");
+               // main.addPlaceholder("org.argeo.slc.client.ui.resultDetailView:UUID-*");
+               // main.addPlaceholder("org.argeo.slc.client.ui.processDetailView:UUID-*");
+
+               // topRight.addView("org.argeo.slc.client.ui.processParametersView");
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/SlcImages.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/SlcImages.java
new file mode 100644 (file)
index 0000000..18f4b94
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui;
+
+import static org.argeo.slc.client.ui.ClientUiPlugin.img;
+
+import org.eclipse.swt.graphics.Image;
+
+/** Shared images. */
+public class SlcImages {
+       public final static Image AGENT = img("icons/agent.gif");
+       public final static Image AGENT_FACTORY = img("icons/agentFactory.gif");
+       public final static Image MODULE = img("icons/module.png");
+       public final static Image MODULE_STOPPED = img("icons/module_stopped.gif");
+       public final static Image FOLDER = img("icons/folder.gif");
+       public final static Image FLOW = img("icons/flow.png");
+       public final static Image PROCESSES = img("icons/processes.gif");
+       public final static Image PASSED = img("icons/passed.gif");
+       public final static Image ERROR = img("icons/error.gif");
+       public final static Image LAUNCH = img("icons/launch.gif");
+       public final static Image RELAUNCH = img("icons/relaunch.gif");
+       public final static Image KILL = img("icons/kill.png");
+       public final static Image REMOVE_ONE = img("icons/remove_one.gif");
+       public final static Image REMOVE_ALL = img("icons/removeAll.png");
+       public final static Image EXECUTION_SPECS = img("icons/executionSpecs.gif");
+       public final static Image EXECUTION_SPEC = img("icons/executionSpec.gif");
+       public final static Image EXECUTION_SPEC_ATTRIBUTE = img("icons/executionSpecAttribute.gif");
+       public final static Image CHOICES = img("icons/choices.gif");
+       public final static Image PROCESS_ERROR = img("icons/process_error.png");
+       public final static Image PROCESS_SCHEDULED = img("icons/process_scheduled.gif");
+       public final static Image PROCESS_RUNNING = img("icons/process_running.png");
+       public final static Image PROCESS_COMPLETED = img("icons/process_completed.png");
+}
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/RunSlcFlow.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/RunSlcFlow.java
new file mode 100644 (file)
index 0000000..00f989d
--- /dev/null
@@ -0,0 +1,65 @@
+package org.argeo.slc.client.ui.commands;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.argeo.slc.SlcException;
+import org.argeo.slc.execution.ExecutionFlowDescriptor;
+import org.argeo.slc.execution.ExecutionModulesManager;
+import org.argeo.slc.process.RealizedFlow;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IParameter;
+
+public class RunSlcFlow extends AbstractHandler {
+       private ExecutionModulesManager modulesManager;
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               try {
+                       Command command = event.getCommand();
+                       String name = command.getName();
+                       String module = name.substring(0, name.indexOf(':'));
+                       String flowName = name.substring(name.indexOf(':') + 1);
+
+                       final RealizedFlow realizedFlow = new RealizedFlow();
+                       realizedFlow.setModuleName(module);
+                       // FIXME deal with version
+                       String version = "0.0.0";
+                       realizedFlow.setModuleVersion(version);
+                       ExecutionFlowDescriptor efd = new ExecutionFlowDescriptor();
+                       efd.setName(flowName);
+
+                       Map<String, Object> values = new HashMap<String, Object>();
+                       if (command.getParameters() != null) {
+                               for (IParameter param : command.getParameters()) {
+                                       String argName = param.getId();
+                                       // FIXME make it safer
+                                       Object value = param.getValues().getParameterValues()
+                                                       .values().iterator().next();
+                                       values.put(argName, value);
+                               }
+                               efd.setValues(values);
+                       }
+                       realizedFlow.setFlowDescriptor(efd);
+                       // new Thread("SLC Flow " + name + " from Eclipse command "
+                       // + command.getId()) {
+                       // public void run() {
+                       modulesManager.start(realizedFlow.getModuleNameVersion());
+                       modulesManager.execute(realizedFlow);
+                       // }
+                       // }.start();
+                       return null;
+               } catch (Exception e) {
+                       throw new SlcException("Could not execute command "
+                                       + event.getCommand() + " as SLC flow", e);
+               }
+       }
+
+       public void setModulesManager(
+                       ExecutionModulesManager executionModulesManager) {
+               this.modulesManager = executionModulesManager;
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/UpdateModule.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/UpdateModule.java
new file mode 100644 (file)
index 0000000..225bd41
--- /dev/null
@@ -0,0 +1,127 @@
+/*\r
+ * Copyright (C) 2007-2012 Mathieu Baudier\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *         http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.client.ui.commands;\r
+\r
+import java.util.HashMap;\r
+import java.util.Iterator;\r
+import java.util.Map;\r
+\r
+import javax.jcr.Node;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.argeo.slc.BasicNameVersion;\r
+import org.argeo.slc.NameVersion;\r
+import org.argeo.slc.SlcException;\r
+import org.argeo.slc.deploy.ModulesManager;\r
+import org.argeo.slc.jcr.SlcNames;\r
+import org.argeo.slc.jcr.SlcTypes;\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.core.runtime.Status;\r
+import org.eclipse.core.runtime.jobs.Job;\r
+import org.eclipse.jface.viewers.ISelection;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+\r
+/** Deletes one or many results */\r
+public class UpdateModule extends AbstractHandler {\r
+       private final static Log log = LogFactory.getLog(UpdateModule.class);\r
+\r
+       private ModulesManager modulesManager;\r
+\r
+       public Object execute(ExecutionEvent event) throws ExecutionException {\r
+               final ISelection selection = HandlerUtil\r
+                               .getActiveWorkbenchWindow(event).getActivePage().getSelection();\r
+               if (selection != null && selection instanceof IStructuredSelection) {\r
+                       UpdateJob job = new UpdateJob(selection);\r
+                       job.setUser(true);\r
+                       job.schedule();\r
+               }\r
+               return null;\r
+       }\r
+\r
+       private class UpdateJob extends Job {\r
+               private final IStructuredSelection selection;\r
+\r
+               public UpdateJob(ISelection selection) {\r
+                       super("Update modules");\r
+                       this.selection = ((IStructuredSelection) selection);\r
+               }\r
+\r
+               @Override\r
+               protected IStatus run(IProgressMonitor monitor) {\r
+                       Iterator<?> it = selection.iterator();\r
+                       Object obj = null;\r
+                       try {\r
+                               Map<String, Node> nodes = new HashMap<String, Node>();\r
+                               nodes: while (it.hasNext()) {\r
+                                       obj = it.next();\r
+                                       if (obj instanceof Node) {\r
+                                               Node node = (Node) obj;\r
+                                               Node executionModuleNode = null;\r
+                                               while (executionModuleNode == null) {\r
+                                                       if (node.isNodeType(SlcTypes.SLC_EXECUTION_MODULE)) {\r
+                                                               executionModuleNode = node;\r
+                                                       }\r
+                                                       node = node.getParent();\r
+                                                       if (node.getPath().equals("/"))// root\r
+                                                               continue nodes;\r
+                                               }\r
+\r
+                                               if (!nodes.containsKey(executionModuleNode.getPath()))\r
+                                                       nodes.put(executionModuleNode.getPath(),\r
+                                                                       executionModuleNode);\r
+                                       }\r
+                               }\r
+\r
+                               monitor.beginTask("Update modules", nodes.size());\r
+                               for (Node executionModuleNode : nodes.values()) {\r
+                                       monitor.subTask("Update " + executionModuleNode.getName());\r
+                                       NameVersion nameVersion = new BasicNameVersion(\r
+                                                       executionModuleNode.getProperty(SlcNames.SLC_NAME)\r
+                                                                       .getString(), executionModuleNode\r
+                                                                       .getProperty(SlcNames.SLC_VERSION)\r
+                                                                       .getString());\r
+                                       modulesManager.upgrade(nameVersion);\r
+                                       monitor.worked(1);\r
+                                       log.info("Module " + nameVersion + " updated");\r
+                                       if (monitor.isCanceled())\r
+                                               return Status.CANCEL_STATUS;\r
+                               }\r
+                               return Status.OK_STATUS;\r
+                       } catch (Exception e) {\r
+                               throw new SlcException("Cannot update module " + obj, e);\r
+                               // return Status.CANCEL_STATUS;\r
+                       }\r
+               }\r
+\r
+               @Override\r
+               protected void canceling() {\r
+                       getThread().interrupt();\r
+                       super.canceling();\r
+               }\r
+\r
+       }\r
+\r
+       public void setModulesManager(ModulesManager modulesManager) {\r
+               this.modulesManager = modulesManager;\r
+       }\r
+\r
+}\r
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/controllers/ProcessController.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/controllers/ProcessController.java
new file mode 100644 (file)
index 0000000..cdeb01e
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.controllers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Property;
+import javax.jcr.RepositoryException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.execution.ExecutionProcess;
+import org.argeo.slc.jcr.SlcJcrConstants;
+import org.argeo.slc.jcr.SlcJcrUtils;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.execution.JcrExecutionProcess;
+import org.argeo.slc.runtime.SlcAgent;
+import org.argeo.slc.runtime.SlcAgentFactory;
+
+/**
+ * We use a separate class (not in UI components) so that it can be a singleton
+ * in an application context.
+ */
+public class ProcessController {
+       private final static Log log = LogFactory.getLog(ProcessController.class);
+       private Map<String, SlcAgentFactory> agentFactories = new HashMap<String, SlcAgentFactory>();
+
+       public ExecutionProcess process(Node processNode) {
+               JcrExecutionProcess process = new JcrExecutionProcess(processNode);
+               try {
+                       SlcAgent slcAgent = findAgent(processNode);
+                       if (slcAgent == null)
+                               throw new SlcException("Cannot find agent for " + processNode);
+                       slcAgent.process(process);
+                       return process;
+               } catch (Exception e) {
+                       if (!process.getStatus().equals(ExecutionProcess.ERROR))
+                               process.setStatus(ExecutionProcess.ERROR);
+                       throw new SlcException("Cannot execute " + processNode, e);
+               }
+       }
+
+       public void kill(Node processNode) {
+               JcrExecutionProcess process = new JcrExecutionProcess(processNode);
+               try {
+                       SlcAgent slcAgent = findAgent(processNode);
+                       if (slcAgent == null)
+                               throw new SlcException("Cannot find agent for " + processNode);
+                       slcAgent.kill(process);
+               } catch (Exception e) {
+                       if (!process.getStatus().equals(ExecutionProcess.ERROR))
+                               process.setStatus(ExecutionProcess.ERROR);
+                       throw new SlcException("Cannot execute " + processNode, e);
+               }
+       }
+
+       protected SlcAgent findAgent(Node processNode) throws RepositoryException {
+               // we currently only deal with single agents
+               Node realizedFlowNode = processNode.getNode(SlcNames.SLC_FLOW);
+               NodeIterator nit = realizedFlowNode.getNodes();
+               if (nit.hasNext()) {
+                       // TODO find a better way to determine which agent to use
+                       // currently we check the agent of the first registered flow
+                       Node firstRealizedFlow = nit.nextNode();
+                       // we assume there is an nt:address
+                       String firstFlowPath = firstRealizedFlow
+                                       .getNode(SlcNames.SLC_ADDRESS)
+                                       .getProperty(Property.JCR_PATH).getString();
+                       Node flowNode = processNode.getSession().getNode(firstFlowPath);
+                       String agentFactoryPath = SlcJcrUtils
+                                       .flowAgentFactoryPath(firstFlowPath);
+                       if (!agentFactories.containsKey(agentFactoryPath))
+                               throw new SlcException("No agent factory registered under "
+                                               + agentFactoryPath);
+                       SlcAgentFactory agentFactory = agentFactories.get(agentFactoryPath);
+                       Node agentNode = ((Node) flowNode
+                                       .getAncestor(SlcJcrUtils.AGENT_FACTORY_DEPTH + 1));
+                       String agentUuid = agentNode.getProperty(SlcNames.SLC_UUID)
+                                       .getString();
+
+                       // process
+                       return agentFactory.getAgent(agentUuid);
+               }
+               return null;
+       }
+
+       public synchronized void register(SlcAgentFactory agentFactory,
+                       Map<String, String> properties) {
+               String path = properties.get(SlcJcrConstants.PROPERTY_PATH);
+               if (log.isDebugEnabled())
+                       log.debug("Agent factory registered under " + path);
+               agentFactories.put(path, agentFactory);
+       }
+
+       public synchronized void unregister(SlcAgentFactory agentFactory,
+                       Map<String, String> properties) {
+               String path = properties.get(SlcJcrConstants.PROPERTY_PATH);
+               if (log.isDebugEnabled())
+                       log.debug("Agent factory unregistered from " + path);
+               agentFactories.remove(path);
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessBuilderPage.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessBuilderPage.java
new file mode 100644 (file)
index 0000000..958be82
--- /dev/null
@@ -0,0 +1,822 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.editors;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Property;
+import javax.jcr.RepositoryException;
+import javax.jcr.nodetype.NodeType;
+import javax.jcr.observation.Event;
+import javax.jcr.observation.EventListener;
+import javax.jcr.observation.ObservationManager;
+import javax.jcr.query.Query;
+import javax.jcr.query.QueryManager;
+
+import org.argeo.ArgeoException;
+import org.argeo.eclipse.ui.jcr.AsyncUiEventListener;
+import org.argeo.jcr.JcrUtils;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.client.ui.SlcImages;
+import org.argeo.slc.core.execution.PrimitiveUtils;
+import org.argeo.slc.execution.ExecutionProcess;
+import org.argeo.slc.jcr.SlcJcrUtils;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.ColumnViewer;
+import org.eclipse.jface.viewers.ComboBoxCellEditor;
+import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerDropAdapter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.forms.AbstractFormPart;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+
+/** Definition of the process. */
+public class ProcessBuilderPage extends FormPage implements SlcNames {
+       public final static String ID = "processBuilderPage";
+       // private final static Log log =
+       // LogFactory.getLog(ProcessBuilderPage.class);
+
+       /** To be displayed in empty lists */
+       final static String NONE = "<none>";
+
+       private Node processNode;
+
+       private TreeViewer flowsViewer;
+       private TableViewer valuesViewer;
+       private Label statusLabel;
+       private Button run;
+       private Button remove;
+       private Button clear;
+
+       private AbstractFormPart formPart;
+       private EventListener statusObserver;
+
+       public ProcessBuilderPage(ProcessEditor editor, Node processNode) {
+               super(editor, ID, "Definition");
+               this.processNode = processNode;
+       }
+
+       @Override
+       protected void createFormContent(IManagedForm mf) {
+               try {
+                       ScrolledForm form = mf.getForm();
+                       form.setExpandHorizontal(true);
+                       form.setExpandVertical(true);
+                       form.setText("Process " + processNode.getName());
+                       GridLayout mainLayout = new GridLayout(1, true);
+                       form.getBody().setLayout(mainLayout);
+
+                       createControls(form.getBody());
+                       createBuilder(form.getBody());
+
+                       // form
+                       formPart = new AbstractFormPart() {
+
+                       };
+                       getManagedForm().addPart(formPart);
+
+                       // observation
+                       statusObserver = new AsyncUiEventListener(form.getDisplay()) {
+                               protected void onEventInUiThread(List<Event> events) {
+                                       statusChanged();
+                               }
+                       };
+                       ObservationManager observationManager = processNode.getSession()
+                                       .getWorkspace().getObservationManager();
+                       observationManager.addEventListener(statusObserver,
+                                       Event.PROPERTY_CHANGED, processNode.getPath(), true, null,
+                                       null, false);
+
+                       // make sure all controls are in line with status
+                       statusChanged();
+
+                       // add initial flows
+                       addInitialFlows();
+
+               } catch (RepositoryException e) {
+                       throw new ArgeoException("Cannot create form content", e);
+               }
+       }
+
+       protected void createControls(Composite parent) {
+               FormToolkit tk = getManagedForm().getToolkit();
+
+               Composite controls = tk.createComposite(parent);
+               controls.setLayout(new RowLayout());
+               controls.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+               run = tk.createButton(controls, null, SWT.PUSH);
+               run.setToolTipText("Run");
+               run.setImage(SlcImages.LAUNCH);
+               run.addSelectionListener(new SelectionListener() {
+                       public void widgetSelected(SelectionEvent e) {
+                               if (isFinished(getProcessStatus())) {
+                                       ((ProcessEditor) getEditor()).relaunch();
+                               } else if (isRunning(getProcessStatus())) {
+                                       ((ProcessEditor) getEditor()).kill();
+                               } else {
+                                       ((ProcessEditor) getEditor()).process();
+                               }
+                       }
+
+                       public void widgetDefaultSelected(SelectionEvent e) {
+                               widgetSelected(e);
+                       }
+               });
+
+               remove = tk.createButton(controls, null, SWT.PUSH);
+               remove.setImage(SlcImages.REMOVE_ONE);
+               remove.setToolTipText("Remove selected flows");
+               remove.addSelectionListener(new SelectionListener() {
+                       public void widgetSelected(SelectionEvent e) {
+                               removeSelectedFlows();
+                       }
+
+                       public void widgetDefaultSelected(SelectionEvent e) {
+                               widgetSelected(e);
+                       }
+               });
+
+               clear = tk.createButton(controls, null, SWT.PUSH);
+               clear.setImage(SlcImages.REMOVE_ALL);
+               clear.setToolTipText("Clear all flows");
+               clear.addSelectionListener(new SelectionListener() {
+                       public void widgetSelected(SelectionEvent e) {
+                               removeAllFlows();
+                       }
+
+                       public void widgetDefaultSelected(SelectionEvent e) {
+                               widgetSelected(e);
+                       }
+               });
+
+               Composite statusComposite = tk.createComposite(controls);
+               RowData rowData = new RowData();
+               rowData.width = 100;
+               rowData.height = 16;
+               statusComposite.setLayoutData(rowData);
+               statusComposite.setLayout(new FillLayout());
+               statusLabel = tk.createLabel(statusComposite, getProcessStatus());
+
+       }
+
+       protected void createBuilder(Composite parent) {
+               FormToolkit tk = getManagedForm().getToolkit();
+               SashForm sashForm = new SashForm(parent, SWT.HORIZONTAL);
+               sashForm.setSashWidth(4);
+               GridData sahFormGd = new GridData(SWT.FILL, SWT.FILL, true, true);
+               sahFormGd.widthHint = 400;
+               sashForm.setLayoutData(sahFormGd);
+
+               Composite flowsComposite = tk.createComposite(sashForm);
+               flowsComposite.setLayout(new GridLayout(1, false));
+
+               flowsViewer = new TreeViewer(flowsComposite);
+               flowsViewer.getTree().setLayoutData(
+                               new GridData(SWT.FILL, SWT.FILL, true, true));
+               flowsViewer.setLabelProvider(new FlowsLabelProvider());
+               flowsViewer.setContentProvider(new FlowsContentProvider());
+               flowsViewer.addSelectionChangedListener(new FlowsSelectionListener());
+
+               int operations = DND.DROP_COPY | DND.DROP_MOVE;
+               Transfer[] tt = new Transfer[] { TextTransfer.getInstance() };
+               flowsViewer.addDropSupport(operations, tt, new FlowsDropListener(
+                               flowsViewer));
+
+               flowsViewer.setInput(getEditorSite());
+               flowsViewer.setInput(processNode);
+
+               Composite valuesComposite = tk.createComposite(sashForm);
+               valuesComposite.setLayout(new GridLayout(1, false));
+
+               valuesViewer = new TableViewer(valuesComposite);
+               GridData valuedGd = new GridData(SWT.FILL, SWT.FILL, true, true);
+               // valuedGd.widthHint = 200;
+               valuesViewer.getTable().setLayoutData(valuedGd);
+               valuesViewer.setContentProvider(new ValuesContentProvider());
+               initializeValuesViewer(valuesViewer);
+               sashForm.setWeights(getWeights());
+               valuesViewer.setInput(getEditorSite());
+       }
+
+       /** Creates the columns of the values viewer */
+       protected void initializeValuesViewer(TableViewer viewer) {
+               String[] titles = { "Name", "Value" };
+               int[] bounds = { 200, 100 };
+
+               for (int i = 0; i < titles.length; i++) {
+                       TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
+                       column.getColumn().setText(titles[i]);
+                       column.getColumn().setWidth(bounds[i]);
+                       column.getColumn().setResizable(true);
+                       column.getColumn().setMoveable(true);
+                       if (i == 0) {
+                               column.setLabelProvider(new ColumnLabelProvider() {
+                                       public String getText(Object element) {
+                                               try {
+                                                       Node specAttrNode = (Node) element;
+                                                       return specAttrNode.getName();
+                                               } catch (RepositoryException e) {
+                                                       throw new SlcException("Cannot get value", e);
+                                               }
+                                       }
+                               });
+                       } else if (i == 1) {
+                               column.setLabelProvider(new ColumnLabelProvider() {
+                                       public String getText(Object element) {
+                                               return getAttributeSpecText((Node) element);
+                                       }
+                               });
+                               column.setEditingSupport(new ValuesEditingSupport(viewer));
+                       }
+
+               }
+               Table table = viewer.getTable();
+               table.setHeaderVisible(false);
+               table.setLinesVisible(true);
+       }
+
+       protected int[] getWeights() {
+               return new int[] { 50, 50 };
+       }
+
+       /*
+        * CONTROLLERS
+        */
+       /** Reflects a status change */
+       protected void statusChanged() {
+               String status = getProcessStatus();
+               statusLabel.setText(status);
+               Boolean isEditable = isEditable(status);
+               run.setEnabled(status.equals(ExecutionProcess.RUNNING) || isEditable);
+               remove.setEnabled(isEditable);
+               clear.setEnabled(isEditable);
+               // flowsViewer.getTree().setEnabled(isEditable);
+               if (status.equals(ExecutionProcess.RUNNING)) {
+                       run.setEnabled(true);
+                       run.setImage(SlcImages.KILL);
+                       run.setToolTipText("Kill");
+               } else if (isFinished(status)) {
+                       run.setEnabled(true);
+                       run.setImage(SlcImages.RELAUNCH);
+                       run.setToolTipText("Relaunch");
+               }
+
+               if (flowsViewer != null)
+                       flowsViewer.refresh();
+       }
+
+       /** Adds initial flows from the editor input if any */
+       protected void addInitialFlows() {
+               for (String path : ((ProcessEditorInput) getEditorInput())
+                               .getInitialFlowPaths()) {
+                       addFlow(path);
+               }
+       }
+
+       /**
+        * Adds a new flow.
+        * 
+        * @param path
+        *            the path of the flow
+        */
+       protected void addFlow(String path) {
+               try {
+                       Node flowNode = processNode.getSession().getNode(path);
+                       Node realizedFlowNode = processNode.getNode(SLC_FLOW).addNode(
+                                       SLC_FLOW);
+                       realizedFlowNode.addMixin(SlcTypes.SLC_REALIZED_FLOW);
+                       Node address = realizedFlowNode.addNode(SLC_ADDRESS,
+                                       NodeType.NT_ADDRESS);
+                       address.setProperty(Property.JCR_PATH, path);
+
+                       // copy spec attributes
+                       Node specAttrsBase;
+                       if (flowNode.hasProperty(SLC_SPEC)) {
+                               Node executionSpecNode = flowNode.getProperty(SLC_SPEC)
+                                               .getNode();
+                               specAttrsBase = executionSpecNode;
+                               String executionSpecName = executionSpecNode.getProperty(
+                                               SLC_NAME).getString();
+                               realizedFlowNode.setProperty(SLC_SPEC, executionSpecName);
+                       } else
+                               specAttrsBase = flowNode;
+
+                       specAttrs: for (NodeIterator nit = specAttrsBase.getNodes(); nit
+                                       .hasNext();) {
+                               Node specAttrNode = nit.nextNode();
+                               String attrName = specAttrNode.getName();
+                               if (!specAttrNode
+                                               .isNodeType(SlcTypes.SLC_EXECUTION_SPEC_ATTRIBUTE))
+                                       continue specAttrs;
+                               Node realizedAttrNode = realizedFlowNode.addNode(specAttrNode
+                                               .getName());
+                               JcrUtils.copy(specAttrNode, realizedAttrNode);
+
+                               // override with flow value
+                               if (flowNode.hasNode(attrName)) {
+                                       // assuming this is a primitive
+                                       realizedAttrNode.setProperty(SLC_VALUE,
+                                                       flowNode.getNode(attrName).getProperty(SLC_VALUE)
+                                                                       .getValue());
+                               }
+                       }
+
+                       flowsViewer.refresh();
+                       formPart.markDirty();
+               } catch (RepositoryException e) {
+                       throw new SlcException("Cannot drop " + path, e);
+               }
+       }
+
+       @SuppressWarnings("unchecked")
+       protected void removeSelectedFlows() {
+               if (!flowsViewer.getSelection().isEmpty()) {
+                       Iterator<Object> it = ((StructuredSelection) flowsViewer
+                                       .getSelection()).iterator();
+                       while (it.hasNext()) {
+                               Node node = (Node) it.next();
+                               try {
+                                       node.remove();
+                               } catch (RepositoryException e) {
+                                       throw new ArgeoException("Cannot remove " + node, e);
+                               }
+                       }
+                       flowsViewer.refresh();
+                       formPart.markDirty();
+               }
+       }
+
+       protected void removeAllFlows() {
+               try {
+                       for (NodeIterator nit = processNode.getNode(SLC_FLOW).getNodes(); nit
+                                       .hasNext();) {
+                               nit.nextNode().remove();
+                       }
+                       flowsViewer.refresh();
+                       formPart.markDirty();
+               } catch (RepositoryException e) {
+                       throw new ArgeoException("Cannot remove flows from " + processNode,
+                                       e);
+               }
+       }
+
+       public void commit(Boolean onSave) {
+               if (onSave)
+                       statusLabel.setText(getProcessStatus());
+               formPart.commit(onSave);
+       }
+
+       /*
+        * STATE
+        */
+       protected String getProcessStatus() {
+               try {
+                       return processNode.getProperty(SLC_STATUS).getString();
+               } catch (RepositoryException e) {
+                       throw new SlcException("Cannot retrieve status for " + processNode,
+                                       e);
+               }
+       }
+
+       /** Optimization so that we don't call the node each time */
+       protected static Boolean isEditable(String status) {
+               return status.equals(ExecutionProcess.NEW)
+                               || status.equals(ExecutionProcess.INITIALIZED);
+       }
+
+       protected static Boolean isFinished(String status) {
+               return status.equals(ExecutionProcess.COMPLETED)
+                               || status.equals(ExecutionProcess.ERROR)
+                               || status.equals(ExecutionProcess.KILLED);
+       }
+
+       protected static Boolean isRunning(String status) {
+               return status.equals(ExecutionProcess.RUNNING);
+       }
+
+       /*
+        * LIFECYCLE
+        */
+       @Override
+       public void dispose() {
+               JcrUtils.unregisterQuietly(processNode, statusObserver);
+               super.dispose();
+       }
+
+       /*
+        * UTILITIES
+        */
+       // protected static Object getAttributeSpecValue(Node specAttrNode) {
+       // try {
+       // if (specAttrNode.isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)) {
+       // if (!specAttrNode.hasProperty(SLC_VALUE))
+       // return null;
+       // String type = specAttrNode.getProperty(SLC_TYPE).getString();
+       // // TODO optimize based on data type?
+       // Object value = PrimitiveUtils.convert(type, specAttrNode
+       // .getProperty(SLC_VALUE).getString());
+       // // log.debug(specAttrNode + ", type=" + type + ", value=" +
+       // // value);
+       // return value;
+       // } else if (specAttrNode.isNodeType(SlcTypes.SLC_REF_SPEC_ATTRIBUTE)) {
+       // if (specAttrNode.hasNode(SLC_VALUE)) {
+       // // return the index of the sub node
+       // // in the future we may manage reference as well
+       // return specAttrNode.getProperty(SLC_VALUE).getLong();
+       // } else
+       // return null;
+       // }
+       // return null;
+       // } catch (RepositoryException e) {
+       // throw new SlcException("Cannot get value", e);
+       // }
+       //
+       // }
+
+       protected static String getAttributeSpecText(Node specAttrNode) {
+               try {
+                       if (specAttrNode.isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)) {
+                               if (!specAttrNode.hasProperty(SLC_VALUE))
+                                       return "";
+                               String type = specAttrNode.getProperty(SLC_TYPE).getString();
+                               Object value = PrimitiveUtils.convert(type, specAttrNode
+                                               .getProperty(SLC_VALUE).getString());
+                               return value.toString();
+                       } else if (specAttrNode.isNodeType(SlcTypes.SLC_REF_SPEC_ATTRIBUTE)) {
+                               if (specAttrNode.hasProperty(SLC_VALUE)) {
+                                       int value = (int) specAttrNode.getProperty(SLC_VALUE)
+                                                       .getLong();
+                                       NodeIterator children = specAttrNode.getNodes();
+                                       int index = 0;
+                                       while (children.hasNext()) {
+                                               Node child = children.nextNode();
+                                               if (index == value)
+                                                       return child.getProperty(Property.JCR_TITLE)
+                                                                       .getString();
+                                               index++;
+                                       }
+                                       throw new SlcException("No child node with index " + value
+                                                       + " for spec attribute " + specAttrNode);
+                               } else
+                                       return "";
+                       }
+                       throw new SlcException("Unsupported type for spec attribute "
+                                       + specAttrNode);
+               } catch (RepositoryException e) {
+                       throw new SlcException("Cannot get value", e);
+               }
+       }
+
+       /*
+        * FLOWS SUBCLASSES
+        */
+       static class FlowsContentProvider implements ITreeContentProvider {
+               public Object[] getElements(Object obj) {
+                       if (!(obj instanceof Node))
+                               return new Object[0];
+
+                       try {
+                               Node node = (Node) obj;
+                               List<Node> children = new ArrayList<Node>();
+                               for (NodeIterator nit = node.getNode(SLC_FLOW).getNodes(); nit
+                                               .hasNext();)
+                                       children.add(nit.nextNode());
+                               return children.toArray();
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot list children of " + obj, e);
+                       }
+               }
+
+               public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
+               }
+
+               public void dispose() {
+               }
+
+               public Object[] getChildren(Object parentElement) {
+                       // no children for the time being
+                       return null;
+               }
+
+               public Object getParent(Object element) {
+                       return null;
+               }
+
+               public boolean hasChildren(Object element) {
+                       return false;
+               }
+
+       }
+
+       static class FlowsLabelProvider extends ColumnLabelProvider {
+
+               @Override
+               public String getText(Object element) {
+                       Node node = (Node) element;
+                       try {
+                               if (node.isNodeType(SlcTypes.SLC_REALIZED_FLOW)) {
+                                       if (node.hasNode(SLC_ADDRESS)) {
+                                               String path = node.getNode(SLC_ADDRESS)
+                                                               .getProperty(Property.JCR_PATH).getString();
+                                               Node executionModuleNode = node.getSession().getNode(
+                                                               SlcJcrUtils.modulePath(path));
+                                               String executionModuleName = executionModuleNode
+                                                               .getProperty(SLC_NAME).getString();
+                                               return executionModuleName + ":"
+                                                               + SlcJcrUtils.flowRelativePath(path);
+                                       }
+                               }
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot display " + element, e);
+                       }
+                       return super.getText(element);
+               }
+
+               @Override
+               public Image getImage(Object element) {
+                       Node node = (Node) element;
+                       try {
+                               if (node.isNodeType(SlcTypes.SLC_REALIZED_FLOW)) {
+                                       if (node.hasProperty(SLC_STATUS)) {
+                                               String status = node.getProperty(SLC_STATUS)
+                                                               .getString();
+                                               // TODO: factorize with process view ?
+                                               if (status.equals(ExecutionProcess.RUNNING))
+                                                       return SlcImages.PROCESS_RUNNING;
+                                               else if (status.equals(ExecutionProcess.ERROR)
+                                                               || status.equals(ExecutionProcess.KILLED))
+                                                       return SlcImages.PROCESS_ERROR;
+                                               else if (status.equals(ExecutionProcess.COMPLETED))
+                                                       return SlcImages.PROCESS_COMPLETED;
+                                       }
+                                       return SlcImages.FLOW;
+                               }
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot display " + element, e);
+                       }
+                       return super.getImage(element);
+               }
+
+       }
+
+       /** Parameter view is updated each time a new line is selected */
+       class FlowsSelectionListener implements ISelectionChangedListener {
+               public void selectionChanged(SelectionChangedEvent evt) {
+                       if (evt.getSelection().isEmpty()) {
+                               valuesViewer.setInput(getEditorSite());
+                               return;
+                       }
+                       Node realizedFlowNode = (Node) ((IStructuredSelection) evt
+                                       .getSelection()).getFirstElement();
+                       valuesViewer.setInput(realizedFlowNode);
+               }
+       }
+
+       /** Manages drop event. */
+       class FlowsDropListener extends ViewerDropAdapter {
+
+               public FlowsDropListener(Viewer viewer) {
+                       super(viewer);
+               }
+
+               @Override
+               public boolean performDrop(Object data) {
+                       String path = data.toString();
+                       try {
+                               // either a node or a whole directory was dragged
+                               QueryManager qm = processNode.getSession().getWorkspace()
+                                               .getQueryManager();
+                               String statement = "SELECT * FROM ["
+                                               + SlcTypes.SLC_EXECUTION_FLOW
+                                               + "] WHERE ISDESCENDANTNODE(['" + path
+                                               + "']) OR ISSAMENODE(['" + path + "'])";
+                               // log.debug(statement);
+                               Query query = qm.createQuery(statement, Query.JCR_SQL2);
+
+                               // order paths
+                               SortedSet<String> paths = new TreeSet<String>();
+                               for (NodeIterator nit = query.execute().getNodes(); nit
+                                               .hasNext();) {
+                                       paths.add(nit.nextNode().getPath());
+                               }
+
+                               for (String p : paths) {
+                                       addFlow(p);
+                               }
+                               return true;
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot query flows under " + path, e);
+                       }
+               }
+
+               @Override
+               public boolean validateDrop(Object target, int operation,
+                               TransferData transferType) {
+                       return isEditable(getProcessStatus());
+               }
+       }
+
+       /*
+        * VALUES SUBCLASSES
+        */
+       static class ValuesContentProvider implements IStructuredContentProvider {
+
+               public Object[] getElements(Object inputElement) {
+                       if (!(inputElement instanceof Node))
+                               return new Object[0];
+
+                       try {
+                               Node realizedFlowNode = (Node) inputElement;
+                               List<Node> specAttributes = new ArrayList<Node>();
+                               specAttrs: for (NodeIterator nit = realizedFlowNode.getNodes(); nit
+                                               .hasNext();) {
+                                       Node specAttrNode = nit.nextNode();
+                                       if (!specAttrNode
+                                                       .isNodeType(SlcTypes.SLC_EXECUTION_SPEC_ATTRIBUTE))
+                                               continue specAttrs;
+                                       specAttributes.add(specAttrNode);
+                               }
+                               return specAttributes.toArray();
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot get elements", e);
+                       }
+               }
+
+               public void dispose() {
+               }
+
+               public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+               }
+       }
+
+       class ValuesEditingSupport extends EditingSupport {
+               private final TableViewer tableViewer;
+
+               public ValuesEditingSupport(ColumnViewer viewer) {
+                       super(viewer);
+                       tableViewer = (TableViewer) viewer;
+               }
+
+               @Override
+               protected CellEditor getCellEditor(Object element) {
+                       try {
+                               Node specAttrNode = (Node) element;
+                               if (specAttrNode
+                                               .isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)) {
+                                       return new TextCellEditor(tableViewer.getTable());
+                               } else if (specAttrNode
+                                               .isNodeType(SlcTypes.SLC_REF_SPEC_ATTRIBUTE)) {
+                                       NodeIterator children = specAttrNode.getNodes();
+                                       ArrayList<String> items = new ArrayList<String>();
+                                       while (children.hasNext()) {
+                                               Node child = children.nextNode();
+                                               if (child.isNodeType(NodeType.MIX_TITLE))
+                                                       items.add(child.getProperty(Property.JCR_TITLE)
+                                                                       .getString());
+                                       }
+                                       return new ComboBoxCellEditor(tableViewer.getTable(),
+                                                       items.toArray(new String[items.size()]));
+                               }
+                               return null;
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot get celle editor", e);
+                       }
+               }
+
+               @Override
+               protected boolean canEdit(Object element) {
+                       try {
+                               Node specAttrNode = (Node) element;
+                               return !(specAttrNode.getProperty(SLC_IS_IMMUTABLE)
+                                               .getBoolean() || specAttrNode.getProperty(
+                                               SLC_IS_CONSTANT).getBoolean())
+                                               && isSupportedAttributeType(specAttrNode);
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot check whether " + element
+                                               + " is editable", e);
+                       }
+               }
+
+               /**
+                * Supports {@link SlcTypes#SLC_PRIMITIVE_SPEC_ATTRIBUTE} and
+                * {@link SlcTypes#SLC_REF_SPEC_ATTRIBUTE}
+                */
+               protected boolean isSupportedAttributeType(Node specAttrNode)
+                               throws RepositoryException {
+                       return specAttrNode
+                                       .isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)
+                                       || specAttrNode.isNodeType(SlcTypes.SLC_REF_SPEC_ATTRIBUTE);
+               }
+
+               @Override
+               protected Object getValue(Object element) {
+                       Node specAttrNode = (Node) element;
+                       try {
+                               // Object value = getAttributeSpecValue(specAttrNode);
+                               // if (value == null)
+                               // throw new SlcException("Unsupported attribute " + element);
+                               if (specAttrNode
+                                               .isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)) {
+                                       if (!specAttrNode.hasProperty(SLC_VALUE))
+                                               return NONE;
+                                       String type = specAttrNode.getProperty(SLC_TYPE)
+                                                       .getString();
+                                       // TODO optimize based on data type?
+                                       Object value = PrimitiveUtils.convert(type, specAttrNode
+                                                       .getProperty(SLC_VALUE).getString());
+                                       return value.toString();
+                               } else if (specAttrNode
+                                               .isNodeType(SlcTypes.SLC_REF_SPEC_ATTRIBUTE)) {
+                                       if (!specAttrNode.hasProperty(SLC_VALUE))
+                                               return 0;
+                                       // return the index of the sub node as set by setValue()
+                                       // in the future we may manage references as well
+                                       return (int) specAttrNode.getProperty(SLC_VALUE).getLong();
+                               }
+                               throw new SlcException("Unsupported type for spec attribute "
+                                               + specAttrNode);
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot get value for " + element, e);
+                       }
+               }
+
+               @Override
+               protected void setValue(Object element, Object value) {
+                       try {
+                               Node specAttrNode = (Node) element;
+                               if (specAttrNode
+                                               .isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)) {
+                                       String type = specAttrNode.getProperty(SLC_TYPE)
+                                                       .getString();
+                                       SlcJcrUtils.setPrimitiveAsProperty(specAttrNode, SLC_VALUE,
+                                                       type, value);
+                                       valuesViewer.refresh();
+                                       formPart.markDirty();
+                               } else if (specAttrNode
+                                               .isNodeType(SlcTypes.SLC_REF_SPEC_ATTRIBUTE)) {
+                                       specAttrNode.setProperty(SLC_VALUE,
+                                                       ((Integer) value).longValue());
+                                       valuesViewer.refresh();
+                                       formPart.markDirty();
+                               }
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot get celle editor", e);
+                       }
+               }
+
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditor.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditor.java
new file mode 100644 (file)
index 0000000..027e7c6
--- /dev/null
@@ -0,0 +1,254 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.editors;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.argeo.eclipse.ui.ErrorFeedback;
+import org.argeo.jcr.JcrUtils;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.client.ui.ClientUiPlugin;
+import org.argeo.slc.client.ui.controllers.ProcessController;
+import org.argeo.slc.execution.ExecutionModulesManager;
+import org.argeo.slc.execution.ExecutionProcess;
+import org.argeo.slc.execution.ExecutionProcessNotifier;
+import org.argeo.slc.execution.ExecutionStep;
+import org.argeo.slc.jcr.SlcJcrUtils;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/** Editor for an execution process. */
+public class ProcessEditor extends FormEditor implements
+               ExecutionProcessNotifier, SlcTypes, SlcNames {
+       public final static String ID = ClientUiPlugin.ID + ".processEditor";
+
+       private Session session;
+       private Node processNode;
+       private ProcessController processController;
+
+       private ProcessBuilderPage builderPage;
+       //private ProcessLogPage logPage;
+
+       private ExecutionModulesManager modulesManager;
+
+       //private Boolean switchToLog = false;
+
+       @Override
+       public void init(IEditorSite site, IEditorInput input)
+                       throws PartInitException {
+               super.init(site, input);
+               ProcessEditorInput pei = (ProcessEditorInput) input;
+               String processPath = pei.getProcessPath();
+               try {
+                       if (processPath != null) {
+                               if (!session.itemExists(processPath))
+                                       throw new SlcException("Process " + processPath
+                                                       + " does not exist");
+                               processNode = session.getNode(processPath);
+                       } else {// new
+                               processNode = newProcessNode(pei);
+                       }
+                       setPartName(processNode.getName());
+               } catch (RepositoryException e) {
+                       throw new SlcException("Cannot initialize editor for " + pei, e);
+               }
+
+       }
+
+       protected Node newProcessNode(ProcessEditorInput pei)
+                       throws RepositoryException {
+               String uuid = UUID.randomUUID().toString();
+               String processPath = SlcJcrUtils.createExecutionProcessPath(uuid);
+               Node processNode = JcrUtils.mkdirs(session, processPath, SLC_PROCESS);
+               processNode.setProperty(SLC_UUID, uuid);
+               processNode.setProperty(SLC_STATUS, ExecutionProcess.NEW);
+               Node processFlow = processNode.addNode(SLC_FLOW);
+               processFlow.addMixin(SLC_REALIZED_FLOW);
+               return processNode;
+       }
+
+       @Override
+       public boolean isDirty() {
+               if (getProcessStatus().equals(ExecutionProcess.NEW))
+                       return true;
+               return super.isDirty();
+       }
+
+       protected String getProcessStatus() {
+               try {
+                       return processNode.getProperty(SLC_STATUS).getString();
+               } catch (RepositoryException e) {
+                       throw new SlcException("Cannot retrieve status for " + processNode,
+                                       e);
+               }
+       }
+
+       @Override
+       public void dispose() {
+               JcrUtils.logoutQuietly(session);
+       }
+
+       /** Actually runs the process. */
+       void process() {
+               // the modifications have to be saved before execution
+               try {
+                       processNode.setProperty(SLC_STATUS, ExecutionProcess.SCHEDULED);
+               } catch (RepositoryException e) {
+                       throw new SlcException("Cannot update status of " + processNode, e);
+               }
+               doSave(null);
+               try {
+                       // show log
+//                     if (switchToLog)
+//                             setActivePage(logPage.getId());
+
+                       ExecutionProcess process = processController.process(processNode);
+                       Map<String, String> properties = new HashMap<String, String>();
+                       properties.put(ExecutionModulesManager.SLC_PROCESS_ID,
+                                       process.getUuid());
+                       modulesManager.registerProcessNotifier(this, properties);
+               } catch (Exception e) {
+                       ErrorFeedback.show("Execution of " + processNode + " failed", e);
+               }
+       }
+
+       void kill() {
+               processController.kill(processNode);
+       }
+
+       /** Opens a new editor with a copy of this process */
+       void relaunch() {
+               try {
+                       Node duplicatedNode = duplicateProcess();
+                       IWorkbenchPage activePage = PlatformUI.getWorkbench()
+                                       .getActiveWorkbenchWindow().getActivePage();
+                       activePage.openEditor(
+                                       new ProcessEditorInput(duplicatedNode.getPath()),
+                                       ProcessEditor.ID);
+                       close(false);
+               } catch (Exception e1) {
+                       throw new SlcException("Cannot relaunch " + processNode, e1);
+               }
+       }
+
+       /** Duplicates the process */
+       protected Node duplicateProcess() {
+               try {
+                       Session session = processNode.getSession();
+                       String uuid = UUID.randomUUID().toString();
+                       String destPath = SlcJcrUtils.createExecutionProcessPath(uuid);
+                       Node newNode = JcrUtils.mkdirs(session, destPath,
+                                       SlcTypes.SLC_PROCESS);
+
+                       Node rootRealizedFlowNode = newNode.addNode(SLC_FLOW);
+                       // copy node
+                       JcrUtils.copy(processNode.getNode(SLC_FLOW), rootRealizedFlowNode);
+
+                       newNode.setProperty(SLC_UUID, uuid);
+                       newNode.setProperty(SLC_STATUS, ExecutionProcess.INITIALIZED);
+
+                       // reset realized flow status
+                       // we just manage one level for the time being
+                       NodeIterator nit = rootRealizedFlowNode.getNodes(SLC_FLOW);
+                       while (nit.hasNext()) {
+                               nit.nextNode().setProperty(SLC_STATUS,
+                                               ExecutionProcess.INITIALIZED);
+                       }
+
+                       session.save();
+                       return newNode;
+               } catch (RepositoryException e) {
+                       throw new SlcException("Cannot duplicate process", e);
+               }
+       }
+
+       @Override
+       protected void addPages() {
+               try {
+                       builderPage = new ProcessBuilderPage(this, processNode);
+                       addPage(builderPage);
+                       firePropertyChange(PROP_DIRTY);
+//                     logPage = new ProcessLogPage(this, processNode);
+//                     addPage(logPage);
+               } catch (PartInitException e) {
+                       throw new SlcException("Cannot add pages", e);
+               }
+
+       }
+
+       @Override
+       public void doSave(IProgressMonitor monitor) {
+               try {
+                       String status = processNode.getProperty(SLC_STATUS).getString();
+                       if (status.equals(ExecutionProcess.NEW))
+                               processNode.setProperty(SLC_STATUS,
+                                               ExecutionProcess.INITIALIZED);
+                       session.save();
+                       builderPage.commit(true);
+                       editorDirtyStateChanged();
+               } catch (RepositoryException e) {
+                       throw new SlcException("Cannot save " + processNode, e);
+               } finally {
+                       JcrUtils.discardQuietly(session);
+               }
+       }
+
+       @Override
+       public void doSaveAs() {
+       }
+
+       @Override
+       public boolean isSaveAsAllowed() {
+               return false;
+       }
+
+       public void updateStatus(ExecutionProcess process, String oldStatus,
+                       String newStatus) {
+       }
+
+       public void addSteps(ExecutionProcess process, List<ExecutionStep> steps) {
+               // logPage.addSteps(steps);
+       }
+
+       /** Expects one session per editor. */
+       public void setSession(Session session) {
+               this.session = session;
+       }
+
+       public void setProcessController(ProcessController processController) {
+               this.processController = processController;
+       }
+
+       public void setModulesManager(ExecutionModulesManager modulesManager) {
+               this.modulesManager = modulesManager;
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditorInput.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditorInput.java
new file mode 100644 (file)
index 0000000..734c2db
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.editors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IPersistableElement;
+
+public class ProcessEditorInput implements IEditorInput, IPersistableElement {
+       private String processPath;
+       private List<String> initialFlowPaths = new ArrayList<String>();
+       private Boolean launchImmediately = false;
+
+       /** New empty process */
+       public ProcessEditorInput() {
+       }
+
+       /** New process with some flows */
+       public ProcessEditorInput(List<String> initialFlowPaths,
+                       Boolean launchImmediately) {
+               this.initialFlowPaths = initialFlowPaths;
+               this.launchImmediately = launchImmediately;
+       }
+
+       /** Existing process */
+       public ProcessEditorInput(String processPath) {
+               this.processPath = processPath;
+       }
+
+       @SuppressWarnings("rawtypes")
+       public Object getAdapter(Class arg0) {
+               return null;
+       }
+
+       public boolean exists() {
+               return processPath != null;
+       }
+
+       public ImageDescriptor getImageDescriptor() {
+               return null;
+       }
+
+       public String getName() {
+               return processPath != null ? processPath : "<new process>";
+       }
+
+       public IPersistableElement getPersistable() {
+               return this;
+       }
+
+       public String getToolTipText() {
+               return "";
+       }
+
+       public void saveState(IMemento memento) {
+               memento.putString("processPath", processPath);
+       }
+
+       public String getFactoryId() {
+               return ProcessEditorInputFactory.ID;
+       }
+
+       public String getProcessPath() {
+               return processPath;
+       }
+
+       public List<String> getInitialFlowPaths() {
+               return initialFlowPaths;
+       }
+
+       public Boolean getLaunchImmediately() {
+               return launchImmediately;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (!(obj instanceof ProcessEditorInput))
+                       return false;
+               ProcessEditorInput pei = (ProcessEditorInput) obj;
+               if (processPath != null && pei.processPath != null)
+                       return processPath.equals(pei.processPath);
+               return false;
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditorInputFactory.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditorInputFactory.java
new file mode 100644 (file)
index 0000000..4997749
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.editors;
+
+import org.argeo.slc.client.ui.ClientUiPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.ui.IElementFactory;
+import org.eclipse.ui.IMemento;
+
+public class ProcessEditorInputFactory implements IElementFactory {
+       public final static String ID = ClientUiPlugin.ID
+                       + ".processEditorInputFactory";
+
+       public IAdaptable createElement(IMemento memento) {
+               String path = memento.getString("processPath");
+               return new ProcessEditorInput(path);
+       }
+
+}
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessLogPage.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessLogPage.java
new file mode 100644 (file)
index 0000000..833f1f2
--- /dev/null
@@ -0,0 +1,235 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.editors;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.List;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.RepositoryException;
+import javax.jcr.Workspace;
+import javax.jcr.observation.Event;
+import javax.jcr.observation.EventListener;
+import javax.jcr.query.Query;
+
+import org.argeo.eclipse.ui.jcr.AsyncUiEventListener;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.execution.ExecutionStep;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class ProcessLogPage extends FormPage {
+       public final static String ID = "processLogPage";
+
+       private DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
+
+       /** Where the log is displayed. */
+       private Text text;
+       /**
+        * Stores logs received before the text was shown. TODO : rather store in in
+        * JCR and reads it from there.
+        */
+       private StringBuffer beforeTextInit = new StringBuffer("");
+
+       private Node processNode;
+       /**
+        * optimization field: we compute once the length of the path to slc:log so
+        * that we can easily substring the relative path of logs.
+        */
+       //private Integer logPathLength;
+
+       public ProcessLogPage(FormEditor editor, Node processNode) {
+               super(editor, ID, "Log");
+               this.processNode = processNode;
+
+               EventListener listener = new LogListener(editor.getSite().getPage()
+                               .getWorkbenchWindow().getWorkbench().getDisplay());
+
+               try {
+                       String logBasePath = processNode.getPath() + '/' + SlcNames.SLC_LOG;
+                       //logPathLength = logBasePath.length();
+
+                       Workspace ws = processNode.getSession().getWorkspace();
+
+                       String statement = "SELECT * FROM ["
+                                       + SlcTypes.SLC_LOG_ENTRY
+                                       + "] as logEntry"
+                                       + " WHERE ISDESCENDANTNODE('"
+                                       + logBasePath
+                                       + "')"
+                                       + " ORDER BY logEntry.[slc:timestamp] ASC, NAME(logEntry) ASC";
+                       StringBuffer buf = new StringBuffer("");
+                       NodeIterator it = ws.getQueryManager()
+                                       .createQuery(statement, Query.JCR_SQL2).execute()
+                                       .getNodes();
+                       while (it.hasNext())
+                               appendLogEntry(buf, it.nextNode());
+                       beforeTextInit = new StringBuffer(buf.toString());
+                       // text.setText(buf.toString());
+                       ws.getObservationManager().addEventListener(listener,
+                                       Event.NODE_ADDED, logBasePath, true, null, null, false);
+               } catch (RepositoryException e) {
+                       throw new SlcException("Cannot register listener", e);
+               }
+       }
+
+       @Override
+       public synchronized void createPartControl(Composite parent) {
+               // bypass createFormContent
+               FormToolkit tk = getEditor().getToolkit();
+               // parent.setLayout(new FillLayout());
+               text = tk.createText(parent, "", SWT.MULTI | SWT.H_SCROLL
+                               | SWT.V_SCROLL);
+               text.setEditable(false);
+
+               // transfer the existing buffer the first time
+               if (beforeTextInit.length() > 0) {
+                       text.append(beforeTextInit.toString());
+                       // clear buffer
+                       beforeTextInit.setLength(0);
+               }
+
+       }
+
+       // @Override
+       // protected synchronized void createFormContent(IManagedForm mf) {
+       // ScrolledForm form = mf.getForm();
+       // form.setExpandHorizontal(true);
+       // form.setExpandVertical(true);
+       // // form.setText("Log");
+       // FillLayout mainLayout = new FillLayout();
+       // form.getBody().setLayout(mainLayout);
+       //
+       // FormToolkit tk = getManagedForm().getToolkit();
+       // text = tk.createText(form.getBody(), "", SWT.MULTI | SWT.H_SCROLL
+       // | SWT.V_SCROLL);
+       // text.setEditable(false);
+       // // transfer the existing buffer the first time
+       // if (beforeTextInit.length() > 0) {
+       // text.append(beforeTextInit.toString());
+       // // clear buffer
+       // beforeTextInit.setLength(0);
+       // }
+       // }
+
+       protected void appendLogEntry(StringBuffer buf, Node logEntry)
+                       throws RepositoryException {
+               // +1 in order to remove the first slash
+//             String relPath = logEntry.getPath().substring(logPathLength + 1);
+               //System.out.println("relPath=" + relPath);
+//             int firstSlashIndex = relPath.indexOf('/');
+//             int lastSlashIndex = relPath.lastIndexOf('/');
+//             String thread = relPath.substring(0, firstSlashIndex);
+//             String location = relPath.substring(firstSlashIndex, lastSlashIndex);
+
+               // String date = dateFormat.format(logEntry
+               // .getProperty(SlcNames.SLC_TIMESTAMP).getDate().getTime());
+               String date = logEntry.getProperty(SlcNames.SLC_TIMESTAMP).getString();
+               buf.append(date).append(' ');
+               String type = logEntry.getPrimaryNodeType().getName().substring(7);
+               buf.append(type).append('\t');
+               // buf.append(thread).append('\t');
+               // buf.append(location).append('\t');
+               buf.append(logEntry.getProperty(SlcNames.SLC_MESSAGE).getString());
+               buf.append('\n');
+
+       }
+
+       /** @deprecated */
+       public synchronized void addSteps(List<ExecutionStep> steps) {
+               final StringBuffer buf = new StringBuffer("");
+               for (ExecutionStep step : steps) {
+                       buf.append(dateFormat.format(step.getTimestamp()));
+                       buf.append(' ');
+                       if (step.getType().equals(ExecutionStep.PHASE_START)) {
+                               buf.append("## START ").append(step.getLog());
+                               buf.append('\n');
+                       } else if (step.getType().equals(ExecutionStep.PHASE_END)) {
+                               buf.append("## END   ").append(step.getLog());
+                               buf.append("\n");
+                       } else {
+                               buf.append(step.getLog());
+                       }
+               }
+
+               if (text != null) {
+                       Display.getDefault().asyncExec(new Runnable() {
+                               public void run() {
+                                       text.append(buf.toString());
+                               }
+                       });
+               } else
+                       beforeTextInit.append(buf);
+       }
+
+       @Override
+       public Control getPartControl() {
+               return text;
+       }
+
+       @Override
+       public void setFocus() {
+               if (text != null)
+                       text.setFocus();
+       }
+
+       /** JCR event listener notifying when new nodes are added */
+       private class LogListener extends AsyncUiEventListener {
+
+               public LogListener(Display display) {
+                       super(display);
+               }
+
+               @Override
+               protected void onEventInUiThread(List<Event> events)
+                               throws RepositoryException {
+                       // since we use batch save, order is not guaranteed
+                       // so we need to reorder, according to log line number for the time
+                       // being
+                       SortedMap<Long, Node> nodes = new TreeMap<Long, Node>();
+
+                       for (Event evt : events) {
+                               Node newNode = ProcessLogPage.this.processNode.getSession()
+                                               .getNode(evt.getPath());
+                               if (newNode.isNodeType(SlcTypes.SLC_LOG_ENTRY)) {
+                                       nodes.put(Long.parseLong(newNode.getName()), newNode);
+                               }
+                       }
+
+                       StringBuffer buf = new StringBuffer("");
+                       for (Node logEntry : nodes.values()) {
+                               appendLogEntry(buf, logEntry);
+                       }
+
+                       if (text != null)
+                               text.append(buf.toString());
+                       else
+                               beforeTextInit.append(buf);
+               }
+       }
+}
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrExecutionModulesView.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrExecutionModulesView.java
new file mode 100644 (file)
index 0000000..1f87c98
--- /dev/null
@@ -0,0 +1,476 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.views;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Property;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.nodetype.NodeType;
+import javax.jcr.observation.Event;
+import javax.jcr.query.Query;
+import javax.jcr.query.QueryManager;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.argeo.eclipse.ui.jcr.AsyncUiEventListener;
+import org.argeo.eclipse.ui.jcr.DefaultNodeLabelProvider;
+import org.argeo.eclipse.ui.jcr.NodeElementComparer;
+import org.argeo.eclipse.ui.jcr.SimpleNodeContentProvider;
+import org.argeo.eclipse.ui.specific.EclipseUiSpecificUtils;
+import org.argeo.slc.BasicNameVersion;
+import org.argeo.slc.NameVersion;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.client.ui.SlcImages;
+import org.argeo.slc.client.ui.editors.ProcessEditor;
+import org.argeo.slc.client.ui.editors.ProcessEditorInput;
+import org.argeo.slc.execution.ExecutionModulesManager;
+import org.argeo.slc.jcr.SlcJcrConstants;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DragSourceAdapter;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+
+/** JCR based view of the execution modules. */
+public class JcrExecutionModulesView extends ViewPart implements SlcTypes,
+               SlcNames {
+       private final static Log log = LogFactory
+                       .getLog(JcrExecutionModulesView.class);
+
+       public static final String ID = "org.argeo.slc.client.ui.jcrExecutionModulesView";
+
+       private TreeViewer viewer;
+
+       private Session session;
+
+       private ExecutionModulesManager modulesManager;
+
+       public void createPartControl(Composite parent) {
+               viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+               EclipseUiSpecificUtils.enableToolTipSupport(viewer);
+
+               ViewContentProvider contentProvider = new ViewContentProvider(session);
+               viewer.setContentProvider(contentProvider);
+               viewer.setComparer(new NodeElementComparer());
+               final ViewLabelProvider viewLabelProvider = new ViewLabelProvider();
+               viewer.setLabelProvider(viewLabelProvider);
+               viewer.setInput(getViewSite());
+               viewer.addDoubleClickListener(new ViewDoubleClickListener());
+               getViewSite().setSelectionProvider(viewer);
+
+               Transfer[] tt = new Transfer[] { TextTransfer.getInstance() };
+               // Transfer[] tt = new Transfer[] { EditorInputTransfer.getInstance() };
+               int operations = DND.DROP_COPY | DND.DROP_MOVE;
+               viewer.addDragSupport(operations, tt, new ViewDragListener());
+
+               try {
+                       String[] nodeTypes = { SlcTypes.SLC_AGENT,
+                                       SlcTypes.SLC_AGENT_FACTORY, SlcTypes.SLC_EXECUTION_MODULE };
+                       session.getWorkspace()
+                                       .getObservationManager()
+                                       .addEventListener(
+                                                       new VmAgentObserver(viewer.getTree().getDisplay()),
+                                                       Event.NODE_ADDED | Event.NODE_REMOVED
+                                                                       | Event.NODE_MOVED,
+                                                       SlcJcrConstants.VM_AGENT_FACTORY_PATH, true, null,
+                                                       nodeTypes, false);
+               } catch (RepositoryException e) {
+                       throw new SlcException("Cannot add observer", e);
+               }
+       }
+
+       public void setFocus() {
+               viewer.getControl().setFocus();
+       }
+
+       public TreeViewer getViewer() {
+               return viewer;
+       }
+
+       public void refreshView() {
+               viewer.setInput(getViewSite());
+       }
+
+       class ViewContentProvider extends SimpleNodeContentProvider {
+
+               public ViewContentProvider(Session session) {
+                       super(session,
+                                       new String[] { SlcJcrConstants.VM_AGENT_FACTORY_PATH });
+               }
+
+               // @Override
+               // protected Object[] getChildren(Node node) throws RepositoryException
+               // {
+               // if (node.isNodeType(SlcTypes.SLC_AGENT_FACTORY)) {
+               // List<AgentNodesWrapper> wrappers = new
+               // ArrayList<AgentNodesWrapper>();
+               // for (NodeIterator nit = node.getNodes(); nit.hasNext();) {
+               // wrappers.add(new AgentNodesWrapper(nit.nextNode()));
+               // }
+               // return wrappers.toArray();
+               // }
+               // return super.getChildren(node);
+               // }
+
+               @Override
+               protected Object[] sort(Object parent, Object[] children) {
+                       Object[] sorted = new Object[children.length];
+                       System.arraycopy(children, 0, sorted, 0, children.length);
+                       Arrays.sort(sorted, new ViewComparator());
+                       return sorted;
+               }
+
+               @Override
+               protected List<Node> filterChildren(List<Node> children)
+                               throws RepositoryException {
+                       for (Iterator<Node> it = children.iterator(); it.hasNext();) {
+                               Node node = it.next();
+                               // execution spec definitions
+                               if (node.getName().equals(SLC_EXECUTION_SPECS))
+                                       it.remove();
+                               // flow values
+                               else if (node.getParent().isNodeType(
+                                               SlcTypes.SLC_EXECUTION_FLOW))
+                                       it.remove();
+                       }
+                       return super.filterChildren(children);
+               }
+
+               @Override
+               public boolean hasChildren(Object element) {
+                       if (element instanceof Node) {
+                               Node node = (Node) element;
+                               try {
+                                       if (node.isNodeType(SlcTypes.SLC_EXECUTION_FLOW))
+                                               return false;
+                               } catch (RepositoryException e) {
+                                       throw new SlcException("Cannot check has children", e);
+                               }
+                       }
+                       return super.hasChildren(element);
+               }
+       }
+
+       static class ViewComparator implements Comparator<Object> {
+
+               public int compare(Object o1, Object o2) {
+                       try {
+                               if (o1 instanceof Node && o2 instanceof Node) {
+                                       Node node1 = (Node) o1;
+                                       Node node2 = (Node) o2;
+
+                                       if (node1.getName().equals(SLC_EXECUTION_SPECS))
+                                               return -100;
+                                       if (node2.getName().equals(SLC_EXECUTION_SPECS))
+                                               return 100;
+
+                                       if (node1.isNodeType(SLC_EXECUTION_FLOW)
+                                                       && node2.isNodeType(SLC_EXECUTION_FLOW)) {
+                                               return node1.getName().compareTo(node2.getName());
+                                       } else if (node1.isNodeType(SLC_EXECUTION_FLOW)
+                                                       && !node2.isNodeType(SLC_EXECUTION_FLOW)) {
+                                               return 1;
+                                       } else if (!node1.isNodeType(SLC_EXECUTION_FLOW)
+                                                       && node2.isNodeType(SLC_EXECUTION_FLOW)) {
+                                               return -1;
+                                       } else {
+                                               // TODO: check title
+                                               return node1.getName().compareTo(node2.getName());
+                                       }
+                               }
+                       } catch (RepositoryException e) {
+                               throw new ArgeoException("Cannot compare " + o1 + " and " + o2,
+                                               e);
+                       }
+                       return 0;
+               }
+
+       }
+
+       // /** Wraps the execution modules of an agent. */
+       // static class AgentNodesWrapper extends NodesWrapper {
+       //
+       // public AgentNodesWrapper(Node node) {
+       // super(node);
+       // }
+       //
+       // protected List<WrappedNode> getWrappedNodes()
+       // throws RepositoryException {
+       // List<WrappedNode> children = new ArrayList<WrappedNode>();
+       // Node executionModules = getNode();
+       // for (NodeIterator nit = executionModules.getNodes(); nit.hasNext();) {
+       // for (NodeIterator nitVersions = nit.nextNode().getNodes(); nitVersions
+       // .hasNext();) {
+       // children.add(new WrappedNode(this, nitVersions.nextNode()));
+       // }
+       // }
+       // return children;
+       // }
+       //
+       // }
+
+       class VmAgentObserver extends AsyncUiEventListener {
+
+               public VmAgentObserver(Display display) {
+                       super(display);
+               }
+
+               protected void onEventInUiThread(List<Event> events) {
+                       for (Event event : events) {
+                               try {
+                                       String path = event.getPath();
+
+                                       if (session.itemExists(path)) {
+                                               Node parentNode = session.getNode(path);// .getParent();
+                                               if (log.isTraceEnabled())
+                                                       log.trace("Refresh " + parentNode + " after event "
+                                                                       + event);
+                                               viewer.refresh(parentNode);
+                                       }
+                               } catch (RepositoryException e) {
+                                       log.warn("Cannot process event " + event + ": " + e);
+                               }
+                       }
+
+                       // try {
+                       // Node vmAgentNode = session
+                       // .getNode(SlcJcrConstants.VM_AGENT_FACTORY_PATH);
+                       // viewer.refresh(vmAgentNode);
+                       // } catch (RepositoryException e) {
+                       // log.warn("Cannot process event : " + e);
+                       // }
+                       // TODO: optimize based on event
+                       viewer.refresh();
+               }
+       }
+
+       class ViewLabelProvider extends DefaultNodeLabelProvider implements
+                       ITableLabelProvider {
+
+               @Override
+               protected String getText(Node node) throws RepositoryException {
+                       if (node.isNodeType(NodeType.MIX_TITLE)
+                                       && node.hasProperty(Property.JCR_TITLE))
+                               return node.getProperty(Property.JCR_TITLE).getString();
+                       else if (node.getName().equals(SLC_EXECUTION_SPECS))
+                               return "Execution Specifications";
+                       else if (node.getPath().equals(
+                                       SlcJcrConstants.VM_AGENT_FACTORY_PATH))
+                               return "Internal Agents";
+                       return super.getText(node);
+               }
+
+               @Override
+               public Image getImage(Node node) throws RepositoryException {
+                       // we try to optimize a bit by putting deeper nodes first
+                       if (node.getParent().isNodeType(
+                                       SlcTypes.SLC_EXECUTION_SPEC_ATTRIBUTE))
+                               return SlcImages.CHOICES;
+                       else if (node.isNodeType(SlcTypes.SLC_EXECUTION_SPEC_ATTRIBUTE))
+                               return SlcImages.EXECUTION_SPEC_ATTRIBUTE;
+                       else if (node.isNodeType(SlcTypes.SLC_EXECUTION_SPEC))
+                               return SlcImages.EXECUTION_SPEC;
+                       else if (node.getName().equals(SLC_EXECUTION_SPECS))
+                               return SlcImages.EXECUTION_SPECS;
+                       else if (node.isNodeType(SlcTypes.SLC_EXECUTION_FLOW))
+                               return SlcImages.FLOW;
+                       else if (node.isNodeType(SlcTypes.SLC_MODULE)) {
+                               if (node.getProperty(SLC_STARTED).getBoolean())
+                                       return SlcImages.MODULE;
+                               else
+                                       return SlcImages.MODULE_STOPPED;
+                       } else if (node.isNodeType(SlcTypes.SLC_AGENT))
+                               return SlcImages.AGENT;
+                       else if (node.isNodeType(SlcTypes.SLC_AGENT_FACTORY))
+                               return SlcImages.AGENT_FACTORY;
+                       else
+                               return SlcImages.FOLDER;
+               }
+
+               public String getToolTipText(Node node) throws RepositoryException {
+                       if (node.isNodeType(NodeType.MIX_TITLE)
+                                       && node.hasProperty(Property.JCR_DESCRIPTION))
+                               return node.getProperty(Property.JCR_DESCRIPTION).getString();
+                       return super.getToolTipText(node);
+               }
+
+               public String getColumnText(Object obj, int index) {
+                       return getText(obj);
+               }
+
+               public Image getColumnImage(Object obj, int index) {
+                       return getImage(obj);
+               }
+
+       }
+
+       class ViewDoubleClickListener implements IDoubleClickListener {
+               public void doubleClick(DoubleClickEvent evt) {
+                       Object obj = ((IStructuredSelection) evt.getSelection())
+                                       .getFirstElement();
+                       try {
+                               if (obj instanceof Node) {
+                                       Node node = (Node) obj;
+                                       if (node.isNodeType(SLC_EXECUTION_MODULE)) {
+                                               String name = node.getProperty(SLC_NAME).getString();
+                                               String version = node.getProperty(SLC_VERSION)
+                                                               .getString();
+                                               final NameVersion nameVersion = new BasicNameVersion(
+                                                               name, version);
+                                               Boolean started = node.getProperty(SLC_STARTED)
+                                                               .getBoolean();
+
+                                               Job job;
+                                               if (started) {
+                                                       job = new Job("Stop " + nameVersion) {
+                                                               protected IStatus run(IProgressMonitor monitor) {
+                                                                       monitor.beginTask("Stop " + nameVersion, 1);
+                                                                       modulesManager.stop(nameVersion);
+                                                                       monitor.worked(1);
+                                                                       return Status.OK_STATUS;
+                                                               }
+
+                                                               protected void canceling() {
+                                                                       getThread().interrupt();
+                                                                       super.canceling();
+                                                               }
+                                                       };
+                                               } else {
+                                                       job = new Job("Start " + nameVersion) {
+                                                               protected IStatus run(IProgressMonitor monitor) {
+                                                                       monitor.beginTask("Start " + nameVersion, 1);
+                                                                       modulesManager.start(nameVersion);
+                                                                       monitor.worked(1);
+                                                                       return Status.OK_STATUS;
+                                                               }
+
+                                                               protected void canceling() {
+                                                                       getThread().interrupt();
+                                                                       super.canceling();
+                                                               }
+                                                       };
+                                               }
+                                               job.setUser(true);
+                                               job.schedule();
+                                       } else {
+                                               String path = node.getPath();
+                                               // TODO factorize with editor
+                                               QueryManager qm = node.getSession().getWorkspace()
+                                                               .getQueryManager();
+                                               String statement = "SELECT * FROM ["
+                                                               + SlcTypes.SLC_EXECUTION_FLOW
+                                                               + "] WHERE ISDESCENDANTNODE(['" + path
+                                                               + "']) OR ISSAMENODE(['" + path + "'])";
+                                               // log.debug(statement);
+                                               Query query = qm.createQuery(statement, Query.JCR_SQL2);
+
+                                               // order paths
+                                               SortedSet<String> paths = new TreeSet<String>();
+                                               for (NodeIterator nit = query.execute().getNodes(); nit
+                                                               .hasNext();) {
+                                                       paths.add(nit.nextNode().getPath());
+                                               }
+
+                                               // List<String> paths = new ArrayList<String>();
+                                               // paths.add(node.getPath());
+                                               IWorkbenchPage activePage = PlatformUI.getWorkbench()
+                                                               .getActiveWorkbenchWindow().getActivePage();
+                                               activePage.openEditor(new ProcessEditorInput(
+                                                               new ArrayList<String>(paths), true),
+                                                               ProcessEditor.ID);
+                                       }
+                               }
+                       } catch (Exception e) {
+                               throw new SlcException("Cannot open " + obj, e);
+                       }
+               }
+
+       }
+
+       class ViewDragListener extends DragSourceAdapter {
+               public void dragSetData(DragSourceEvent event) {
+                       IStructuredSelection selection = (IStructuredSelection) viewer
+                                       .getSelection();
+                       if (selection.getFirstElement() instanceof Node) {
+                               Node node = (Node) selection.getFirstElement();
+                               // try {
+                               // if (node.isNodeType(SLC_EXECUTION_FLOW)) {
+                               // if (EditorInputTransfer.getInstance().isSupportedType(
+                               // event.dataType)) {
+                               // ProcessEditorInput pei = new ProcessEditorInput(
+                               // node.getPath());
+                               // EditorInputData eid = EditorInputTransfer
+                               // .createEditorInputData(ProcessEditor.ID,
+                               // pei);
+                               // event.data = new EditorInputTransfer.EditorInputData[] { eid
+                               // };
+                               //
+                               // }
+                               // }
+                               // } catch (RepositoryException e1) {
+                               // throw new SlcException("Cannot drag " + node, e1);
+                               // }
+
+                               if (TextTransfer.getInstance().isSupportedType(event.dataType)) {
+                                       try {
+                                               event.data = node.getPath();
+                                       } catch (RepositoryException e1) {
+                                               // TODO Auto-generated catch block
+                                               e1.printStackTrace();
+                                       }
+                               }
+                       }
+               }
+       }
+
+       public void setSession(Session session) {
+               this.session = session;
+       }
+
+       public void setModulesManager(ExecutionModulesManager modulesManager) {
+               this.modulesManager = modulesManager;
+       }
+
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrProcessListView.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrProcessListView.java
new file mode 100644 (file)
index 0000000..ac8b5e8
--- /dev/null
@@ -0,0 +1,252 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.views;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Property;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.observation.Event;
+import javax.jcr.observation.EventListener;
+import javax.jcr.observation.ObservationManager;
+import javax.jcr.query.Query;
+
+import org.argeo.eclipse.ui.jcr.AsyncUiEventListener;
+import org.argeo.jcr.JcrUtils;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.client.ui.SlcImages;
+import org.argeo.slc.client.ui.editors.ProcessEditor;
+import org.argeo.slc.client.ui.editors.ProcessEditorInput;
+import org.argeo.slc.execution.ExecutionProcess;
+import org.argeo.slc.jcr.SlcJcrConstants;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+
+/** Displays processes. */
+public class JcrProcessListView extends ViewPart {
+       public static final String ID = "org.argeo.slc.client.ui.jcrProcessListView";
+
+       private TableViewer viewer;
+
+       private Session session;
+
+       private EventListener processesObserver;
+
+       private DateFormat dateFormat = new SimpleDateFormat(
+                       "EEE, dd MMM yyyy HH:mm:ss");
+       private Integer queryLimit = 2000;
+
+       public void createPartControl(Composite parent) {
+               Table table = createTable(parent);
+               viewer = new TableViewer(table);
+               viewer.setLabelProvider(new LabelProvider());
+               viewer.setContentProvider(new ContentProvider());
+               viewer.setInput(getViewSite());
+               viewer.addDoubleClickListener(new ViewDoubleClickListener());
+
+               processesObserver = new AsyncUiEventListener(viewer.getTable()
+                               .getDisplay()) {
+                       protected void onEventInUiThread(List<Event> events) {
+                               // TODO optimize by updating only the changed process
+                               viewer.refresh();
+                       }
+               };
+               try {
+                       ObservationManager observationManager = session.getWorkspace()
+                                       .getObservationManager();
+                       observationManager.addEventListener(processesObserver,
+                                       Event.NODE_ADDED | Event.NODE_REMOVED
+                                                       | Event.PROPERTY_CHANGED,
+                                       SlcJcrConstants.PROCESSES_BASE_PATH, true, null, null,
+                                       false);
+               } catch (RepositoryException e) {
+                       throw new SlcException("Cannot register listeners", e);
+               }
+
+       }
+
+       protected Table createTable(Composite parent) {
+               int style = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
+                               | SWT.FULL_SELECTION;
+               // does not function with RAP, commented for the time being
+               // | SWT.HIDE_SELECTION;
+
+               Table table = new Table(parent, style);
+
+               table.setLinesVisible(true);
+               table.setHeaderVisible(true);
+
+               TableColumn column = new TableColumn(table, SWT.LEFT, 0);
+               column.setText("Date");
+               column.setWidth(200);
+
+               column = new TableColumn(table, SWT.LEFT, 1);
+               column.setText("Host");
+               column.setWidth(100);
+
+               column = new TableColumn(table, SWT.LEFT, 2);
+               column.setText("Id");
+               column.setWidth(300);
+
+               column = new TableColumn(table, SWT.LEFT, 3);
+               column.setText("Status");
+               column.setWidth(100);
+
+               return table;
+       }
+
+       public void setFocus() {
+               viewer.getControl().setFocus();
+       }
+
+       @Override
+       public void dispose() {
+               JcrUtils.unregisterQuietly(session.getWorkspace(), processesObserver);
+               super.dispose();
+       }
+
+       class ContentProvider implements IStructuredContentProvider {
+
+               public Object[] getElements(Object inputElement) {
+                       try {
+                               // TODO filter, optimize with virtual table, ...
+                               String sql = "SELECT * from [slc:process] ORDER BY [jcr:lastModified] DESC";
+                               Query query = session.getWorkspace().getQueryManager()
+                                               .createQuery(sql, Query.JCR_SQL2);
+                               // TODO paging
+                               query.setLimit(queryLimit);
+                               List<Node> nodes = new ArrayList<Node>();
+                               for (NodeIterator nit = query.execute().getNodes(); nit
+                                               .hasNext();) {
+                                       nodes.add(nit.nextNode());
+                               }
+                               return nodes.toArray();
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot retrieve processes", e);
+                       }
+               }
+
+               public void dispose() {
+               }
+
+               public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+               }
+
+       }
+
+       class LabelProvider extends ColumnLabelProvider implements
+                       ITableLabelProvider {
+
+               public Image getColumnImage(Object obj, int columnIndex) {
+                       if (columnIndex != 0)
+                               return null;
+                       try {
+                               Node node = (Node) obj;
+                               String status = node.getProperty(SlcNames.SLC_STATUS)
+                                               .getString();
+                               if (status.equals(ExecutionProcess.NEW)
+                                               || status.equals(ExecutionProcess.INITIALIZED)
+                                               || status.equals(ExecutionProcess.SCHEDULED))
+                                       return SlcImages.PROCESS_SCHEDULED;
+                               else if (status.equals(ExecutionProcess.ERROR)
+                                               || status.equals(ExecutionProcess.UNKOWN))
+                                       return SlcImages.PROCESS_ERROR;
+                               else if (status.equals(ExecutionProcess.COMPLETED))
+                                       return SlcImages.PROCESS_COMPLETED;
+                               else if (status.equals(ExecutionProcess.RUNNING))
+                                       return SlcImages.PROCESS_RUNNING;
+                               else if (status.equals(ExecutionProcess.KILLED))
+                                       return SlcImages.PROCESS_ERROR;
+                               else
+                                       throw new SlcException("Unkown status " + status);
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot get column text", e);
+                       }
+               }
+
+               public String getColumnText(Object obj, int index) {
+                       try {
+                               Node node = (Node) obj;
+                               switch (index) {
+
+                               case 0:
+                                       return dateFormat.format(node
+                                                       .getProperty(Property.JCR_LAST_MODIFIED).getDate()
+                                                       .getTime());
+                               case 1:
+                                       return "local";
+                               case 2:
+                                       return node.getProperty(SlcNames.SLC_UUID).getString();
+                               case 3:
+                                       return node.getProperty(SlcNames.SLC_STATUS).getString();
+                               }
+                               return getText(obj);
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot get column text", e);
+                       }
+               }
+
+       }
+
+       class ViewDoubleClickListener implements IDoubleClickListener {
+               public void doubleClick(DoubleClickEvent evt) {
+                       Object obj = ((IStructuredSelection) evt.getSelection())
+                                       .getFirstElement();
+                       try {
+                               if (obj instanceof Node) {
+                                       Node node = (Node) obj;
+                                       if (node.isNodeType(SlcTypes.SLC_PROCESS)) {
+                                               IWorkbenchPage activePage = PlatformUI.getWorkbench()
+                                                               .getActiveWorkbenchWindow().getActivePage();
+                                               activePage.openEditor(
+                                                               new ProcessEditorInput(node.getPath()),
+                                                               ProcessEditor.ID);
+                                       }
+                               }
+                       } catch (Exception e) {
+                               throw new SlcException("Cannot open " + obj, e);
+                       }
+               }
+
+       }
+
+       public void setSession(Session session) {
+               this.session = session;
+       }
+
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrResultListView.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrResultListView.java
new file mode 100644 (file)
index 0000000..322256b
--- /dev/null
@@ -0,0 +1,280 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.views;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.observation.Event;
+import javax.jcr.observation.EventListener;
+import javax.jcr.observation.ObservationManager;
+import javax.jcr.query.Query;
+
+import org.argeo.eclipse.ui.jcr.AsyncUiEventListener;
+import org.argeo.eclipse.ui.jcr.NodeElementComparer;
+import org.argeo.jcr.JcrUtils;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.client.ui.editors.ProcessEditor;
+import org.argeo.slc.client.ui.editors.ProcessEditorInput;
+import org.argeo.slc.jcr.SlcJcrConstants;
+import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.jcr.SlcTypes;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+
+/** Displays results. */
+public class JcrResultListView extends ViewPart implements SlcNames {
+       public static final String ID = "org.argeo.slc.client.ui.jcrResultListView";
+
+       private TableViewer viewer;
+
+       private Session session;
+
+       private EventListener resultsObserver;
+
+       private DateFormat dateFormat = new SimpleDateFormat(
+                       "EEE, dd MMM yyyy HH:mm:ss");
+       private Integer queryLimit = 2000;
+
+       public void createPartControl(Composite parent) {
+
+               Table table = createTable(parent);
+               viewer = new TableViewer(table);
+               viewer.setLabelProvider(createLabelProvider());
+               viewer.setContentProvider(new ViewContentProvider());
+               viewer.setInput(getViewSite());
+               viewer.addDoubleClickListener(new ViewDoubleClickListener());
+               viewer.setComparer(new NodeElementComparer());
+
+               getViewSite().setSelectionProvider(viewer);
+
+               resultsObserver = new ResultObserver(viewer.getTable().getDisplay());
+               try {
+                       ObservationManager observationManager = session.getWorkspace()
+                                       .getObservationManager();
+                       String[] nodeTypes = { SlcTypes.SLC_RESULT };
+                       // FIXME Will not be notified if empty result is deleted
+                       observationManager.addEventListener(resultsObserver,
+                                       Event.PROPERTY_ADDED | Event.NODE_REMOVED,
+                                       SlcJcrConstants.RESULTS_BASE_PATH, true, null, nodeTypes,
+                                       false);
+               } catch (RepositoryException e) {
+                       throw new SlcException("Cannot register listeners", e);
+               }
+
+       }
+
+       protected Table createTable(Composite parent) {
+               int style = SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
+                               | SWT.FULL_SELECTION | SWT.MULTI;
+               // does not work with RAP, commented for the time being
+               // | SWT.HIDE_SELECTION;
+
+               Table table = new Table(parent, style);
+
+               table.setLinesVisible(true);
+               table.setHeaderVisible(true);
+
+               TableColumn column = new TableColumn(table, SWT.LEFT, 0);
+               column.setText("Date");
+               column.setWidth(200);
+
+               column = new TableColumn(table, SWT.LEFT, 1);
+               column.setText("Id");
+               column.setWidth(300);
+
+               return table;
+       }
+
+       // public void refresh() {
+       // viewer.refresh();
+       // }
+
+       /*
+        * METHODS TO BE OVERRIDDEN
+        */
+       protected IBaseLabelProvider createLabelProvider() {
+               return new ViewLabelProvider();
+       }
+
+       protected void processDoubleClick(DoubleClickEvent evt) {
+               Object obj = ((IStructuredSelection) evt.getSelection())
+                               .getFirstElement();
+               try {
+                       if (obj instanceof Node) {
+                               Node node = (Node) obj;
+                               // FIXME: open a default result editor
+                               if (node.isNodeType(SlcTypes.SLC_PROCESS)) {
+                                       IWorkbenchPage activePage = PlatformUI.getWorkbench()
+                                                       .getActiveWorkbenchWindow().getActivePage();
+                                       activePage.openEditor(
+                                                       new ProcessEditorInput(node.getPath()),
+                                                       ProcessEditor.ID);
+                               }
+                       }
+               } catch (Exception e) {
+                       throw new SlcException("Cannot open " + obj, e);
+               }
+       }
+
+       public void setFocus() {
+               viewer.getControl().setFocus();
+       }
+
+       @Override
+       public void dispose() {
+               JcrUtils.unregisterQuietly(session.getWorkspace(), resultsObserver);
+               super.dispose();
+       }
+
+       class ViewContentProvider implements IStructuredContentProvider {
+
+               public Object[] getElements(Object inputElement) {
+                       try {
+                               // TODO filter, optimize with virtual table, ...
+                               String sql = "SELECT * from [slc:result] ORDER BY [jcr:lastModified] DESC";
+                               Query query = session.getWorkspace().getQueryManager()
+                                               .createQuery(sql, Query.JCR_SQL2);
+                               // TODO paging
+                               query.setLimit(queryLimit);
+                               List<Node> nodes = new ArrayList<Node>();
+                               for (NodeIterator nit = query.execute().getNodes(); nit
+                                               .hasNext();) {
+                                       nodes.add(nit.nextNode());
+                               }
+                               return nodes.toArray();
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot retrieve processes", e);
+                       }
+               }
+
+               public void dispose() {
+               }
+
+               public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+               }
+
+       }
+
+       class ViewLabelProvider extends ColumnLabelProvider implements
+                       ITableLabelProvider {
+
+               public Image getColumnImage(Object obj, int columnIndex) {
+                       if (columnIndex != 0)
+                               return null;
+                       try {
+                               Node node = (Node) obj;
+                               if (node.hasProperty(SLC_COMPLETED)) {
+                                       // TODO
+                               }
+                               return null;
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot get column text", e);
+                       }
+               }
+
+               public String getColumnText(Object obj, int index) {
+                       try {
+                               Node node = (Node) obj;
+                               switch (index) {
+
+                               case 0:
+                                       if (node.hasProperty(SLC_COMPLETED)) {
+                                               return dateFormat
+                                                               .format(node.getProperty(SLC_COMPLETED)
+                                                                               .getDate().getTime());
+                                       } else {
+                                               return "OPEN";
+                                       }
+                               case 1:
+                                       return node.getProperty(SlcNames.SLC_UUID).getString();
+                               }
+                               return getText(obj);
+                       } catch (RepositoryException e) {
+                               throw new SlcException("Cannot get column text", e);
+                       }
+               }
+
+       }
+
+       class ViewDoubleClickListener implements IDoubleClickListener {
+               public void doubleClick(DoubleClickEvent evt) {
+                       processDoubleClick(evt);
+               }
+
+       }
+
+       class ResultObserver extends AsyncUiEventListener {
+
+               public ResultObserver(Display display) {
+                       super(display);
+               }
+
+               @Override
+               protected Boolean willProcessInUiThread(List<Event> events)
+                               throws RepositoryException {
+                       for (Event event : events) {
+                               // getLog().debug("Received event " + event);
+                               int eventType = event.getType();
+                               if (eventType == Event.NODE_REMOVED)
+                                       return true;
+                               String path = event.getPath();
+                               int index = path.lastIndexOf('/');
+                               String propertyName = path.substring(index + 1);
+                               if (propertyName.equals(SLC_COMPLETED)
+                                               || propertyName.equals(SLC_UUID)) {
+                                       return true;
+                               }
+                       }
+                       return false;
+               }
+
+               protected void onEventInUiThread(List<Event> events)
+                               throws RepositoryException {
+                       if (getLog().isTraceEnabled())
+                               getLog().trace("Refresh result list");
+                       viewer.refresh();
+               }
+
+       }
+
+       public void setSession(Session session) {
+               this.session = session;
+       }
+
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.ide.branding/.classpath b/plugins/org.argeo.slc.ide.branding/.classpath
new file mode 100644 (file)
index 0000000..b0a38d8
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.argeo.slc.ide.branding/.project b/plugins/org.argeo.slc.ide.branding/.project
new file mode 100644 (file)
index 0000000..c757652
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.ide.branding</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/plugins/org.argeo.slc.ide.branding/META-INF/MANIFEST.MF b/plugins/org.argeo.slc.ide.branding/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..5fcc6ab
--- /dev/null
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Argeo IDE
+Bundle-SymbolicName: org.argeo.slc.ide.branding;singleton:=true
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-Vendor: Argeo.org
+Require-Bundle: org.eclipse.ui;bundle-version="3.5.1",
+ org.eclipse.osgi;bundle-version="3.5.1",
+ org.eclipse.core.runtime;bundle-version="3.5.0",
+ org.eclipse.jdt.ui;bundle-version="3.5.1",
+ org.eclipse.ui.console;bundle-version="3.4.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.argeo.slc.ide.branding/build.properties b/plugins/org.argeo.slc.ide.branding/build.properties
new file mode 100644 (file)
index 0000000..b06e874
--- /dev/null
@@ -0,0 +1,7 @@
+bin.includes = META-INF/,\
+               plugin_customization.ini,\
+               plugin.xml,\
+               icons/,\
+               splash.bmp,\
+               .
+source.. = src/main/java/
diff --git a/plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png b/plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png
new file mode 100644 (file)
index 0000000..a9af088
Binary files /dev/null and b/plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png differ
diff --git a/plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.xpm b/plugins/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.xpm
new file mode 100644 (file)
index 0000000..3d3ad76
--- /dev/null
@@ -0,0 +1,479 @@
+/* XPM */
+static char * argeo_icon_100104_256_xpm[] = {
+"256 256 220 2",
+"      c None",
+".     c #FE8F00",
+"+     c #FD8F01",
+"@     c #FD8E01",
+"#     c #FD8F00",
+"$     c #FC8E01",
+"%     c #FA8D02",
+"&     c #F78C03",
+"*     c #F68C04",
+"=     c #F58C04",
+"-     c #F48B05",
+";     c #EE8907",
+">     c #DC820F",
+",     c #C0781B",
+"'     c #F98D02",
+")     c #EA8809",
+"!     c #D47F12",
+"~     c #BC761D",
+"{     c #A16C28",
+"]     c #E6860A",
+"^     c #B37321",
+"/     c #ED8908",
+"(     c #CD7D15",
+"_     c #C67A18",
+":     c #C2781A",
+"<     c #BD771C",
+"[     c #B8751E",
+"}     c #AD7123",
+"|     c #A96F25",
+"1     c #A46D27",
+"2     c #C97B17",
+"3     c #EB8808",
+"4     c #7A5E39",
+"5     c #F88D02",
+"6     c #D68012",
+"7     c #AF7122",
+"8     c #896333",
+"9     c #625544",
+"0     c #4D4D4D",
+"a     c #5A5247",
+"b     c #7C5F38",
+"c     c #9E6B2A",
+"d     c #BF771B",
+"e     c #E1840D",
+"f     c #BE771C",
+"g     c #97692D",
+"h     c #715A3D",
+"i     c #504E4B",
+"j     c #55504A",
+"k     c #94672E",
+"l     c #A26D28",
+"m     c #FB8E01",
+"n     c #826136",
+"o     c #4F4E4C",
+"p     c #7D5F38",
+"q     c #CA7C17",
+"r     c #F88D03",
+"s     c #705A3E",
+"t     c #E2850C",
+"u     c #5D5346",
+"v     c #675742",
+"w     c #B27321",
+"x     c #D17E14",
+"y     c #F68C03",
+"z     c #BB761D",
+"A     c #765C3B",
+"B     c #575149",
+"C     c #A06C29",
+"D     c #95682E",
+"E     c #DF830E",
+"F     c #92672F",
+"G     c #555049",
+"H     c #6C5840",
+"I     c #ED8907",
+"J     c #4E4E4C",
+"K     c #524F4B",
+"L     c #9A6A2B",
+"M     c #A76F26",
+"N     c #806037",
+"O     c #605445",
+"P     c #5C5346",
+"Q     c #CB7C16",
+"R     c #D27E13",
+"S     c #99692C",
+"T     c #F28A05",
+"U     c #585148",
+"V     c #EF8907",
+"W     c #846135",
+"X     c #8C6532",
+"Y     c #A56E27",
+"Z     c #D98110",
+"`     c #93672F",
+" .    c #F48B04",
+"..    c #BA761E",
+"+.    c #9D6B2A",
+"@.    c #AB7024",
+"#.    c #FB8E02",
+"$.    c #A76E26",
+"%.    c #5C5247",
+"&.    c #755C3B",
+"*.    c #AE7123",
+"=.    c #9B6A2B",
+"-.    c #5E5345",
+";.    c #B47420",
+">.    c #DB820F",
+",.    c #514F4B",
+"'.    c #6A5840",
+").    c #DD830E",
+"!.    c #5F5445",
+"~.    c #EA8709",
+"{.    c #4E4D4D",
+"].    c #6D593F",
+"^.    c #795E3A",
+"/.    c #7E5F38",
+"(.    c #E7860A",
+"_.    c #534F4A",
+":.    c #896433",
+"<.    c #E5860B",
+"[.    c #E4850B",
+"}.    c #856235",
+"|.    c #575148",
+"1.    c #D37F13",
+"2.    c #816036",
+"3.    c #565049",
+"4.    c #A86F25",
+"5.    c #D88111",
+"6.    c #8D6531",
+"7.    c #AA7025",
+"8.    c #91662F",
+"9.    c #D68011",
+"0.    c #CF7D15",
+"a.    c #7B5E39",
+"b.    c #645643",
+"c.    c #B47320",
+"d.    c #635543",
+"e.    c #504E4C",
+"f.    c #E8870A",
+"g.    c #906630",
+"h.    c #836135",
+"i.    c #A36D28",
+"j.    c #775D3B",
+"k.    c #6C593F",
+"l.    c #635544",
+"m.    c #F18A06",
+"n.    c #A66E26",
+"o.    c #E98709",
+"p.    c #7C5E39",
+"q.    c #E0840D",
+"r.    c #8E6531",
+"s.    c #D58012",
+"t.    c #8A6432",
+"u.    c #6B5840",
+"v.    c #8F6630",
+"w.    c #B17222",
+"x.    c #615544",
+"y.    c #F08A06",
+"z.    c #A46E27",
+"A.    c #595248",
+"B.    c #E88709",
+"C.    c #54504A",
+"D.    c #B07222",
+"E.    c #CE7D15",
+"F.    c #C77B18",
+"G.    c #755C3C",
+"H.    c #695841",
+"I.    c #EF8A06",
+"J.    c #595148",
+"K.    c #8B6432",
+"L.    c #CC7C16",
+"M.    c #D27F13",
+"N.    c #7F6037",
+"O.    c #735B3C",
+"P.    c #685741",
+"Q.    c #C2791A",
+"R.    c #96682D",
+"S.    c #534F4B",
+"T.    c #D07E14",
+"U.    c #C47A19",
+"V.    c #725B3D",
+"W.    c #B9751E",
+"X.    c #AC7024",
+"Y.    c #94682E",
+"Z.    c #886333",
+"`.    c #C3791A",
+" +    c #B7751F",
+".+    c #665642",
+"++    c #5E5346",
+"@+    c #9F6C29",
+"#+    c #DA8210",
+"$+    c #876234",
+"%+    c #6F5A3E",
+"&+    c #B6741F",
+"*+    c #655642",
+"=+    c #F38B05",
+"-+    c #EC8808",
+";+    c #E3850C",
+">+    c #6E593F",
+",+    c #F28B05",
+"'+    c #9C6B2B",
+")+    c #E2840C",
+"!+    c #D78111",
+"~+    c #785D3A",
+"{+    c #DA8110",
+"]+    c #F78D03",
+"^+    c #FA8E02",
+"/+    c #B8751F",
+"(+    c #C67A19",
+"_+    c #C57A19",
+":+    c #B7741F",
+"<+    c #A86F26",
+"[+    c #CF7E14",
+"}+    c #9A6A2C",
+"|+    c #795D3A",
+"1+    c #C1781B",
+"2+    c #5B5247",
+"3+    c #695741",
+"4+    c #97682D",
+"5+    c #98692C",
+"6+    c #B57420",
+"7+    c #866234",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                          . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                                                                         ",
+"                                                                                                                                                                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                                                               ",
+"                                                                                                                                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                                                     ",
+"                                                                                                                                                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                                               ",
+"                                                                                                                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                                       ",
+"                                                                                                                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                                 ",
+"                                                                                                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                             ",
+"                                                                                                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                         ",
+"                                                                                                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                                   ",
+"                                                                                                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                               ",
+"                                                                                                                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                           ",
+"                                                                                                                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                         ",
+"                                                                                                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                     ",
+"                                                                                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                                 ",
+"                                                                                                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                               ",
+"                                                                                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                           ",
+"                                                                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                         ",
+"                                                                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                     ",
+"                                                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                   ",
+"                                                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                                 ",
+"                                                                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                             ",
+"                                                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                                           ",
+"                                                                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +                                                                                                                                         ",
+"                                                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @                                                                                                                                       ",
+"                                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #                                                                                                                                     ",
+"                                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $                                                                                                                                   ",
+"                                                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . %                                                                                                                                 ",
+"                                                                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . &                                                                                                                               ",
+"                                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . *                                                                                                                             ",
+"                                                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . =                                                                                                                           ",
+"                                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -                                                                                                                         ",
+"                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ;                                                                                                                       ",
+"                                                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . >                                                                                                                     ",
+"                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ,                                                                                                                   ",
+"                                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . '                                                                                                                   ",
+"                                                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )                                                                                                                 ",
+"                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . !                                                                                                               ",
+"                                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ~                                                                                                             ",
+"                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ {                                                                                                           ",
+"                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ]                                                                                                           ",
+"                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ^                                                                                                         ",
+"                                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . / ( _ : < [ ^ } | 1 | 2 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ 4                                                                                                       ",
+"                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 6 7 8 9 0 0 0 0 0 0 0 0 0 0 0 0 0 a b c d e $ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . >                                                                                                       ",
+"                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . / f g h i 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 j k e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l                                                                                                     ",
+"                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m _ n o 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 p q # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r s                                                                                                   ",
+"                                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . t c u 0 0 0 0 0 0 0 0 0 0 0 0 0                             0 0 0 0 0 0 0 v w * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x                                                                                                   ",
+"                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y z A 0 0 0 0 0 0 0 0 0 0 0 0                                               0 0 0 0 B C 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D                                                                                                 ",
+"                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E F G 0 0 0 0 0 0 0 0 0 0                                                             0 0 0 H E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 G                                                                                               ",
+"                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I F J 0 0 0 0 0 0 0 0 0                                                                       0 0 K w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . L                                                                                               ",
+"                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . & M G 0 0 0 0 0 0 0 0 0                                                                               0 0 N ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ; G                                                                                             ",
+"                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # < O 0 0 0 0 0 0 0 0                                                                                         0 P Q . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C                                                                                             ",
+"                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . R s 0 0 0 0 0 0 0 0                                                                                                 0 S m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T U                                                                                           ",
+"                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V W 0 0 0 0 0 0 0 0                                                                                                       0 X @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y                                                                                           ",
+"                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Z O 0 0 0 0 0 0 0                                                                                                             0 ` # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  .a                                                                                         ",
+"                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..K 0 0 0 0 0 0                                                                                                                     +.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @.0                                                                                       ",
+"                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #.D 0 0 0 0 0 0 0                                                                                                                         $.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y %.                                                                                      ",
+"                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . / &.0 0 0 0 0 0                                                                                                                               *.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . =.0                                                                                     ",
+"                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 -.0 0 0 0 0 0                                                                                                                                   ;.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . >.0                                                                                     ",
+"                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Q ,.0 0 0 0 0 0                                                                                                                                       ~ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . '.0                                                                                   ",
+"                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ).G 0 0 0 0 0                                                                                                                                             ).. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @.0                                                                                   ",
+"                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 !.0 0 0 0 0                                                                                                                                                 r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ~.{.                                                                                  ",
+"                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  .].0 0 0 0 0                                                                                                                                                   ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ^.0                                                                                 ",
+"                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m /.0 0 0 0 0                                                                                                                                                       (.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..0                                                                                 ",
+"                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F 0 0 0 0 0                                                                                                                                                            .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  ._.                                                                                ",
+"                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @.0 0 0 0 0                                                                                                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . :.0                                                                               ",
+"                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <.i 0 0 0 0                                                                                                                                                                 [.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . q 0                                                                               ",
+"                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . }.0 0 0 0 0                                                                                                                                                                   V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m |.0                                                                             ",
+"                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.0 0 0 0 0                                                                                                                                                                       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.0                                                                             ",
+"                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # s 0 0 0 0                                                                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . } 0                                                                             ",
+"                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . < 0 0 0 0                                                                                                                                                                   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Z 0 0                                                                           ",
+"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r O 0 0 0 0                                                                                                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ 3.0                                                                           ",
+"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.0 0 0 0                                                                                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N 0                                                                           ",
+"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.0 0 0 0                                                                                                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @.0                                                                           ",
+"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . _ 0 0 0 0                                                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.0 0                                                                         ",
+"                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.0 0 0 0                                                                                                                                                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m G 0                                                                         ",
+"                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . % |.0 0 0                                                                                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . /.0                                                                         ",
+"                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Q 0 0 0 0                                                                                                                                           . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.0                                                                         ",
+"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.0 0 0                                                                                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.0 0                                                                       ",
+"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m a 0 0 0                                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #.j 0                                                                       ",
+"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0.0 0 0 0                                                                                                                                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p 0                                                                       ",
+"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . g 0 0 0                                                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | 0                                                                       ",
+"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . a.0 0 0                                                                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ! 0 0                                                                     ",
+"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . b.0 0 0                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r c.d.0 0                                                                     ",
+"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m e.0 0                                                                                                                   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T M %.0 0 0 0                                                                     ",
+"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . f.0 0 0                                                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 =.G 0 0 0 0 0 0                                                                     ",
+"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x 0 0 0                                                                                                           . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . e g.i 0 0 0 0 0 0 0 0                                                                     ",
+"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..0 0 0                                                                                                       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.h.{.0 0 0 0 0 0 0 0                                                                         ",
+"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i.0 0 0                                                                                                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # q j.0 0 0 0 0 0 0 0 0                                                                             ",
+"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X 0 0 0                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m f k.0 0 0 0 0 0 0 0 0                                                                                 ",
+"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A 0 0                                                                                           . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . & w l.0 0 0 0 0 0 0 0 0                                                                                     ",
+"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . h 0 0                                                                                       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m.n.a 0 0 0 0 0 0 0 0 0                                                                                         ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . j.0 0                                                                                   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . o.L j 0 0 0 0 0 0 0 0                                                                                               ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p.0 0                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . q.r.e.0 0 0 0 0 0 0 0                                                                                                   ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N 0 0                                                                           . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . s.n {.0 0 0 0 0 0 0 0                                                                                                       ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . }.0 0                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # 2 A 0 0 0 0 0 0 0 0 0                                                                                                           ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . t.0 0                                                                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #.< u.0 0 0 0 0 0 0 0 0                                                                                                               ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v.0 0                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y w.x.0 0 0 0 0 0 0 0 0                                                                                                                   ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . k 0 0                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y.z.A.0 0 0 0 0 0 0 0 0                                                                                                                       ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0 0                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B.S C.0 0 0 0 0 0 0 0                                                                                                                             ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . c 0 0                                                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E 6.e.0 0 0 0 0 0 0 0                                                                                                                                 ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D.0 0                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ! N 0 0 0 0 0 0 0 0 0                                                                                                                                     ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E.0 0                                       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # F.G.0 0 0 0 0 0 0 0 0                                                                                                                                         ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 0 0                                   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #.z H.0 0 0 0 0 0 0 0 0                                                                                                                                             ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |.0                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . * D.O 0 0 0 0 0 0 0 0 0                                                                                                                                                 ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.0                           . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.i.J.0 0 0 0 0 0 0 0 0                                                                                                                                                     ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F 0 0                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (.g _.0 0 0 0 0 0 0 0                                                                                                                                                           ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 0 0                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ).K.o 0 0 0 0 0 0 0 0                                                                                                                                                               ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . L.0 0             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M.N.0 0 0 0 0 0 0 0 0                                                                                                                                                                   ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ~.0 0       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # _ O.0 0 0 0 0 0 0 0 0                                                                                                                                                                       ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.0   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . % ..P.0 0 0 0 0 0 0 0 0                                                                                                                                                                           ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . k Q.# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . = *.O 0 0 0 0 0 0 0 0 0                                                                                                                                                                               ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V l U 0 0 0 0 0 0 0 0 0                                                                                                                                                                                   ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ] R.S.0 0 0 0 0 0 0 0                                                                                                                                                                                         ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . > :.o 0 0 0 0 0 0 0 0                                                                                                                                                                                             ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T./.0 0 0 0 0 0 0 0 0                                                                                                                                                                                                 ",
+"                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ U.V.0 0 0 0 0 0 0 0 0                                                                                                                                                                                                     ",
+"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ' W.v 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                         ",
+"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  .X.-.0 0 0 0 0 0 0 0 0                                                                                                                                                                                                             ",
+"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ; C |.0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                 ",
+"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <.Y.K 0 0 0 0 0 0 0 0                                                                                                                                                                                                                       ",
+"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . >.Z.J 0 0 0 0 0 0 0 0                                                                                                                                                                                                                           ",
+"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0.b 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                               ",
+"                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ `.s 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                   ",
+"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . '  +.+0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                       ",
+"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - @.++0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                           ",
+"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . / @+B 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                               ",
+"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [.` K 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                                     ",
+"                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #+$+J 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                                         ",
+"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( a.0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                                             ",
+"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ : %+0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                                                 ",
+"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 &+*+0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                                                     ",
+"                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . =+| u 0 0 0 0 0 0 0 0 0                                                                                                                                                       . .                                                                                                               ",
+"                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -+c 3.0 0 0 0 0 0 0 0 0                                                                                                                                                           . . . .                                                                                                           ",
+"                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ;+F ,.0 0 0 0 0 0 0 0                                                                                                                                                               . . . . . .                                                                                                         ",
+"                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Z }.J 0 0 0 0 0 0 0 0                                                                                                                                                                   . . . . . . .                                                                                                       ",
+"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . L.^.0 0 0 0 0 0 0 0 0                                                                                                                                                                     . . . . . . . . . .                                                                                                   ",
+"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ , >+0 0 0 0 0 0 0 0 0                                                                                                                                                                         . . . . . . . . . . .                                                                                                 ",
+"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r ;.b.0 0 0 0 0 0 0 0 0                                                                                                                                                                           . . . . . . . . . . . . .                                                                                               ",
+"                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ,+4.%.0 0 0 0 0 0 0 0 0                                                                                                                                                                               . . . . . . . . . . . . . .                                                                                             ",
+"                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 '+G 0 0 0 0 0 0 0 0 0                                                                                                                                                                                 . . . . . . . . . . . . . . . . .                                                                                         ",
+"                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )+g.i 0 0 0 0 0 0 0 0                                                                                                                                                                                     . . . . . . . . . . . . . . . . . . .                                                                                       ",
+"                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . !+W {.0 0 0 0 0 0 0 0                                                                                                                                                                                         . . . . . . . . . . . . . . . . . . . .                                                                                     ",
+"                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Q ~+0 0 0 0 0 0 0 0 0                                                                                                                                                                                           . . . . . . . . . . . . . . . . . . . . . .                                                                                   ",
+"                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m d ].0 0 0 0 0 0 0 0 0                                                                                                                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . .                                                                               ",
+"                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . z d.0 0 0 0 0 0 0 0 0                                                                                                                                                                                                 . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                             ",
+"                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . W.0 0 0 0 0 0 0 0                                                                                                                                                                                                   . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                           ",
+"                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # ^.0 0 0 0 0                                                                                                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                       ",
+"                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [.S.0                                                                                                                                                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                     ",
+"                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @.                                                                                                                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                   ",
+"                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m j.                                                                                                                                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                 ",
+"                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #+                                                                                                                                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                             ",
+"                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C                                                                                                                                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                           ",
+"                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . & >+                                                                                                                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                         ",
+"                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E.                                                                                                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                       ",
+"                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D                                                                                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                   ",
+"                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . & h.                                                                                                                                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                 ",
+"                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I                                                                                                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m                                                 ",
+"                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . e                                                                                                                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X.0                                               ",
+"                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . {+                                                                                                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.B 0 0                                             ",
+"                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . >.                                                                                                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . R.0 0 0 0                                           ",
+"                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . f.                                                                                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . e o 0 0 0 0                                           ",
+"                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T                                                                                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N 0 0 0 0                                             ",
+"                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y                                                                                                                                               . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 0 0 0 0                                               ",
+"                                                                            . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . '                                                                                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y v 0 0 0 0                                               ",
+"                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $                                                                                                                                   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . g.0 0 0 0                                                 ",
+"                                                                              . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . , 0 0 0 0 0                                                 ",
+"                                                                                @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                                       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (.B 0 0 0 0                                                   ",
+"                                                                                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m O.0 0 0 0                                                     ",
+"                                                                                  ' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                                       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . { 0 0 0 0 0                                                     ",
+"                                                                                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                             . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T.J 0 0 0 0                                                       ",
+"                                                                                    ]+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                                     . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . f.++0 0 0 0                                                         ",
+"                                                                                      % . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y.v 0 0 0 0 0                                                         ",
+"                                                                                        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                           . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . & V.0 0 0 0 0                                                           ",
+"                                                                                        & . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m N 0 0 0 0 0                                                             ",
+"                                                                                          . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . g.0 0 0 0 0                                                               ",
+"                                                                                          r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . { 0 0 0 0 0                                                                 ",
+"                                                                                            T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ^ 0 0 0 0 0                                                                   ",
+"                                                                                              ' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ^ {.0 0 0 0                                                                     ",
+"                                                                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . n.0 0 0 0 0 0                                                                     ",
+"                                                                                                ).. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # S 0 0 0 0 0 0                                                                       ",
+"                                                                                                  -+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m X 0 0 0 0 0 0                                                                         ",
+"                                                                                                    ^+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r 2.0 0 0 0 0 0                                                                           ",
+"                                                                                                    !+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - j.0 0 0 0 0 0                                                                             ",
+"                                                                                                      e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . o.>+0 0 0 0 0 0                                                                               ",
+"                                                                                                        ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( a 0 0 0 0 0                                                                                   ",
+"                                                                                                          V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ n.J 0 0 0 0 0                                                                                     ",
+"                                                                                                            = . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m.N.0 0 0 0 0 0                                                                                       ",
+"                                                                                                            g % . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Z l.0 0 0 0 0 0                                                                                         ",
+"                                                                                                              c # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . &+K 0 0 0 0 0 0                                                                                           ",
+"                                                                                                                @.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . * r.0 0 0 0 0 0 0                                                                                             ",
+"                                                                                                                  /+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x b.0 0 0 0 0 0                                                                                                 ",
+"                                                                                                                    (+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . * R.{.0 0 0 0 0 0                                                                                                   ",
+"                                                                                                                      _+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T.d.0 0 0 0 0 0 0                                                                                                     ",
+"                                                                                                                        :+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . * R.{.0 0 0 0 0 0                                                                                                         ",
+"                                                                                                                          <+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [+d.0 0 0 0 0 0 0                                                                                                           ",
+"                                                                                                                            }+# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  .D {.0 0 0 0 0 0                                                                                                               ",
+"                                                                                                                              6.m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ [ P 0 0 0 0 0 0 0                                                                                                                 ",
+"                                                                                                                                n & . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M.>+0 0 0 0 0 0 0                                                                                                                     ",
+"                                                                                                                                  |+=+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (.$+0 0 0 0 0 0 0 0                                                                                                                       ",
+"                                                                                                                                    P.#+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . = C K 0 0 0 0 0 0 0                                                                                                                           ",
+"                                                                                                                                      ,.7 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ z ++0 0 0 0 0 0 0                                                                                                                               ",
+"                                                                                                                                        0 N y.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0.s 0 0 0 0 0 0 0 0                                                                                                                                 ",
+"                                                                                                                                          0 !.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [+j.0 0 0 0 0 0 0 0                                                                                                                                     ",
+"                                                                                                                                              J 1 $ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [+j.0 0 0 0 0 0 0 0                                                                                                                                         ",
+"                                                                                                                                                0 j.o.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [+j.0 0 0 0 0 0 0 0                                                                                                                                             ",
+"                                                                                                                                                  0 C.$.r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [+j.0 0 0 0 0 0 0 0 0                                                                                                                                               ",
+"                                                                                                                                                      0 9 1+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [+j.0 0 0 0 0 0 0 0 0                                                                                                                                                   ",
+"                                                                                                                                                        0 0 A #+. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ' ~ h 0 0 0 0 0 0 0 0 0                                                                                                                                                       ",
+"                                                                                                                                                            0 {.v./ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . o.C 2+0 0 0 0 0 0 0 0 0                                                                                                                                                           ",
+"                                                                                                                                                              0 0 G | = . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0.W o 0 0 0 0 0 0 0 0 0                                                                                                                                                               ",
+"                                                                                                                                                                  0 0 B L <.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . = ^ 3+0 0 0 0 0 0 0 0 0 0                                                                                                                                                                   ",
+"                                                                                                                                                                      0 0 J n 0.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # 9.4+3.0 0 0 0 0 0 0 0 0                                                                                                                                                                         ",
+"                                                                                                                                                                        0 0 0 0 '.:+& . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ ! S O 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                             ",
+"                                                                                                                                                                            0 0 0 0 J.c > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ T.4+++0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                   ",
+"                                                                                                                                                                                  0 0 0 0 9 5+0.#.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m ( ` %.0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                       ",
+"                                                                                                                                                                                      0 0 0 0 0 |.K.:  .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y T.$.p G 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                             ",
+"                                                                                                                                                                                          0 0 0 0 0 0 ,./.} E.y.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ; U.=.h e.0 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                   ",
+"                                                                                                                                                                                                0 0 0 0 0 0 0 0 O n 1 _ f.. . . . . . . . . . . . . . . . . . . . . . . . . . . m.Z 1+| r..+0 0 0 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                         ",
+"                                                                                                                                                                                                      0 0 0 0 0 0 0 0 0 0 U ~+t.5+n.c.1+0.).3 5 . # '  .V ~.<.q.>.6 L.6+c 7+>+B 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                               ",
+"                                                                                                                                                                                                              0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 i 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                       ",
+"                                                                                                                                                                                                                      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                               ",
+"                                                                                                                                                                                                                                0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0                                                                                                                                                                                                                                             ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ",
+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                "};
diff --git a/plugins/org.argeo.slc.ide.branding/org.argeo.slc.ide.product b/plugins/org.argeo.slc.ide.branding/org.argeo.slc.ide.product
new file mode 100644 (file)
index 0000000..eef57c6
--- /dev/null
@@ -0,0 +1,833 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="Argeo SLC IDE" uid="org.argeo.slc.ide" id="org.argeo.slc.ide.branding.product" application="org.eclipse.ui.ide.workbench" version="0.12.1.D20100107_1317" useFeatures="false" includeLaunchers="true">
+
+   <aboutInfo>
+      <image path="eclipse_lg.gif"/>
+      <text>
+         %productBlurb
+      </text>
+   </aboutInfo>
+
+   <configIni use="default">
+   </configIni>
+
+   <launcherArgs>
+      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
+   </launcherArgs>
+
+   <windowImages i16="/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png" i32="/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png" i48="/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png" i64="/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png" i128="/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.png"/>
+
+   <splash
+      location="org.argeo.slc.ide.branding"
+      startupProgressRect="0,280,455,15"
+      startupMessageRect="7,220,441,20"
+      startupForegroundColor="0066D0" />
+   <launcher name="ArgeoSLC">
+      <linux icon="/org.argeo.slc.ide.branding/icons/argeo-icon-100104-256.xpm"/>
+      <solaris/>
+      <win useIco="false">
+         <bmp/>
+      </win>
+   </launcher>
+
+   <vm>
+      <linux>org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</linux>
+   </vm>
+
+   <license>
+        <url>http://www.eclipse.org/legal/epl-v10.html</url>
+        <text>
+   Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT&apos;S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+&quot;Contribution&quot; means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution &apos;originates&apos; from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor&apos;s behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+
+&quot;Contributor&quot; means any person or entity that distributes the Program.
+
+&quot;Licensed Patents&quot; mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+&quot;Program&quot; means the Contributions distributed in accordance with this Agreement.
+
+&quot;Recipient&quot; means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient&apos;s responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (&quot;Commercial Contributor&quot;) hereby agrees to defend and indemnify every other Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor&apos;s responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient&apos;s patent(s), then such Recipient&apos;s rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient&apos;s rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient&apos;s rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient&apos;s obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
+         </text>
+   </license>
+
+   <plugins>
+      <plugin id="com.collabnet.subversion.merge"/>
+      <plugin id="com.ibm.icu"/>
+      <plugin id="com.jcraft.jsch"/>
+      <plugin id="com.sun.jna"/>
+      <plugin id="java_cup.runtime"/>
+      <plugin id="javax.activation"/>
+      <plugin id="javax.mail"/>
+      <plugin id="javax.servlet"/>
+      <plugin id="javax.servlet.jsp"/>
+      <plugin id="javax.wsdl"/>
+      <plugin id="javax.xml"/>
+      <plugin id="javax.xml.rpc"/>
+      <plugin id="javax.xml.soap"/>
+      <plugin id="net.sourceforge.lpg.lpgjavaruntime"/>
+      <plugin id="org.apache.ant"/>
+      <plugin id="org.apache.axis"/>
+      <plugin id="org.apache.batik.bridge"/>
+      <plugin id="org.apache.batik.css"/>
+      <plugin id="org.apache.batik.dom"/>
+      <plugin id="org.apache.batik.dom.svg"/>
+      <plugin id="org.apache.batik.ext.awt"/>
+      <plugin id="org.apache.batik.parser"/>
+      <plugin id="org.apache.batik.pdf"/>
+      <plugin id="org.apache.batik.svggen"/>
+      <plugin id="org.apache.batik.transcoder"/>
+      <plugin id="org.apache.batik.util"/>
+      <plugin id="org.apache.batik.util.gui"/>
+      <plugin id="org.apache.batik.xml"/>
+      <plugin id="org.apache.bcel"/>
+      <plugin id="org.apache.commons.codec"/>
+      <plugin id="org.apache.commons.discovery"/>
+      <plugin id="org.apache.commons.el"/>
+      <plugin id="org.apache.commons.httpclient"/>
+      <plugin id="org.apache.commons.jxpath"/>
+      <plugin id="org.apache.commons.lang"/>
+      <plugin id="org.apache.commons.logging"/>
+      <plugin id="org.apache.commons.net"/>
+      <plugin id="org.apache.jasper"/>
+      <plugin id="org.apache.log4j"/>
+      <plugin id="org.apache.lucene"/>
+      <plugin id="org.apache.lucene.analysis"/>
+      <plugin id="org.apache.wsil4j"/>
+      <plugin id="org.apache.xalan"/>
+      <plugin id="org.apache.xerces"/>
+      <plugin id="org.apache.xml.resolver"/>
+      <plugin id="org.apache.xml.serializer"/>
+      <plugin id="org.argeo.slc.ide.branding"/>
+      <plugin id="org.argeo.slc.ide.ui"/>
+      <plugin id="org.eclipse.ant.core"/>
+      <plugin id="org.eclipse.ant.ui"/>
+      <plugin id="org.eclipse.compare"/>
+      <plugin id="org.eclipse.compare.core"/>
+      <plugin id="org.eclipse.compare.win32"/>
+      <plugin id="org.eclipse.core.boot"/>
+      <plugin id="org.eclipse.core.commands"/>
+      <plugin id="org.eclipse.core.contenttype"/>
+      <plugin id="org.eclipse.core.databinding"/>
+      <plugin id="org.eclipse.core.databinding.beans"/>
+      <plugin id="org.eclipse.core.databinding.observable"/>
+      <plugin id="org.eclipse.core.databinding.property"/>
+      <plugin id="org.eclipse.core.expressions"/>
+      <plugin id="org.eclipse.core.filebuffers"/>
+      <plugin id="org.eclipse.core.filesystem"/>
+      <plugin id="org.eclipse.core.filesystem.hpux.PA_RISC" fragment="true"/>
+      <plugin id="org.eclipse.core.filesystem.hpux.ia64_32" fragment="true"/>
+      <plugin id="org.eclipse.core.filesystem.linux.ppc" fragment="true"/>
+      <plugin id="org.eclipse.core.filesystem.linux.x86" fragment="true"/>
+      <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
+      <plugin id="org.eclipse.core.filesystem.qnx.x86" fragment="true"/>
+      <plugin id="org.eclipse.core.filesystem.solaris.sparc" fragment="true"/>
+      <plugin id="org.eclipse.core.filesystem.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.core.filesystem.win32.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.core.jobs"/>
+      <plugin id="org.eclipse.core.net"/>
+      <plugin id="org.eclipse.core.net.linux.x86" fragment="true"/>
+      <plugin id="org.eclipse.core.net.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.core.net.win32.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.core.resources"/>
+      <plugin id="org.eclipse.core.resources.compatibility" fragment="true"/>
+      <plugin id="org.eclipse.core.resources.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.core.runtime"/>
+      <plugin id="org.eclipse.core.runtime.compatibility"/>
+      <plugin id="org.eclipse.core.runtime.compatibility.auth"/>
+      <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
+      <plugin id="org.eclipse.core.variables"/>
+      <plugin id="org.eclipse.cvs"/>
+      <plugin id="org.eclipse.debug.core"/>
+      <plugin id="org.eclipse.debug.ui"/>
+      <plugin id="org.eclipse.draw2d"/>
+      <plugin id="org.eclipse.dstore.core"/>
+      <plugin id="org.eclipse.dstore.extra"/>
+      <plugin id="org.eclipse.ecf"/>
+      <plugin id="org.eclipse.ecf.filetransfer"/>
+      <plugin id="org.eclipse.ecf.identity"/>
+      <plugin id="org.eclipse.ecf.provider.filetransfer"/>
+      <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
+      <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
+      <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
+      <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
+      <plugin id="org.eclipse.emf"/>
+      <plugin id="org.eclipse.emf.ant"/>
+      <plugin id="org.eclipse.emf.cheatsheets"/>
+      <plugin id="org.eclipse.emf.codegen"/>
+      <plugin id="org.eclipse.emf.codegen.ecore"/>
+      <plugin id="org.eclipse.emf.codegen.ecore.ui"/>
+      <plugin id="org.eclipse.emf.codegen.ui"/>
+      <plugin id="org.eclipse.emf.common"/>
+      <plugin id="org.eclipse.emf.common.ui"/>
+      <plugin id="org.eclipse.emf.compare"/>
+      <plugin id="org.eclipse.emf.compare.diff"/>
+      <plugin id="org.eclipse.emf.compare.diff.edit"/>
+      <plugin id="org.eclipse.emf.compare.doc"/>
+      <plugin id="org.eclipse.emf.compare.epatch"/>
+      <plugin id="org.eclipse.emf.compare.match"/>
+      <plugin id="org.eclipse.emf.compare.ui"/>
+      <plugin id="org.eclipse.emf.converter"/>
+      <plugin id="org.eclipse.emf.databinding"/>
+      <plugin id="org.eclipse.emf.databinding.edit"/>
+      <plugin id="org.eclipse.emf.doc"/>
+      <plugin id="org.eclipse.emf.ecore"/>
+      <plugin id="org.eclipse.emf.ecore.change"/>
+      <plugin id="org.eclipse.emf.ecore.change.edit"/>
+      <plugin id="org.eclipse.emf.ecore.edit"/>
+      <plugin id="org.eclipse.emf.ecore.editor"/>
+      <plugin id="org.eclipse.emf.ecore.xmi"/>
+      <plugin id="org.eclipse.emf.edit"/>
+      <plugin id="org.eclipse.emf.edit.ui"/>
+      <plugin id="org.eclipse.emf.example.installer"/>
+      <plugin id="org.eclipse.emf.exporter"/>
+      <plugin id="org.eclipse.emf.importer"/>
+      <plugin id="org.eclipse.emf.importer.ecore"/>
+      <plugin id="org.eclipse.emf.importer.java"/>
+      <plugin id="org.eclipse.emf.importer.rose"/>
+      <plugin id="org.eclipse.emf.mapping"/>
+      <plugin id="org.eclipse.emf.mapping.ecore"/>
+      <plugin id="org.eclipse.emf.mapping.ecore.editor"/>
+      <plugin id="org.eclipse.emf.mapping.ecore2ecore"/>
+      <plugin id="org.eclipse.emf.mapping.ecore2ecore.editor"/>
+      <plugin id="org.eclipse.emf.mapping.ecore2xml"/>
+      <plugin id="org.eclipse.emf.mapping.ecore2xml.ui"/>
+      <plugin id="org.eclipse.emf.mapping.ui"/>
+      <plugin id="org.eclipse.emf.mapping.xsd2ecore"/>
+      <plugin id="org.eclipse.emf.mapping.xsd2ecore.editor"/>
+      <plugin id="org.eclipse.emf.transaction"/>
+      <plugin id="org.eclipse.emf.transaction.ui"/>
+      <plugin id="org.eclipse.emf.validation"/>
+      <plugin id="org.eclipse.emf.validation.ui"/>
+      <plugin id="org.eclipse.emf.validation.ui.ide"/>
+      <plugin id="org.eclipse.emf.workspace"/>
+      <plugin id="org.eclipse.emf.workspace.ui"/>
+      <plugin id="org.eclipse.equinox.app"/>
+      <plugin id="org.eclipse.equinox.cm"/>
+      <plugin id="org.eclipse.equinox.common"/>
+      <plugin id="org.eclipse.equinox.concurrent"/>
+      <plugin id="org.eclipse.equinox.device"/>
+      <plugin id="org.eclipse.equinox.ds"/>
+      <plugin id="org.eclipse.equinox.event"/>
+      <plugin id="org.eclipse.equinox.frameworkadmin"/>
+      <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
+      <plugin id="org.eclipse.equinox.http"/>
+      <plugin id="org.eclipse.equinox.http.jetty"/>
+      <plugin id="org.eclipse.equinox.http.registry"/>
+      <plugin id="org.eclipse.equinox.http.servlet"/>
+      <plugin id="org.eclipse.equinox.http.servletbridge"/>
+      <plugin id="org.eclipse.equinox.io"/>
+      <plugin id="org.eclipse.equinox.ip"/>
+      <plugin id="org.eclipse.equinox.jsp.jasper"/>
+      <plugin id="org.eclipse.equinox.jsp.jasper.registry"/>
+      <plugin id="org.eclipse.equinox.launcher"/>
+      <plugin id="org.eclipse.equinox.launcher.carbon.macosx" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.cocoa.macosx" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.cocoa.macosx.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.gtk.linux.ppc" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.gtk.linux.s390" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.gtk.linux.s390x" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.gtk.linux.x86" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.gtk.solaris.sparc" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.gtk.solaris.x86" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.motif.aix.ppc" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.motif.hpux.PA_RISC" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.motif.hpux.ia64_32" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.motif.linux.x86" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.motif.solaris.sparc" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.win32.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.win32.win32.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.wpf.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.equinox.log"/>
+      <plugin id="org.eclipse.equinox.metatype"/>
+      <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
+      <plugin id="org.eclipse.equinox.p2.console"/>
+      <plugin id="org.eclipse.equinox.p2.core"/>
+      <plugin id="org.eclipse.equinox.p2.director"/>
+      <plugin id="org.eclipse.equinox.p2.director.app"/>
+      <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
+      <plugin id="org.eclipse.equinox.p2.engine"/>
+      <plugin id="org.eclipse.equinox.p2.exemplarysetup"/>
+      <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
+      <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
+      <plugin id="org.eclipse.equinox.p2.installer"/>
+      <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
+      <plugin id="org.eclipse.equinox.p2.metadata"/>
+      <plugin id="org.eclipse.equinox.p2.metadata.generator"/>
+      <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
+      <plugin id="org.eclipse.equinox.p2.publisher"/>
+      <plugin id="org.eclipse.equinox.p2.reconciler.dropins"/>
+      <plugin id="org.eclipse.equinox.p2.repository"/>
+      <plugin id="org.eclipse.equinox.p2.repository.tools"/>
+      <plugin id="org.eclipse.equinox.p2.tools"/>
+      <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
+      <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
+      <plugin id="org.eclipse.equinox.p2.ui"/>
+      <plugin id="org.eclipse.equinox.p2.ui.admin"/>
+      <plugin id="org.eclipse.equinox.p2.ui.admin.rcp"/>
+      <plugin id="org.eclipse.equinox.p2.ui.sdk"/>
+      <plugin id="org.eclipse.equinox.p2.ui.sdk.scheduler"/>
+      <plugin id="org.eclipse.equinox.p2.updatechecker"/>
+      <plugin id="org.eclipse.equinox.p2.updatesite"/>
+      <plugin id="org.eclipse.equinox.preferences"/>
+      <plugin id="org.eclipse.equinox.registry"/>
+      <plugin id="org.eclipse.equinox.security"/>
+      <plugin id="org.eclipse.equinox.security.macosx" fragment="true"/>
+      <plugin id="org.eclipse.equinox.security.ui"/>
+      <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.equinox.servletbridge"/>
+      <plugin id="org.eclipse.equinox.simpleconfigurator"/>
+      <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
+      <plugin id="org.eclipse.equinox.supplement"/>
+      <plugin id="org.eclipse.equinox.transforms.hook" fragment="true"/>
+      <plugin id="org.eclipse.equinox.transforms.xslt"/>
+      <plugin id="org.eclipse.equinox.useradmin"/>
+      <plugin id="org.eclipse.equinox.util"/>
+      <plugin id="org.eclipse.equinox.wireadmin"/>
+      <plugin id="org.eclipse.gef"/>
+      <plugin id="org.eclipse.gmf"/>
+      <plugin id="org.eclipse.gmf.bridge"/>
+      <plugin id="org.eclipse.gmf.bridge.trace"/>
+      <plugin id="org.eclipse.gmf.bridge.ui"/>
+      <plugin id="org.eclipse.gmf.bridge.ui.dashboard"/>
+      <plugin id="org.eclipse.gmf.codegen"/>
+      <plugin id="org.eclipse.gmf.codegen.edit"/>
+      <plugin id="org.eclipse.gmf.codegen.ui"/>
+      <plugin id="org.eclipse.gmf.common"/>
+      <plugin id="org.eclipse.gmf.doc"/>
+      <plugin id="org.eclipse.gmf.doc.ui"/>
+      <plugin id="org.eclipse.gmf.ecore.editor"/>
+      <plugin id="org.eclipse.gmf.examples"/>
+      <plugin id="org.eclipse.gmf.examples.ui.pde"/>
+      <plugin id="org.eclipse.gmf.graphdef"/>
+      <plugin id="org.eclipse.gmf.graphdef.codegen"/>
+      <plugin id="org.eclipse.gmf.graphdef.codegen.ui"/>
+      <plugin id="org.eclipse.gmf.graphdef.edit"/>
+      <plugin id="org.eclipse.gmf.map"/>
+      <plugin id="org.eclipse.gmf.map.edit"/>
+      <plugin id="org.eclipse.gmf.runtime.common.core"/>
+      <plugin id="org.eclipse.gmf.runtime.common.ui"/>
+      <plugin id="org.eclipse.gmf.runtime.common.ui.action"/>
+      <plugin id="org.eclipse.gmf.runtime.common.ui.action.ide"/>
+      <plugin id="org.eclipse.gmf.runtime.common.ui.printing"/>
+      <plugin id="org.eclipse.gmf.runtime.common.ui.printing.win32" fragment="true"/>
+      <plugin id="org.eclipse.gmf.runtime.common.ui.services"/>
+      <plugin id="org.eclipse.gmf.runtime.common.ui.services.action"/>
+      <plugin id="org.eclipse.gmf.runtime.common.ui.services.dnd"/>
+      <plugin id="org.eclipse.gmf.runtime.common.ui.services.dnd.ide"/>
+      <plugin id="org.eclipse.gmf.runtime.common.ui.services.properties"/>
+      <plugin id="org.eclipse.gmf.runtime.diagram.core"/>
+      <plugin id="org.eclipse.gmf.runtime.diagram.ui"/>
+      <plugin id="org.eclipse.gmf.runtime.diagram.ui.actions"/>
+      <plugin id="org.eclipse.gmf.runtime.diagram.ui.dnd"/>
+      <plugin id="org.eclipse.gmf.runtime.diagram.ui.geoshapes"/>
+      <plugin id="org.eclipse.gmf.runtime.diagram.ui.printing"/>
+      <plugin id="org.eclipse.gmf.runtime.diagram.ui.printing.render"/>
+      <plugin id="org.eclipse.gmf.runtime.diagram.ui.properties"/>
+      <plugin id="org.eclipse.gmf.runtime.diagram.ui.providers"/>
+      <plugin id="org.eclipse.gmf.runtime.diagram.ui.providers.ide"/>
+      <plugin id="org.eclipse.gmf.runtime.diagram.ui.render"/>
+      <plugin id="org.eclipse.gmf.runtime.diagram.ui.resources.editor"/>
+      <plugin id="org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide"/>
+      <plugin id="org.eclipse.gmf.runtime.draw2d.ui"/>
+      <plugin id="org.eclipse.gmf.runtime.draw2d.ui.render"/>
+      <plugin id="org.eclipse.gmf.runtime.draw2d.ui.render.awt"/>
+      <plugin id="org.eclipse.gmf.runtime.emf.clipboard.core"/>
+      <plugin id="org.eclipse.gmf.runtime.emf.commands.core"/>
+      <plugin id="org.eclipse.gmf.runtime.emf.core"/>
+      <plugin id="org.eclipse.gmf.runtime.emf.type.core"/>
+      <plugin id="org.eclipse.gmf.runtime.emf.type.ui"/>
+      <plugin id="org.eclipse.gmf.runtime.emf.ui"/>
+      <plugin id="org.eclipse.gmf.runtime.emf.ui.properties"/>
+      <plugin id="org.eclipse.gmf.runtime.gef.ui"/>
+      <plugin id="org.eclipse.gmf.runtime.notation"/>
+      <plugin id="org.eclipse.gmf.runtime.notation.edit"/>
+      <plugin id="org.eclipse.gmf.runtime.notation.providers"/>
+      <plugin id="org.eclipse.gmf.sdk"/>
+      <plugin id="org.eclipse.gmf.templates.legacy"/>
+      <plugin id="org.eclipse.gmf.tooldef"/>
+      <plugin id="org.eclipse.gmf.tooldef.edit"/>
+      <plugin id="org.eclipse.gmf.tooling"/>
+      <plugin id="org.eclipse.gmf.validate"/>
+      <plugin id="org.eclipse.gmf.xpand"/>
+      <plugin id="org.eclipse.gmf.xpand.editor"/>
+      <plugin id="org.eclipse.gmf.xpand.migration"/>
+      <plugin id="org.eclipse.gmf.xpand.qvtlibrary"/>
+      <plugin id="org.eclipse.help"/>
+      <plugin id="org.eclipse.help.appserver"/>
+      <plugin id="org.eclipse.help.base"/>
+      <plugin id="org.eclipse.help.ui"/>
+      <plugin id="org.eclipse.help.webapp"/>
+      <plugin id="org.eclipse.jdt"/>
+      <plugin id="org.eclipse.jdt.apt.core"/>
+      <plugin id="org.eclipse.jdt.apt.pluggable.core"/>
+      <plugin id="org.eclipse.jdt.apt.ui"/>
+      <plugin id="org.eclipse.jdt.compiler.apt" fragment="true"/>
+      <plugin id="org.eclipse.jdt.compiler.tool" fragment="true"/>
+      <plugin id="org.eclipse.jdt.core"/>
+      <plugin id="org.eclipse.jdt.core.manipulation"/>
+      <plugin id="org.eclipse.jdt.debug"/>
+      <plugin id="org.eclipse.jdt.debug.ui"/>
+      <plugin id="org.eclipse.jdt.doc.user"/>
+      <plugin id="org.eclipse.jdt.junit"/>
+      <plugin id="org.eclipse.jdt.junit.runtime"/>
+      <plugin id="org.eclipse.jdt.junit4.runtime"/>
+      <plugin id="org.eclipse.jdt.launching"/>
+      <plugin id="org.eclipse.jdt.launching.macosx"/>
+      <plugin id="org.eclipse.jdt.launching.ui.macosx"/>
+      <plugin id="org.eclipse.jdt.ui"/>
+      <plugin id="org.eclipse.jem"/>
+      <plugin id="org.eclipse.jem.beaninfo"/>
+      <plugin id="org.eclipse.jem.beaninfo.vm"/>
+      <plugin id="org.eclipse.jem.beaninfo.vm.common"/>
+      <plugin id="org.eclipse.jem.proxy"/>
+      <plugin id="org.eclipse.jem.util"/>
+      <plugin id="org.eclipse.jem.workbench"/>
+      <plugin id="org.eclipse.jface"/>
+      <plugin id="org.eclipse.jface.databinding"/>
+      <plugin id="org.eclipse.jface.text"/>
+      <plugin id="org.eclipse.jsch.core"/>
+      <plugin id="org.eclipse.jsch.ui"/>
+      <plugin id="org.eclipse.jst.common.annotations.controller"/>
+      <plugin id="org.eclipse.jst.common.annotations.core"/>
+      <plugin id="org.eclipse.jst.common.annotations.ui"/>
+      <plugin id="org.eclipse.jst.common.frameworks"/>
+      <plugin id="org.eclipse.jst.common.project.facet.core"/>
+      <plugin id="org.eclipse.jst.common.project.facet.ui"/>
+      <plugin id="org.eclipse.jst.j2ee"/>
+      <plugin id="org.eclipse.jst.j2ee.core"/>
+      <plugin id="org.eclipse.jst.j2ee.jca"/>
+      <plugin id="org.eclipse.jst.j2ee.web"/>
+      <plugin id="org.eclipse.jst.jee"/>
+      <plugin id="org.eclipse.jst.jee.web"/>
+      <plugin id="org.eclipse.jst.jsf.common"/>
+      <plugin id="org.eclipse.jst.jsf.common.runtime"/>
+      <plugin id="org.eclipse.jst.jsf.common.ui"/>
+      <plugin id="org.eclipse.jst.jsf.core"/>
+      <plugin id="org.eclipse.jst.jsf.doc.user"/>
+      <plugin id="org.eclipse.jst.jsf.facesconfig"/>
+      <plugin id="org.eclipse.jst.jsf.facesconfig.ui"/>
+      <plugin id="org.eclipse.jst.jsf.standard.tagsupport"/>
+      <plugin id="org.eclipse.jst.jsf.ui"/>
+      <plugin id="org.eclipse.jst.jsp.core"/>
+      <plugin id="org.eclipse.jst.jsp.ui"/>
+      <plugin id="org.eclipse.jst.jsp.ui.infopop"/>
+      <plugin id="org.eclipse.jst.server.core"/>
+      <plugin id="org.eclipse.jst.server.generic.core"/>
+      <plugin id="org.eclipse.jst.server.generic.ui"/>
+      <plugin id="org.eclipse.jst.server.ui"/>
+      <plugin id="org.eclipse.jst.server.ui.doc.user"/>
+      <plugin id="org.eclipse.jst.server.ui.infopop"/>
+      <plugin id="org.eclipse.jst.standard.schemas"/>
+      <plugin id="org.eclipse.ltk.core.refactoring"/>
+      <plugin id="org.eclipse.ltk.ui.refactoring"/>
+      <plugin id="org.eclipse.m2m.qvt.oml"/>
+      <plugin id="org.eclipse.m2m.qvt.oml.common"/>
+      <plugin id="org.eclipse.m2m.qvt.oml.cst.parser"/>
+      <plugin id="org.eclipse.m2m.qvt.oml.ecore.imperativeocl"/>
+      <plugin id="org.eclipse.m2m.qvt.oml.emf.util"/>
+      <plugin id="org.eclipse.m2m.qvt.oml.project"/>
+      <plugin id="org.eclipse.m2m.qvt.oml.runtime"/>
+      <plugin id="org.eclipse.mylyn"/>
+      <plugin id="org.eclipse.mylyn.bugzilla.core"/>
+      <plugin id="org.eclipse.mylyn.bugzilla.ide"/>
+      <plugin id="org.eclipse.mylyn.bugzilla.ui"/>
+      <plugin id="org.eclipse.mylyn.commons.core"/>
+      <plugin id="org.eclipse.mylyn.commons.net"/>
+      <plugin id="org.eclipse.mylyn.commons.ui"/>
+      <plugin id="org.eclipse.mylyn.compatibility"/>
+      <plugin id="org.eclipse.mylyn.context.core"/>
+      <plugin id="org.eclipse.mylyn.context.ui"/>
+      <plugin id="org.eclipse.mylyn.discovery.core"/>
+      <plugin id="org.eclipse.mylyn.discovery.ui"/>
+      <plugin id="org.eclipse.mylyn.help.ui"/>
+      <plugin id="org.eclipse.mylyn.ide.ant"/>
+      <plugin id="org.eclipse.mylyn.ide.ui"/>
+      <plugin id="org.eclipse.mylyn.java.tasks"/>
+      <plugin id="org.eclipse.mylyn.java.ui"/>
+      <plugin id="org.eclipse.mylyn.monitor.core"/>
+      <plugin id="org.eclipse.mylyn.monitor.ui"/>
+      <plugin id="org.eclipse.mylyn.pde.ui"/>
+      <plugin id="org.eclipse.mylyn.resources.ui"/>
+      <plugin id="org.eclipse.mylyn.tasks.bugs"/>
+      <plugin id="org.eclipse.mylyn.tasks.core"/>
+      <plugin id="org.eclipse.mylyn.tasks.ui"/>
+      <plugin id="org.eclipse.mylyn.team.cvs"/>
+      <plugin id="org.eclipse.mylyn.team.ui"/>
+      <plugin id="org.eclipse.mylyn.wikitext.confluence.core"/>
+      <plugin id="org.eclipse.mylyn.wikitext.confluence.ui"/>
+      <plugin id="org.eclipse.mylyn.wikitext.core"/>
+      <plugin id="org.eclipse.mylyn.wikitext.help.ui"/>
+      <plugin id="org.eclipse.mylyn.wikitext.mediawiki.core"/>
+      <plugin id="org.eclipse.mylyn.wikitext.mediawiki.ui"/>
+      <plugin id="org.eclipse.mylyn.wikitext.tasks.ui"/>
+      <plugin id="org.eclipse.mylyn.wikitext.textile.core"/>
+      <plugin id="org.eclipse.mylyn.wikitext.textile.ui"/>
+      <plugin id="org.eclipse.mylyn.wikitext.tracwiki.core"/>
+      <plugin id="org.eclipse.mylyn.wikitext.tracwiki.ui"/>
+      <plugin id="org.eclipse.mylyn.wikitext.twiki.core"/>
+      <plugin id="org.eclipse.mylyn.wikitext.twiki.ui"/>
+      <plugin id="org.eclipse.mylyn.wikitext.ui"/>
+      <plugin id="org.eclipse.ocl"/>
+      <plugin id="org.eclipse.ocl.ecore"/>
+      <plugin id="org.eclipse.osgi"/>
+      <plugin id="org.eclipse.osgi.services"/>
+      <plugin id="org.eclipse.osgi.util"/>
+      <plugin id="org.eclipse.pde"/>
+      <plugin id="org.eclipse.pde.api.tools"/>
+      <plugin id="org.eclipse.pde.api.tools.ui"/>
+      <plugin id="org.eclipse.pde.build"/>
+      <plugin id="org.eclipse.pde.core"/>
+      <plugin id="org.eclipse.pde.doc.user"/>
+      <plugin id="org.eclipse.pde.ds.core"/>
+      <plugin id="org.eclipse.pde.ds.ui"/>
+      <plugin id="org.eclipse.pde.junit.runtime"/>
+      <plugin id="org.eclipse.pde.runtime"/>
+      <plugin id="org.eclipse.pde.ua.core"/>
+      <plugin id="org.eclipse.pde.ua.ui"/>
+      <plugin id="org.eclipse.pde.ui"/>
+      <plugin id="org.eclipse.pde.ui.templates"/>
+      <plugin id="org.eclipse.platform"/>
+      <plugin id="org.eclipse.platform.doc.user"/>
+      <plugin id="org.eclipse.rcp"/>
+      <plugin id="org.eclipse.rse"/>
+      <plugin id="org.eclipse.rse.connectorservice.dstore"/>
+      <plugin id="org.eclipse.rse.connectorservice.local"/>
+      <plugin id="org.eclipse.rse.connectorservice.ssh"/>
+      <plugin id="org.eclipse.rse.connectorservice.telnet"/>
+      <plugin id="org.eclipse.rse.core"/>
+      <plugin id="org.eclipse.rse.doc.user"/>
+      <plugin id="org.eclipse.rse.dstore.security"/>
+      <plugin id="org.eclipse.rse.efs"/>
+      <plugin id="org.eclipse.rse.efs.ui"/>
+      <plugin id="org.eclipse.rse.files.ui"/>
+      <plugin id="org.eclipse.rse.importexport"/>
+      <plugin id="org.eclipse.rse.processes.ui"/>
+      <plugin id="org.eclipse.rse.services"/>
+      <plugin id="org.eclipse.rse.services.dstore"/>
+      <plugin id="org.eclipse.rse.services.files.ftp"/>
+      <plugin id="org.eclipse.rse.services.local"/>
+      <plugin id="org.eclipse.rse.services.ssh"/>
+      <plugin id="org.eclipse.rse.services.telnet"/>
+      <plugin id="org.eclipse.rse.shells.ui"/>
+      <plugin id="org.eclipse.rse.subsystems.files.core"/>
+      <plugin id="org.eclipse.rse.subsystems.files.dstore"/>
+      <plugin id="org.eclipse.rse.subsystems.files.ftp"/>
+      <plugin id="org.eclipse.rse.subsystems.files.local"/>
+      <plugin id="org.eclipse.rse.subsystems.files.ssh"/>
+      <plugin id="org.eclipse.rse.subsystems.processes.core"/>
+      <plugin id="org.eclipse.rse.subsystems.processes.dstore"/>
+      <plugin id="org.eclipse.rse.subsystems.processes.local"/>
+      <plugin id="org.eclipse.rse.subsystems.processes.shell.linux"/>
+      <plugin id="org.eclipse.rse.subsystems.shells.core"/>
+      <plugin id="org.eclipse.rse.subsystems.shells.dstore"/>
+      <plugin id="org.eclipse.rse.subsystems.shells.local"/>
+      <plugin id="org.eclipse.rse.subsystems.shells.ssh"/>
+      <plugin id="org.eclipse.rse.subsystems.shells.telnet"/>
+      <plugin id="org.eclipse.rse.subsystems.terminals.core"/>
+      <plugin id="org.eclipse.rse.subsystems.terminals.ssh"/>
+      <plugin id="org.eclipse.rse.terminals.ui"/>
+      <plugin id="org.eclipse.rse.ui"/>
+      <plugin id="org.eclipse.search"/>
+      <plugin id="org.eclipse.swt"/>
+      <plugin id="org.eclipse.swt.carbon.macosx" fragment="true"/>
+      <plugin id="org.eclipse.swt.cocoa.macosx" fragment="true"/>
+      <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.swt.gtk.linux.ppc" fragment="true"/>
+      <plugin id="org.eclipse.swt.gtk.linux.s390" fragment="true"/>
+      <plugin id="org.eclipse.swt.gtk.linux.s390x" fragment="true"/>
+      <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
+      <plugin id="org.eclipse.swt.gtk.solaris.sparc" fragment="true"/>
+      <plugin id="org.eclipse.swt.gtk.solaris.x86" fragment="true"/>
+      <plugin id="org.eclipse.swt.motif.aix.ppc" fragment="true"/>
+      <plugin id="org.eclipse.swt.motif.hpux.PA_RISC" fragment="true"/>
+      <plugin id="org.eclipse.swt.motif.hpux.ia64_32" fragment="true"/>
+      <plugin id="org.eclipse.swt.motif.linux.x86" fragment="true"/>
+      <plugin id="org.eclipse.swt.motif.solaris.sparc" fragment="true"/>
+      <plugin id="org.eclipse.swt.photon.qnx.x86" fragment="true"/>
+      <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.swt.wpf.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.team.core"/>
+      <plugin id="org.eclipse.team.cvs.core"/>
+      <plugin id="org.eclipse.team.cvs.ssh"/>
+      <plugin id="org.eclipse.team.cvs.ssh2"/>
+      <plugin id="org.eclipse.team.cvs.ui"/>
+      <plugin id="org.eclipse.team.ui"/>
+      <plugin id="org.eclipse.text"/>
+      <plugin id="org.eclipse.tm.terminal"/>
+      <plugin id="org.eclipse.tm.terminal.serial"/>
+      <plugin id="org.eclipse.tm.terminal.ssh"/>
+      <plugin id="org.eclipse.tm.terminal.telnet"/>
+      <plugin id="org.eclipse.tm.terminal.view"/>
+      <plugin id="org.eclipse.ui"/>
+      <plugin id="org.eclipse.ui.browser"/>
+      <plugin id="org.eclipse.ui.carbon" fragment="true"/>
+      <plugin id="org.eclipse.ui.cheatsheets"/>
+      <plugin id="org.eclipse.ui.cocoa" fragment="true"/>
+      <plugin id="org.eclipse.ui.console"/>
+      <plugin id="org.eclipse.ui.editors"/>
+      <plugin id="org.eclipse.ui.externaltools"/>
+      <plugin id="org.eclipse.ui.forms"/>
+      <plugin id="org.eclipse.ui.ide"/>
+      <plugin id="org.eclipse.ui.ide.application"/>
+      <plugin id="org.eclipse.ui.intro"/>
+      <plugin id="org.eclipse.ui.intro.universal"/>
+      <plugin id="org.eclipse.ui.navigator"/>
+      <plugin id="org.eclipse.ui.navigator.resources"/>
+      <plugin id="org.eclipse.ui.net"/>
+      <plugin id="org.eclipse.ui.presentations.r21"/>
+      <plugin id="org.eclipse.ui.views"/>
+      <plugin id="org.eclipse.ui.views.log"/>
+      <plugin id="org.eclipse.ui.views.properties.tabbed"/>
+      <plugin id="org.eclipse.ui.win32" fragment="true"/>
+      <plugin id="org.eclipse.ui.workbench"/>
+      <plugin id="org.eclipse.ui.workbench.compatibility" fragment="true"/>
+      <plugin id="org.eclipse.ui.workbench.texteditor"/>
+      <plugin id="org.eclipse.update.configurator"/>
+      <plugin id="org.eclipse.update.core"/>
+      <plugin id="org.eclipse.update.core.linux" fragment="true"/>
+      <plugin id="org.eclipse.update.core.win32" fragment="true"/>
+      <plugin id="org.eclipse.update.scheduler"/>
+      <plugin id="org.eclipse.update.ui"/>
+      <plugin id="org.eclipse.wst.command.env"/>
+      <plugin id="org.eclipse.wst.command.env.core"/>
+      <plugin id="org.eclipse.wst.command.env.doc.user"/>
+      <plugin id="org.eclipse.wst.command.env.infopop"/>
+      <plugin id="org.eclipse.wst.command.env.ui"/>
+      <plugin id="org.eclipse.wst.common.core"/>
+      <plugin id="org.eclipse.wst.common.emf"/>
+      <plugin id="org.eclipse.wst.common.emfworkbench.integration"/>
+      <plugin id="org.eclipse.wst.common.environment"/>
+      <plugin id="org.eclipse.wst.common.frameworks"/>
+      <plugin id="org.eclipse.wst.common.frameworks.ui"/>
+      <plugin id="org.eclipse.wst.common.infopop"/>
+      <plugin id="org.eclipse.wst.common.modulecore"/>
+      <plugin id="org.eclipse.wst.common.project.facet.core"/>
+      <plugin id="org.eclipse.wst.common.project.facet.ui"/>
+      <plugin id="org.eclipse.wst.common.snippets"/>
+      <plugin id="org.eclipse.wst.common.ui"/>
+      <plugin id="org.eclipse.wst.common.uriresolver"/>
+      <plugin id="org.eclipse.wst.css.core"/>
+      <plugin id="org.eclipse.wst.css.ui"/>
+      <plugin id="org.eclipse.wst.doc.user"/>
+      <plugin id="org.eclipse.wst.dtd.core"/>
+      <plugin id="org.eclipse.wst.dtd.ui"/>
+      <plugin id="org.eclipse.wst.dtd.ui.infopop"/>
+      <plugin id="org.eclipse.wst.dtdeditor.doc.user"/>
+      <plugin id="org.eclipse.wst.html.core"/>
+      <plugin id="org.eclipse.wst.html.ui"/>
+      <plugin id="org.eclipse.wst.html.ui.infopop"/>
+      <plugin id="org.eclipse.wst.internet.cache"/>
+      <plugin id="org.eclipse.wst.internet.monitor.core"/>
+      <plugin id="org.eclipse.wst.internet.monitor.ui"/>
+      <plugin id="org.eclipse.wst.jsdt.core"/>
+      <plugin id="org.eclipse.wst.jsdt.doc"/>
+      <plugin id="org.eclipse.wst.jsdt.manipulation"/>
+      <plugin id="org.eclipse.wst.jsdt.support.firefox"/>
+      <plugin id="org.eclipse.wst.jsdt.support.ie"/>
+      <plugin id="org.eclipse.wst.jsdt.ui"/>
+      <plugin id="org.eclipse.wst.jsdt.web.core"/>
+      <plugin id="org.eclipse.wst.jsdt.web.support.jsp"/>
+      <plugin id="org.eclipse.wst.jsdt.web.ui"/>
+      <plugin id="org.eclipse.wst.server.core"/>
+      <plugin id="org.eclipse.wst.server.discovery"/>
+      <plugin id="org.eclipse.wst.server.ui"/>
+      <plugin id="org.eclipse.wst.server.ui.doc.user"/>
+      <plugin id="org.eclipse.wst.server.ui.infopop"/>
+      <plugin id="org.eclipse.wst.sse.core"/>
+      <plugin id="org.eclipse.wst.sse.doc.user"/>
+      <plugin id="org.eclipse.wst.sse.ui"/>
+      <plugin id="org.eclipse.wst.sse.ui.infopop"/>
+      <plugin id="org.eclipse.wst.standard.schemas"/>
+      <plugin id="org.eclipse.wst.validation"/>
+      <plugin id="org.eclipse.wst.validation.infopop"/>
+      <plugin id="org.eclipse.wst.validation.ui"/>
+      <plugin id="org.eclipse.wst.web"/>
+      <plugin id="org.eclipse.wst.web.ui"/>
+      <plugin id="org.eclipse.wst.web.ui.infopop"/>
+      <plugin id="org.eclipse.wst.webtools.doc.user"/>
+      <plugin id="org.eclipse.wst.ws"/>
+      <plugin id="org.eclipse.wst.ws.explorer"/>
+      <plugin id="org.eclipse.wst.ws.infopop"/>
+      <plugin id="org.eclipse.wst.ws.parser"/>
+      <plugin id="org.eclipse.wst.ws.service.policy"/>
+      <plugin id="org.eclipse.wst.ws.service.policy.ui"/>
+      <plugin id="org.eclipse.wst.ws.ui"/>
+      <plugin id="org.eclipse.wst.wsdl"/>
+      <plugin id="org.eclipse.wst.wsdl.ui"/>
+      <plugin id="org.eclipse.wst.wsdl.ui.doc.user"/>
+      <plugin id="org.eclipse.wst.wsdl.validation"/>
+      <plugin id="org.eclipse.wst.wsi"/>
+      <plugin id="org.eclipse.wst.wsi.ui"/>
+      <plugin id="org.eclipse.wst.wsi.ui.doc.user"/>
+      <plugin id="org.eclipse.wst.xml.core"/>
+      <plugin id="org.eclipse.wst.xml.ui"/>
+      <plugin id="org.eclipse.wst.xml.ui.infopop"/>
+      <plugin id="org.eclipse.wst.xml.xpath.core"/>
+      <plugin id="org.eclipse.wst.xml.xpath.ui"/>
+      <plugin id="org.eclipse.wst.xml.xpath2.processor"/>
+      <plugin id="org.eclipse.wst.xmleditor.doc.user"/>
+      <plugin id="org.eclipse.wst.xsd.core"/>
+      <plugin id="org.eclipse.wst.xsd.ui"/>
+      <plugin id="org.eclipse.wst.xsdeditor.doc.user"/>
+      <plugin id="org.eclipse.wst.xsl"/>
+      <plugin id="org.eclipse.wst.xsl.core"/>
+      <plugin id="org.eclipse.wst.xsl.debug.ui"/>
+      <plugin id="org.eclipse.wst.xsl.doc"/>
+      <plugin id="org.eclipse.wst.xsl.jaxp.debug"/>
+      <plugin id="org.eclipse.wst.xsl.jaxp.debug.ui"/>
+      <plugin id="org.eclipse.wst.xsl.jaxp.launching"/>
+      <plugin id="org.eclipse.wst.xsl.launching"/>
+      <plugin id="org.eclipse.wst.xsl.saxon"/>
+      <plugin id="org.eclipse.wst.xsl.ui"/>
+      <plugin id="org.eclipse.wst.xsl.xalan"/>
+      <plugin id="org.eclipse.xsd"/>
+      <plugin id="org.eclipse.xsd.cheatsheets"/>
+      <plugin id="org.eclipse.xsd.doc"/>
+      <plugin id="org.eclipse.xsd.ecore.converter"/>
+      <plugin id="org.eclipse.xsd.ecore.exporter"/>
+      <plugin id="org.eclipse.xsd.ecore.importer"/>
+      <plugin id="org.eclipse.xsd.edit"/>
+      <plugin id="org.eclipse.xsd.editor"/>
+      <plugin id="org.eclipse.xsd.example.installer"/>
+      <plugin id="org.eclipse.xsd.mapping"/>
+      <plugin id="org.eclipse.xsd.mapping.editor"/>
+      <plugin id="org.hamcrest.core"/>
+      <plugin id="org.junit"/>
+      <plugin id="org.junit4"/>
+      <plugin id="org.mortbay.jetty.server"/>
+      <plugin id="org.mortbay.jetty.util"/>
+      <plugin id="org.objectweb.asm"/>
+      <plugin id="org.sat4j.core"/>
+      <plugin id="org.sat4j.pb"/>
+      <plugin id="org.tigris.subversion.clientadapter"/>
+      <plugin id="org.tigris.subversion.clientadapter.javahl"/>
+      <plugin id="org.tigris.subversion.clientadapter.svnkit"/>
+      <plugin id="org.tigris.subversion.subclipse.core"/>
+      <plugin id="org.tigris.subversion.subclipse.doc"/>
+      <plugin id="org.tigris.subversion.subclipse.graph"/>
+      <plugin id="org.tigris.subversion.subclipse.mylyn"/>
+      <plugin id="org.tigris.subversion.subclipse.ui"/>
+      <plugin id="org.tmatesoft.svnkit"/>
+      <plugin id="org.uddi4j"/>
+      <plugin id="org.w3c.css.sac"/>
+      <plugin id="org.w3c.dom.events"/>
+      <plugin id="org.w3c.dom.smil"/>
+      <plugin id="org.w3c.dom.svg"/>
+   </plugins>
+
+   <features>
+      <feature id="org.argeo.slc.ide" version="0.12.1.D20100107_1516"/>
+      <feature id="org.eclipse.cvs" version="1.1.101.R35x_v20090811-7E79FEd9KKF5H2YDWFLLBL01A16"/>
+      <feature id="org.eclipse.cvs.source" version="1.1.101.R35x_v20090811-7E79FEd9KKF5H2YDWFLLBL01A16"/>
+      <feature id="org.eclipse.epp.package.rcp.feature" version="1.2.1.20090918-0703"/>
+      <feature id="org.eclipse.epp.usagedata.feature" version="1.1.0.R200906100410"/>
+      <feature id="org.eclipse.equinox.p2.user.ui" version="1.1.1.R35x_v20090811-7u6FbEFYXk1qWdbS0gnpRg2932"/>
+      <feature id="org.eclipse.equinox.p2.user.ui.source" version="1.1.1.R35x_v20090811-7u6FbEFYXk1qWdbS0gnpRg2932"/>
+      <feature id="org.eclipse.help" version="1.1.1.R35x_v20090811-7e7eFAnFEx2XZoYz0uPgIfwD"/>
+      <feature id="org.eclipse.help.source" version="1.1.1.R35x_v20090811-7e7eFAnFEx2XZoYz0uPgIfwD"/>
+      <feature id="org.eclipse.jdt" version="3.5.1.r351_v20090810-0600-7r88FEoFI0WTo6Az-1qFRHm37ChJ"/>
+      <feature id="org.eclipse.jdt.source" version="3.5.1.r351_v20090810-0600-7r88FEoFI0WTo6Az-1qFRHm37ChJ"/>
+      <feature id="org.eclipse.pde" version="3.5.1.R35x_v20090811-7Z7_F9zFDX-aT6Ywvh8_S93"/>
+      <feature id="org.eclipse.pde.source" version="3.5.1.R35x_v20090811-7Z7_F9zFDX-aT6Ywvh8_S93"/>
+      <feature id="org.eclipse.platform" version="3.5.1.R35x_v20090910-9gEeG1_FthkNDSP2odXdThaOu9GFDPn83DGB7"/>
+      <feature id="org.eclipse.platform.source" version="3.5.1.R35x_v20090910-9gEeG1_FthkNDSP2odXdThaOu9GFDPn83DGB7"/>
+      <feature id="org.eclipse.rcp" version="3.5.1.R35x_v20090811-9SA0FxVFqE70OL1ARMrfcO6e7BA6"/>
+      <feature id="org.eclipse.rcp.source" version="3.5.1.R35x_v20090811-9SA0FxVFqE70OL1ARMrfcO6e7BA6"/>
+      <feature id="org.eclipse.wst.common_core.feature" version="3.1.1.v200908102300-7B77FZ3F7RZHIVI9QdN4PM"/>
+      <feature id="org.eclipse.wst.common_ui.feature" version="3.1.1.v200908102300-7B5FRGDhdMNPnndenAjpWJAReO5Q"/>
+      <feature id="org.eclipse.wst.xml_core.feature" version="3.1.1.v200907161031-7C7OFPgF7RZHIXHvT5MhWA"/>
+      <feature id="org.eclipse.wst.xml_ui.feature" version="3.1.1.v200907161031-7H6FM_DxtkM-7aeTHKEBbQqcZOZ2"/>
+      <feature id="org.eclipse.wst.xml_userdoc.feature" version="3.1.1.v200906020459-50FR7AkF77f7MESDKEF"/>
+      <feature id="org.eclipse.mylyn.bugzilla_feature" version="3.2.2.v20090912-0400-e3x"/>
+      <feature id="org.eclipse.mylyn.context_feature" version="3.2.2.v20090912-0400-e3x"/>
+      <feature id="org.eclipse.mylyn.ide_feature" version="3.2.2.v20090912-0400-e3x"/>
+      <feature id="org.eclipse.mylyn.java_feature" version="3.2.2.v20090912-0400-e3x"/>
+      <feature id="org.eclipse.mylyn.pde_feature" version="3.2.2.v20090912-0400-e3x"/>
+      <feature id="org.eclipse.mylyn.sdk_feature" version="3.2.2.v20090912-0400-e3x"/>
+      <feature id="org.eclipse.mylyn.team_feature" version="3.2.2.v20090912-0400-e3x"/>
+      <feature id="org.eclipse.mylyn.wikitext_feature" version="1.1.2.v20090912-0400-e3x"/>
+      <feature id="org.eclipse.mylyn_feature" version="3.2.2.v20090912-0400-e3x"/>
+   </features>
+
+
+</product>
diff --git a/plugins/org.argeo.slc.ide.branding/plugin.xml b/plugins/org.argeo.slc.ide.branding/plugin.xml
new file mode 100644 (file)
index 0000000..19b35d1
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+   <extension
+         id="product"
+         point="org.eclipse.core.runtime.products">
+      <product
+            application="org.eclipse.ui.ide.workbench"
+            name="Argeo SLC IDE">
+         <property
+               name="windowImages"
+               value="icons/argeo-icon-100104-256.png,icons/argeo-icon-100104-256.png,icons/argeo-icon-100104-256.png,icons/argeo-icon-100104-256.png,icons/argeo-icon-100104-256.png">
+         </property>
+         <property
+               name="aboutText"
+               value="%productBlurb">
+         </property>
+         <property
+               name="aboutImage"
+               value="eclipse_lg.gif">
+         </property>
+         <property
+               name="startupForegroundColor"
+               value="0066D0">
+         </property>
+         <property
+               name="startupProgressRect"
+               value="0,280,455,15">
+         </property>
+         <property
+               name="startupMessageRect"
+               value="7,220,441,20">
+         </property>
+         <property
+               name="appName"
+               value="Argeo SLC IDE">
+         </property>
+         <property
+               name="preferenceCustomization"
+               value="plugin_customization.ini">
+         </property>
+      </product>
+   </extension>
+</plugin>
diff --git a/plugins/org.argeo.slc.ide.branding/plugin_customization.ini b/plugins/org.argeo.slc.ide.branding/plugin_customization.ini
new file mode 100644 (file)
index 0000000..5344da0
--- /dev/null
@@ -0,0 +1,2 @@
+org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP=true
+org.eclipse.ui/defaultPerspectiveId=org.argeo.slc.ide.ui.slcPerspective
diff --git a/plugins/org.argeo.slc.ide.branding/slc-ide.target b/plugins/org.argeo.slc.ide.branding/slc-ide.target
new file mode 100644 (file)
index 0000000..cbd5555
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde version="3.5"?>
+
+<target name="SLC IDE">
+<locations>
+<location path="${system_property:user.home}/dev/tools/eclipse-3.5.1-delta-pack" type="Directory"/>
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<unit id="org.tmatesoft.svnkit.feature.group" version="1.3.1.6109"/>
+<unit id="com.sun.jna.feature.group" version="3.1.0"/>
+<unit id="com.collabnet.subversion.merge.feature.feature.group" version="1.10.0"/>
+<unit id="org.tigris.subversion.subclipse.feature.group" version="1.6.5"/>
+<unit id="org.tigris.subversion.subclipse.mylyn.feature.group" version="3.0.0"/>
+<unit id="org.tigris.subversion.clientadapter.feature.feature.group" version="1.6.4.1"/>
+<unit id="org.tigris.subversion.clientadapter.javahl.feature.feature.group" version="1.6.6"/>
+<unit id="org.tigris.subversion.subclipse.graph.feature.feature.group" version="1.0.7"/>
+<unit id="org.tigris.subversion.clientadapter.svnkit.feature.feature.group" version="1.6.4"/>
+<repository location="http://subclipse.tigris.org/update_1.6.x"/>
+</location>
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<unit id="org.eclipse.cvs.feature.group" version="1.1.101.R35x_v20090811-7E79FEd9KKF5H2YDWFLLBL01A16"/>
+<unit id="org.eclipse.mylyn.ide_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
+<unit id="org.eclipse.mylyn.java_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
+<unit id="org.eclipse.mylyn.pde_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
+<unit id="org.eclipse.mylyn.team_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
+<unit id="org.eclipse.mylyn.bugzilla_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
+<unit id="org.eclipse.mylyn_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
+<unit id="org.eclipse.mylyn.context_feature.feature.group" version="3.2.2.v20090912-0400-e3x"/>
+<unit id="org.eclipse.mylyn.wikitext_feature.feature.group" version="1.1.2.v20090912-0400-e3x"/>
+<unit id="org.eclipse.equinox.sdk.feature.group" version="3.5.1.r351_v20090901-7G7MAA7lQiEeE7LKsaYgOK58fdAa"/>
+<unit id="org.eclipse.pde.feature.group" version="3.5.1.R35x_v20090811-7Z7_F9zFDX-aT6Ywvh8_S93"/>
+<unit id="org.eclipse.rse.feature.group" version="3.1.1.v200907301400-7L5AE8wqaHPUdsOqKFUpxnbxGiz-"/>
+<unit id="org.eclipse.tm.terminal.sdk.feature.group" version="3.0.1.v200907301400-7N-FBaC5OqdP-0Zr1iqaZNOEG"/>
+<unit id="org.eclipse.emf.sdk.feature.group" version="2.5.0.v200906151043"/>
+<unit id="org.eclipse.emf.compare.sdk.feature.group" version="1.0.1.v200909161031"/>
+<unit id="org.eclipse.gmf.sdk.feature.group" version="2.2.1.v20090814-1000-7C7F1BLxlfAqjMDHunFV5S-_YY-Q"/>
+<unit id="org.eclipse.xsd.sdk.feature.group" version="2.5.0.v200906151043"/>
+<unit id="org.eclipse.jdt.feature.group" version="3.5.1.r351_v20090810-0600-7r88FEoFI0WTo6Az-1qFRHm37ChJ"/>
+<unit id="org.eclipse.wst.xml_ui.feature.feature.group" version="3.1.1.v200907161031-7H6FM_DxtkM-7aeTHKEBbQqcZOZ2"/>
+<unit id="org.eclipse.wst.jsdt.feature.feature.group" version="1.1.2.v200908101420-77-FGCCcNBC-BhLcE_Pm"/>
+<unit id="org.eclipse.wst.common.fproj.feature.group" version="3.1.1.v200908111817-37718s733L3J555J5H"/>
+<unit id="org.eclipse.jst.common.fproj.enablement.jdt.feature.group" version="3.1.1.v200908111817-37718s733L3J555J5H"/>
+<unit id="org.eclipse.wst.web_ui.feature.feature.group" version="3.1.1.v200908120400-7R77FSpEVw2xXR0CtKvX6bG6a2qU"/>
+<unit id="org.eclipse.wst.xsl.feature.feature.group" version="1.0.2.v200908271520-7R7T8sFIhIehWg454rq_U1"/>
+<unit id="org.eclipse.jst.server_ui.feature.feature.group" version="3.1.1.v20090817-7A2FBa9xFaGovXGKcCWMK2355"/>
+<unit id="org.eclipse.jst.web_ui.feature.feature.group" version="3.1.1.v200908121609-7E77FBfDlwYa_9sdy2q77doi14gl"/>
+<repository location="http://download.eclipse.org/releases/galileo"/>
+</location>
+</locations>
+<implicitDependencies>
+<plugin id="org.eclipse.wst.xml.ui"/>
+</implicitDependencies>
+</target>
diff --git a/plugins/org.argeo.slc.ide.branding/splash.bmp b/plugins/org.argeo.slc.ide.branding/splash.bmp
new file mode 100644 (file)
index 0000000..ee502f3
Binary files /dev/null and b/plugins/org.argeo.slc.ide.branding/splash.bmp differ
diff --git a/plugins/org.argeo.slc.ide.ui/.classpath b/plugins/org.argeo.slc.ide.ui/.classpath
new file mode 100644 (file)
index 0000000..b0a38d8
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.argeo.slc.ide.ui/.project b/plugins/org.argeo.slc.ide.ui/.project
new file mode 100644 (file)
index 0000000..ad44979
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+       <name>org.argeo.slc.ide.ui</name>\r
+       <comment></comment>\r
+       <projects>\r
+       </projects>\r
+       <buildSpec>\r
+               <buildCommand>\r
+                       <name>org.eclipse.jdt.core.javabuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.pde.ManifestBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.pde.SchemaBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+       </buildSpec>\r
+       <natures>\r
+               <nature>org.eclipse.pde.PluginNature</nature>\r
+               <nature>org.eclipse.jdt.core.javanature</nature>\r
+       </natures>\r
+</projectDescription>\r
diff --git a/plugins/org.argeo.slc.ide.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/org.argeo.slc.ide.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..05eb256
--- /dev/null
@@ -0,0 +1,12 @@
+#Fri Aug 29 11:26:23 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.argeo.slc.ide.ui/META-INF/MANIFEST.MF b/plugins/org.argeo.slc.ide.ui/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..0ba5aa7
--- /dev/null
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: SLC IDE UI
+Bundle-SymbolicName: org.argeo.slc.ide.ui;singleton:=true
+Bundle-Version: 1.1.3.SNAPSHOT
+Bundle-Activator: org.argeo.slc.ide.ui.SlcIdeUiPlugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.debug.core,
+ org.eclipse.jdt.launching,
+ org.eclipse.debug.ui,
+ org.eclipse.jdt.core,
+ org.eclipse.ui.console,
+ org.eclipse.jdt.debug.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.core.variables,
+ org.eclipse.pde.build,
+ org.eclipse.pde.ui;bundle-version="3.4.0",
+ org.eclipse.jdt.ui;bundle-version="3.4.2"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: Argeo
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.argeo.slc.ide.ui/build.properties b/plugins/org.argeo.slc.ide.ui/build.properties
new file mode 100644 (file)
index 0000000..3cfd516
--- /dev/null
@@ -0,0 +1,5 @@
+source.. = src/main/java/\r
+bin.includes = META-INF/,\\r
+               .,\\r
+               plugin.xml,\\r
+               icons/\r
diff --git a/plugins/org.argeo.slc.ide.ui/icons/argeo-icon-100104-256.png b/plugins/org.argeo.slc.ide.ui/icons/argeo-icon-100104-256.png
new file mode 100644 (file)
index 0000000..a9af088
Binary files /dev/null and b/plugins/org.argeo.slc.ide.ui/icons/argeo-icon-100104-256.png differ
diff --git a/plugins/org.argeo.slc.ide.ui/icons/eclipse-launch.gif b/plugins/org.argeo.slc.ide.ui/icons/eclipse-launch.gif
new file mode 100644 (file)
index 0000000..4b42e57
Binary files /dev/null and b/plugins/org.argeo.slc.ide.ui/icons/eclipse-launch.gif differ
diff --git a/plugins/org.argeo.slc.ide.ui/icons/slc-launch.gif b/plugins/org.argeo.slc.ide.ui/icons/slc-launch.gif
new file mode 100644 (file)
index 0000000..b8ca14a
Binary files /dev/null and b/plugins/org.argeo.slc.ide.ui/icons/slc-launch.gif differ
diff --git a/plugins/org.argeo.slc.ide.ui/plugin.xml b/plugins/org.argeo.slc.ide.ui/plugin.xml
new file mode 100644 (file)
index 0000000..158d007
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<?eclipse version="3.2"?>\r
+<plugin>\r
+<extension \r
+       point="org.eclipse.ui.preferencePages"> \r
+      <page \r
+         id="org.argeo.slc.ide.ui.mainPreferencePage" \r
+         name="SLC" \r
+         class="org.argeo.slc.ide.ui.SlcMainPreferencePage"> \r
+       </page> \r
+</extension> \r
+<extension\r
+      point="org.eclipse.ui.perspectives">\r
+   <perspective\r
+         class="org.argeo.slc.ide.ui.SlcPerspectiveFactory"\r
+         icon="icons/argeo-icon-100104-256.png"\r
+         id="org.argeo.slc.ide.ui.slcPerspective"\r
+         name="SLC">\r
+   </perspective>\r
+</extension>\r
+<extension\r
+      point="org.eclipse.debug.ui.launchShortcuts">\r
+   <shortcut\r
+         class="org.argeo.slc.ide.ui.launch.osgi.EclipseBootLaunchShortcut"\r
+         icon="icons/eclipse-launch.gif"\r
+         id="org.argeo.slc.ide.ui.eclipseBootLaunchShortcut"\r
+         label="Eclipse Boot (RCP)"\r
+         modes="run,debug">\r
+         <contextualLaunch>\r
+            <enablement>\r
+            <with variable="selection">\r
+               <count value="1"/>\r
+               <iterate>\r
+                 <or>\r
+                   <test property="org.eclipse.debug.ui.matchesPattern" value="*.properties"/>\r
+                   <test property="org.eclipse.debug.ui.matchesPattern" value="config.ini"/>\r
+                 </or>\r
+                </iterate>\r
+             </with>\r
+           </enablement>\r
+         </contextualLaunch>         \r
+   </shortcut>\r
+   <shortcut\r
+         class="org.argeo.slc.ide.ui.launch.osgi.OsgiBootLaunchShortcut"\r
+         icon="icons/slc-launch.gif"\r
+         id="org.argeo.slc.ide.ui.osgiBootLaunchShortcut"\r
+         label="OSGi Boot (Equinox, RAP)"\r
+         modes="run,debug">\r
+         <contextualLaunch>\r
+            <enablement>\r
+            <with variable="selection">\r
+               <count value="1"/>\r
+               <iterate>\r
+                 <or>\r
+                   <test property="org.eclipse.debug.ui.matchesPattern" value="*.properties"/>\r
+                   <test property="org.eclipse.debug.ui.matchesPattern" value="config.ini"/>\r
+                 </or>\r
+                </iterate>\r
+             </with>\r
+           </enablement>\r
+         </contextualLaunch>         \r
+   </shortcut>\r
+</extension>\r
+  <extension\r
+         point="org.eclipse.debug.core.launchConfigurationTypes">\r
+      <launchConfigurationType\r
+            id="org.argeo.slc.ide.ui.OsgiBootEquinoxLauncher"\r
+            name="OSGi Boot Equinox"\r
+            delegate="org.argeo.slc.ide.ui.launch.osgi.OsgiBootEquinoxLaunchConfiguration"\r
+            modes="run, debug"\r
+            sourceLocatorId="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"\r
+            sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer"/>\r
+      <launchConfigurationType\r
+            id="org.argeo.slc.ide.ui.EclipseBootLauncher"\r
+            name="Eclipse Boot"\r
+            delegate="org.argeo.slc.ide.ui.launch.osgi.EclipseBootLaunchConfiguration"\r
+            modes="run, debug"\r
+            sourceLocatorId="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"\r
+            sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer"/>\r
+   </extension>\r
+  <extension\r
+         point="org.eclipse.debug.ui.launchConfigurationTabGroups">\r
+      <launchConfigurationTabGroup\r
+            type="org.argeo.slc.ide.ui.OsgiBootEquinoxLauncher"\r
+            class="org.argeo.slc.ide.ui.launch.osgi.OsgiBootLauncherTabGroup"\r
+            id="org.argeo.slc.ide.ui.OsgiBootLauncherTabGroup">\r
+      </launchConfigurationTabGroup>\r
+      <launchConfigurationTabGroup\r
+            type="org.argeo.slc.ide.ui.EclipseBootLauncher"\r
+            class="org.argeo.slc.ide.ui.launch.osgi.EclipseBootLauncherTabGroup"\r
+            id="org.argeo.slc.ide.ui.EclipseBootLauncherTabGroup">\r
+      </launchConfigurationTabGroup>\r
+  </extension>\r
+   <extension\r
+         point="org.eclipse.debug.ui.launchConfigurationTypeImages">\r
+      <launchConfigurationTypeImage\r
+            icon="icons/slc-launch.gif"\r
+            configTypeID="org.argeo.slc.ide.ui.OsgiBootEquinoxLauncher"\r
+            id="org.argeo.slc.ide.ui.OsgiBootEquinoxLauncherImage">\r
+      </launchConfigurationTypeImage>\r
+      <launchConfigurationTypeImage\r
+            icon="icons/eclipse-launch.gif"\r
+            configTypeID="org.argeo.slc.ide.ui.EclipseBootLauncher"\r
+            id="org.argeo.slc.ide.ui.EclipseBootLauncherImage">\r
+      </launchConfigurationTypeImage>\r
+   </extension>\r
+</plugin>\r
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/DeployedSlcSystem.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/DeployedSlcSystem.java
new file mode 100644 (file)
index 0000000..8992432
--- /dev/null
@@ -0,0 +1,50 @@
+package org.argeo.slc.ide.ui;\r
+\r
+import java.io.File;\r
+import java.io.IOException;\r
+import java.util.List;\r
+import java.util.Vector;\r
+\r
+import org.eclipse.core.runtime.CoreException;\r
+import org.eclipse.jdt.launching.IVMInstall;\r
+import org.eclipse.jdt.launching.JavaRuntime;\r
+\r
+public class DeployedSlcSystem implements SlcSystem {\r
+       private File baseDir;\r
+       private String relLibDir = "lib";\r
+\r
+       public DeployedSlcSystem(String baseDirPath) {\r
+               try {\r
+                       this.baseDir = new File(baseDirPath).getCanonicalFile();\r
+               } catch (IOException e) {\r
+                       throw new RuntimeException("Cannot get path for " + baseDirPath, e);\r
+               }\r
+       }\r
+\r
+       public String[] getClasspath() throws CoreException {\r
+               List<String> classpath = new Vector<String>();\r
+               File libDir = new File(baseDir.getPath() + File.separator + relLibDir);\r
+               File[] files = libDir.listFiles();\r
+               for (File file : files) {\r
+                       try {\r
+                               classpath.add(file.getCanonicalPath());\r
+                       } catch (IOException e) {\r
+                               throw new RuntimeException("Cannot get path for " + file, e);\r
+                       }\r
+               }\r
+               return classpath.toArray(new String[classpath.size()]);\r
+       }\r
+\r
+       public IVMInstall getVmInstall() throws CoreException {\r
+               return JavaRuntime.getDefaultVMInstall();\r
+       }\r
+\r
+       public String getAntHome() {\r
+               return baseDir.getPath();\r
+       }\r
+\r
+       public String getJavaLibraryPath() {\r
+               return baseDir.getPath() + File.separator + "bin";\r
+       }\r
+\r
+}\r
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/EmbeddedSlcSystem.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/EmbeddedSlcSystem.java
new file mode 100644 (file)
index 0000000..e2414e0
--- /dev/null
@@ -0,0 +1,34 @@
+package org.argeo.slc.ide.ui;
+
+import org.argeo.slc.ide.ui.launch.preferences.SlcLaunchPreferencePage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
+
+public class EmbeddedSlcSystem implements SlcSystem {
+       private final IJavaProject project;
+
+       public EmbeddedSlcSystem(IJavaProject project) {
+               this.project = project;
+       }
+
+       public String[] getClasspath() throws CoreException {
+               return JavaRuntime.computeDefaultRuntimeClassPath(project);
+       }
+
+       public String getJavaLibraryPath() {
+               String javaLibPath = SlcIdeUiPlugin.getDefault()
+                               .getPreferenceStore().getString(
+                                               SlcLaunchPreferencePage.PREF_SLC_RUNTIME_LOCATION);
+               if (javaLibPath == null || javaLibPath.equals(""))
+                       return null;
+               else
+                       return javaLibPath;
+       }
+
+       public IVMInstall getVmInstall() throws CoreException {
+               return JavaRuntime.getVMInstall(project);
+       }
+
+}
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcIdeUiPlugin.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcIdeUiPlugin.java
new file mode 100644 (file)
index 0000000..088b4f4
--- /dev/null
@@ -0,0 +1,119 @@
+package org.argeo.slc.ide.ui;\r
+\r
+import java.net.URL;\r
+\r
+import org.eclipse.core.resources.IResource;\r
+import org.eclipse.core.runtime.CoreException;\r
+import org.eclipse.debug.core.DebugEvent;\r
+import org.eclipse.debug.core.DebugPlugin;\r
+import org.eclipse.debug.core.IDebugEventSetListener;\r
+import org.eclipse.debug.core.ILaunch;\r
+import org.eclipse.debug.core.model.IProcess;\r
+import org.eclipse.jface.resource.ImageDescriptor;\r
+import org.eclipse.jface.resource.ImageRegistry;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.ui.plugin.AbstractUIPlugin;\r
+import org.osgi.framework.BundleContext;\r
+\r
+/**\r
+ * The activator class controls the plug-in life cycle\r
+ */\r
+public class SlcIdeUiPlugin extends AbstractUIPlugin {\r
+\r
+       // The plug-in ID\r
+       public static final String ID = "org.argeo.slc.ide.ui";\r
+\r
+       // The shared instance\r
+       private static SlcIdeUiPlugin plugin;\r
+\r
+       /**\r
+        * The constructor\r
+        */\r
+       public SlcIdeUiPlugin() {\r
+       }\r
+\r
+       @Override\r
+       public void start(BundleContext context) throws Exception {\r
+               super.start(context);\r
+               plugin = this;\r
+               DebugPlugin.getDefault()\r
+                               .addDebugEventListener(new DebugEventListener());\r
+       }\r
+\r
+       @Override\r
+       public void stop(BundleContext context) throws Exception {\r
+               plugin = null;\r
+               super.stop(context);\r
+       }\r
+\r
+       /**\r
+        * Returns the shared instance\r
+        * \r
+        * @return the shared instance\r
+        */\r
+       public static SlcIdeUiPlugin getDefault() {\r
+               return plugin;\r
+       }\r
+\r
+       public Image getImage(String relativeURL) {\r
+               ImageRegistry imageRegistry = getImageRegistry();\r
+               Image image = imageRegistry.get(relativeURL);\r
+               if (image == null) {\r
+                       URL imageURL = getBundle().getEntry(relativeURL);\r
+                       ImageDescriptor descriptor = ImageDescriptor\r
+                                       .createFromURL(imageURL);\r
+                       image = descriptor.createImage();\r
+                       imageRegistry.put(relativeURL, image);\r
+               }\r
+               return image;\r
+       }\r
+\r
+       protected static class DebugEventListener implements IDebugEventSetListener {\r
+               public void handleDebugEvents(DebugEvent[] events) {\r
+                       if (events == null)\r
+                               return;\r
+\r
+                       for (int i = 0; i < events.length; i++) {\r
+                               DebugEvent event = events[i];\r
+                               if (event == null)\r
+                                       continue;\r
+                               Object source = event.getSource();\r
+                               if (source instanceof IProcess\r
+                                               && event.getKind() == DebugEvent.TERMINATE) {\r
+                                       IProcess process = (IProcess) source;\r
+                                       if (process == null)\r
+                                               continue;\r
+                                       ILaunch launch = process.getLaunch();\r
+                                       if (launch != null)\r
+                                               refreshOsgiBootLaunch(launch);\r
+\r
+                               }\r
+                       }\r
+               }\r
+\r
+               protected void refreshOsgiBootLaunch(ILaunch launch) {\r
+                       try {\r
+                               if (launch == null)\r
+                                       return;\r
+                               IResource[] resources = launch.getLaunchConfiguration()\r
+                                               .getMappedResources();\r
+                               if (resources == null)\r
+                                       return;\r
+                               if (resources.length > 0) {\r
+                                       IResource propertiesFile = resources[0];\r
+                                       if (propertiesFile.getParent() == null)\r
+                                               return;\r
+                                       propertiesFile.getParent().refreshLocal(\r
+                                                       IResource.DEPTH_INFINITE, null);\r
+                                       // System.out.println("Refreshed "\r
+                                       // + propertiesFile.getParent());\r
+                               }\r
+                       } catch (CoreException e) {\r
+                               e.printStackTrace();\r
+                       }\r
+\r
+               }\r
+\r
+       }\r
+\r
+}\r
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcMainPreferencePage.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcMainPreferencePage.java
new file mode 100644 (file)
index 0000000..d091715
--- /dev/null
@@ -0,0 +1,26 @@
+package org.argeo.slc.ide.ui;\r
+\r
+import org.eclipse.jface.preference.FieldEditorPreferencePage;\r
+import org.eclipse.ui.IWorkbench;\r
+import org.eclipse.ui.IWorkbenchPreferencePage;\r
+\r
+public class SlcMainPreferencePage extends FieldEditorPreferencePage implements\r
+               IWorkbenchPreferencePage {\r
+       public SlcMainPreferencePage() {\r
+//             IPreferenceStore store = SlcIdePlugin.getDefault().getPreferenceStore();\r
+//             setPreferenceStore(store);\r
+               setDescription("Argeo SLC Preferences");\r
+       }\r
+\r
+       @Override\r
+       protected void createFieldEditors() {\r
+//             addField(new DirectoryFieldEditor(PREF_SLC_RUNTIME_LOCATION,\r
+//                             "SLC Runtime", getFieldEditorParent()));\r
+//             addField(new DirectoryFieldEditor(PREF_EMBEDDED_JAVA_LIBRARY_PATH,\r
+//                             "Embedded Java Library Path", getFieldEditorParent()));\r
+       }\r
+\r
+       public void init(IWorkbench workbench) {\r
+       }\r
+\r
+}\r
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcPerspectiveFactory.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcPerspectiveFactory.java
new file mode 100644 (file)
index 0000000..7c0084e
--- /dev/null
@@ -0,0 +1,27 @@
+package org.argeo.slc.ide.ui;\r
+\r
+import org.eclipse.jdt.ui.JavaUI;\r
+import org.eclipse.ui.IFolderLayout;\r
+import org.eclipse.ui.IPageLayout;\r
+import org.eclipse.ui.IPerspectiveFactory;\r
+import org.eclipse.ui.console.IConsoleConstants;\r
+\r
+public class SlcPerspectiveFactory implements IPerspectiveFactory {\r
+\r
+       public void createInitialLayout(IPageLayout layout) {\r
+               // Get the editor area.\r
+               String editorArea = layout.getEditorArea();\r
+\r
+               IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 0.25f,\r
+                       editorArea);\r
+               topLeft.addView(JavaUI.ID_PACKAGES);\r
+\r
+               IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.66f,\r
+                               editorArea);\r
+               bottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);\r
+               bottom.addView(IPageLayout.ID_TASK_LIST);\r
+               \r
+               layout.addActionSet("org.eclipse.debug.ui.launchActionSet");\r
+       }\r
+\r
+}\r
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcSystem.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/SlcSystem.java
new file mode 100644 (file)
index 0000000..ff797c6
--- /dev/null
@@ -0,0 +1,10 @@
+package org.argeo.slc.ide.ui;\r
+\r
+import org.eclipse.core.runtime.CoreException;\r
+import org.eclipse.jdt.launching.IVMInstall;\r
+\r
+public interface SlcSystem {\r
+       public String[] getClasspath() throws CoreException;\r
+       public String getJavaLibraryPath();\r
+       public IVMInstall getVmInstall() throws CoreException;\r
+}\r
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLaunchConfiguration.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLaunchConfiguration.java
new file mode 100644 (file)
index 0000000..c45005f
--- /dev/null
@@ -0,0 +1,63 @@
+package org.argeo.slc.ide.ui.launch.osgi;
+
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.argeo.slc.ide.ui.SlcIdeUiPlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.pde.launching.EclipseApplicationLaunchConfiguration;
+
+/** OSGiBoot launch configuration. */
+public class EclipseBootLaunchConfiguration extends
+               EclipseApplicationLaunchConfiguration {
+       public final static String ID = SlcIdeUiPlugin.ID + ".EclipseBootLauncher";
+
+       @Override
+       public void launch(ILaunchConfiguration configuration, String mode,
+                       ILaunch launch, IProgressMonitor monitor) throws CoreException {
+               super.launch(configuration, mode, launch, monitor);
+
+               // System.out.println("targetBundles="
+               // + configuration.getAttribute(
+               // IPDELauncherConstants.SELECTED_TARGET_PLUGINS, ""));
+               // System.out.println("workspaceBundles="
+               // + configuration.getAttribute(
+               // IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS, ""));
+
+               // Refresh resources before launching
+               final IFile propertiesFile = (IFile) configuration.getMappedResources()[0];
+               propertiesFile.getParent().refreshLocal(IResource.DEPTH_INFINITE,
+                               monitor);
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       protected void preLaunchCheck(ILaunchConfiguration configuration,
+                       ILaunch launch, IProgressMonitor monitor) throws CoreException {
+               ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy();
+               OsgiLaunchHelper.updateLaunchConfiguration(wc, true);
+               wc.doSave();
+               Map<String, ?> attrs = new TreeMap<String, Object>(
+                               (Map<String, String>) wc.getAttributes());
+               OsgiLaunchHelper.debug("WC " + wc);
+               for (String key : attrs.keySet())
+                       OsgiLaunchHelper.debug(key + "=" + attrs.get(key));
+
+               super.preLaunchCheck(configuration, launch, monitor);
+
+               // Note that if a Java project contains a build.properties it has to
+               // declare the sources otherwise it will be skipped in the generation of
+               // the dev.properties file!
+
+               // for(Object bundleId:fAllBundles.keySet()){
+               // System.out.println(bundleId+"="+fAllBundles.get(bundleId));
+               // }
+       }
+
+}
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLaunchShortcut.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLaunchShortcut.java
new file mode 100644 (file)
index 0000000..aa7f861
--- /dev/null
@@ -0,0 +1,72 @@
+package org.argeo.slc.ide.ui.launch.osgi;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.pde.ui.launcher.EclipseLaunchShortcut;
+
+/**
+ * Launch shortcut simplifying the launch of an Eclipse application (typically
+ * an RCP).
+ */
+public class EclipseBootLaunchShortcut extends EclipseLaunchShortcut implements
+               OsgiLauncherConstants {
+       private StringBuffer name = null;
+       private IFile propertiesFile = null;
+
+       @Override
+       protected String getLaunchConfigurationTypeName() {
+               return EclipseBootLaunchConfiguration.ID;
+       }
+
+       @Override
+       public void launch(ISelection selection, String mode) {
+               // we assume that only one file is selected
+               IStructuredSelection sSelection = (IStructuredSelection) selection;
+               Iterator<?> it = sSelection.iterator();
+               propertiesFile = (IFile) it.next();
+
+               name = new StringBuffer(OsgiLaunchHelper.extractName(propertiesFile));
+
+               super.launch(selection, mode);
+       }
+
+       @Override
+       protected void initializeConfiguration(ILaunchConfigurationWorkingCopy wc) {
+               IResource[] resources = { propertiesFile };
+               wc.setMappedResources(resources);
+               super.initializeConfiguration(wc);
+
+               OsgiLaunchHelper.setDefaults(wc, true);
+               wc.setAttribute(
+                               IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
+                               OsgiLaunchHelper.findWorkingDirectory(propertiesFile));
+
+               OsgiLaunchHelper.updateLaunchConfiguration(wc, true);
+       }
+
+       protected String getName(ILaunchConfigurationType type) {
+               if (name != null && !name.toString().trim().equals(""))
+                       return DebugPlugin.getDefault().getLaunchManager()
+                                       .generateLaunchConfigurationName(name.toString());
+               else
+                       return DebugPlugin.getDefault().getLaunchManager()
+                                       .generateLaunchConfigurationName("SLC");
+       }
+
+       @Override
+       protected boolean isGoodMatch(ILaunchConfiguration configuration) {
+               if (name != null) {
+                       return name.toString().equals(configuration.getName());
+               }
+               return super.isGoodMatch(configuration);
+       }
+}
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLauncherTabGroup.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLauncherTabGroup.java
new file mode 100644 (file)
index 0000000..53794ed
--- /dev/null
@@ -0,0 +1,50 @@
+package org.argeo.slc.ide.ui.launch.osgi;
+
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.EnvironmentTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.pde.ui.launcher.EclipseLauncherTabGroup;
+import org.eclipse.pde.ui.launcher.MainTab;
+import org.eclipse.pde.ui.launcher.OSGiSettingsTab;
+import org.eclipse.pde.ui.launcher.PluginsTab;
+import org.eclipse.pde.ui.launcher.TracingTab;
+
+/** Definition of the set of tabs used in Eclipse Boot launch configuration UI. */
+public class EclipseBootLauncherTabGroup extends EclipseLauncherTabGroup {
+
+       @Override
+       public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+               ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
+                               new OsgiBootMainTab(true),
+                               new MainTab(),
+                               new PluginsTab(),
+                               // new PluginsTab() {
+                               // private boolean activating = false;
+                               //
+                               // @Override
+                               // public void performApply(
+                               // ILaunchConfigurationWorkingCopy config) {
+                               // super.performApply(config);
+                               // if (activating) {
+                               // try {
+                               // config.doSave();
+                               // } catch (CoreException e) {
+                               // e.printStackTrace();
+                               // }
+                               // activating = false;
+                               // }
+                               // }
+                               //
+                               // @Override
+                               // public void activated(
+                               // ILaunchConfigurationWorkingCopy workingCopy) {
+                               // activating = true;
+                               // }
+                               // },
+                               new OSGiSettingsTab(), new EnvironmentTab(), new TracingTab(),
+                               new CommonTab() };
+               setTabs(tabs);
+       }
+
+}
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootEquinoxLaunchConfiguration.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootEquinoxLaunchConfiguration.java
new file mode 100644 (file)
index 0000000..19cdee1
--- /dev/null
@@ -0,0 +1,55 @@
+package org.argeo.slc.ide.ui.launch.osgi;
+
+import org.argeo.slc.ide.ui.SlcIdeUiPlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.pde.launching.EquinoxLaunchConfiguration;
+
+/** OSGiBoot launch configuration. */
+public class OsgiBootEquinoxLaunchConfiguration extends
+               EquinoxLaunchConfiguration {
+       public final static String ID = SlcIdeUiPlugin.ID
+                       + ".OsgiBootEquinoxLauncher";
+
+       @Override
+       public void launch(ILaunchConfiguration configuration, String mode,
+                       ILaunch launch, IProgressMonitor monitor) throws CoreException {
+               super.launch(configuration, mode, launch, monitor);
+
+//             System.out.println("targetBundles="
+//                             + configuration.getAttribute(
+//                                             IPDELauncherConstants.TARGET_BUNDLES, ""));
+//             System.out.println("workspaceBundles="
+//                             + configuration.getAttribute(
+//                                             IPDELauncherConstants.WORKSPACE_BUNDLES, ""));
+
+               // Refresh resources before launching
+               final IFile propertiesFile = (IFile) configuration.getMappedResources()[0];
+               propertiesFile.getParent().refreshLocal(IResource.DEPTH_INFINITE,
+                               monitor);
+       }
+
+       @Override
+       protected void preLaunchCheck(ILaunchConfiguration configuration,
+                       ILaunch launch, IProgressMonitor monitor) throws CoreException {
+               // System.out.println("Launching... " + launch);
+               ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy();
+               OsgiLaunchHelper.updateLaunchConfiguration(wc, false);
+               wc.doSave();
+               super.preLaunchCheck(configuration, launch, monitor);
+
+               // Note that if a Java project contains a build.properties it has to
+               // declare the sources otherwise it will be skipped in the generation of
+               // the dev.properties file!
+
+               // for(Object bundleId:fAllBundles.keySet()){
+               // System.out.println(bundleId+"="+fAllBundles.get(bundleId));
+               // }
+       }
+
+}
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLaunchShortcut.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLaunchShortcut.java
new file mode 100644 (file)
index 0000000..b73b612
--- /dev/null
@@ -0,0 +1,71 @@
+package org.argeo.slc.ide.ui.launch.osgi;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.pde.ui.launcher.OSGiLaunchShortcut;
+
+/** Launch shortcut simplifying the launch of a pure OSGi runtime */
+public class OsgiBootLaunchShortcut extends OSGiLaunchShortcut implements
+               OsgiLauncherConstants {
+       private StringBuffer name = null;
+       private IFile propertiesFile = null;
+
+       @Override
+       protected String getLaunchConfigurationTypeName() {
+               return OsgiBootEquinoxLaunchConfiguration.ID;
+       }
+
+       @Override
+       public void launch(ISelection selection, String mode) {
+               // we assume that only one file is selected
+               IStructuredSelection sSelection = (IStructuredSelection) selection;
+               Iterator<?> it = sSelection.iterator();
+               propertiesFile = (IFile) it.next();
+
+               name = new StringBuffer(OsgiLaunchHelper.extractName(propertiesFile));
+
+               super.launch(selection, mode);
+       }
+
+       @Override
+       protected void initializeConfiguration(ILaunchConfigurationWorkingCopy wc) {
+               IResource[] resources = { propertiesFile };
+               wc.setMappedResources(resources);
+               super.initializeConfiguration(wc);
+
+               OsgiLaunchHelper.setDefaults(wc, true);
+
+               wc.setAttribute(
+                               IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
+                               OsgiLaunchHelper.findWorkingDirectory(propertiesFile));
+
+               OsgiLaunchHelper.updateLaunchConfiguration(wc, false);
+       }
+
+       protected String getName(ILaunchConfigurationType type) {
+               if (name != null && !name.toString().trim().equals(""))
+                       return DebugPlugin.getDefault().getLaunchManager()
+                                       .generateLaunchConfigurationName(name.toString());
+               else
+                       return DebugPlugin.getDefault().getLaunchManager()
+                                       .generateLaunchConfigurationName("SLC");
+       }
+
+       @Override
+       protected boolean isGoodMatch(ILaunchConfiguration configuration) {
+               if (name != null) {
+                       return name.toString().equals(configuration.getName());
+               }
+               return super.isGoodMatch(configuration);
+       }
+
+}
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLauncherTabGroup.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLauncherTabGroup.java
new file mode 100644 (file)
index 0000000..0195aa8
--- /dev/null
@@ -0,0 +1,48 @@
+package org.argeo.slc.ide.ui.launch.osgi;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.EnvironmentTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.pde.ui.launcher.BundlesTab;
+import org.eclipse.pde.ui.launcher.OSGiLauncherTabGroup;
+import org.eclipse.pde.ui.launcher.OSGiSettingsTab;
+import org.eclipse.pde.ui.launcher.TracingTab;
+
+/** Definition of the set of tabs used in OSGi Boot launch configuration UI. */
+public class OsgiBootLauncherTabGroup extends OSGiLauncherTabGroup {
+
+       @Override
+       public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+               ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
+                               new OsgiBootMainTab(false),
+                               new BundlesTab() {
+                                       private boolean activating = false;
+
+                                       @Override
+                                       public void performApply(
+                                                       ILaunchConfigurationWorkingCopy config) {
+                                               super.performApply(config);
+                                               if (activating) {
+                                                       try {
+                                                               config.doSave();
+                                                       } catch (CoreException e) {
+                                                               e.printStackTrace();
+                                                       }
+                                                       activating = false;
+                                               }
+                                       }
+
+                                       @Override
+                                       public void activated(
+                                                       ILaunchConfigurationWorkingCopy workingCopy) {
+                                               activating = true;
+                                       }
+                               }, new OSGiSettingsTab(), new EnvironmentTab(),
+                               new TracingTab(), new CommonTab() };
+               setTabs(tabs);
+       }
+
+}
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootMainTab.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootMainTab.java
new file mode 100644 (file)
index 0000000..5e5ae50
--- /dev/null
@@ -0,0 +1,268 @@
+package org.argeo.slc.ide.ui.launch.osgi;
+
+import org.argeo.slc.ide.ui.SlcIdeUiPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+/** Main tab of OSGiBoot launch configuration UI. */
+public class OsgiBootMainTab extends AbstractLaunchConfigurationTab implements
+               OsgiLauncherConstants {
+       private Listener listener = new Listener();
+
+       private Button syncBundles;
+       private Button clearDataDirectory;
+
+       private Button addJvmPaths;
+       private Text additionalVmArgs;
+
+       private Text additionalProgramArgs;
+
+       private final Boolean isEclipse;
+
+       public OsgiBootMainTab(Boolean isEclipse) {
+               super();
+               this.isEclipse = isEclipse;
+       }
+
+       public void createControl(Composite parent) {
+               Composite container = new Composite(parent, SWT.NONE);
+               container.setLayout(new GridLayout());
+               container.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+               createAdditionalProgramArgs(container);
+               createAdditionalVmArgumentBlock(container);
+               createAdvanced(container);
+               Dialog.applyDialogFont(container);
+               setControl(container);
+       }
+
+       /** Init UI for programs arguments */
+       protected void createAdditionalProgramArgs(Composite parent) {
+               Group container = new Group(parent, SWT.NONE);
+               container.setText("Additional Program Arguments");
+               GridLayout layout = new GridLayout();
+               layout.numColumns = 2;
+               container.setLayout(layout);
+               container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+               additionalProgramArgs = new Text(container, SWT.MULTI | SWT.WRAP
+                               | SWT.BORDER | SWT.V_SCROLL);
+               GridData gd = new GridData(GridData.FILL_BOTH);
+               gd.heightHint = 60;
+               gd.widthHint = 100;
+               gd.horizontalSpan = 2;
+               additionalProgramArgs.setLayoutData(gd);
+               additionalProgramArgs.addModifyListener(listener);
+       }
+
+       /** Init UI for VM arguments */
+       protected void createAdditionalVmArgumentBlock(Composite parent) {
+               Group container = new Group(parent, SWT.NONE);
+               container.setText("Additional VM Arguments");
+               GridLayout layout = new GridLayout();
+               layout.numColumns = 2;
+               container.setLayout(layout);
+               container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+               additionalVmArgs = new Text(container, SWT.MULTI | SWT.WRAP
+                               | SWT.BORDER | SWT.V_SCROLL);
+               GridData gd = new GridData(GridData.FILL_BOTH);
+               gd.heightHint = 60;
+               gd.widthHint = 100;
+               gd.horizontalSpan = 2;
+               additionalVmArgs.setLayoutData(gd);
+               additionalVmArgs.addModifyListener(listener);
+
+       }
+
+       /** Init UI for Advanced section */
+       protected void createAdvanced(Composite parent) {
+               Group container = new Group(parent, SWT.NONE);
+               container.setText("Advanced");
+               GridLayout layout = new GridLayout();
+               layout.numColumns = 2;
+               container.setLayout(layout);
+               container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+               syncBundles = new Button(container, SWT.CHECK);
+               syncBundles.addSelectionListener(listener);
+               new Label(container, SWT.NONE)
+                               .setText("Keep bundles in line with target platform and workspace (recommended)");
+               clearDataDirectory = new Button(container, SWT.CHECK);
+               clearDataDirectory.addSelectionListener(listener);
+               new Label(container, SWT.NONE)
+                               .setText("Clear data directory before launch");
+
+               addJvmPaths = new Button(container, SWT.CHECK);
+               addJvmPaths.addSelectionListener(listener);
+               new Label(container, SWT.NONE)
+                               .setText("Add workspace JVM paths as non-standard system properties");
+
+       }
+
+       public String getName() {
+               return "OSGi Boot";
+       }
+
+       @Override
+       public Image getImage() {
+               return SlcIdeUiPlugin.getDefault().getImage("icons/slc-launch.gif");
+       }
+
+       public void initializeFrom(ILaunchConfiguration configuration) {
+               // System.out.println("initializeFrom");
+               try {
+                       syncBundles.setSelection(configuration.getAttribute(
+                                       ATTR_SYNC_BUNDLES, true));
+                       clearDataDirectory.setSelection(configuration.getAttribute(
+                                       ATTR_CLEAR_DATA_DIRECTORY, false));
+
+                       additionalProgramArgs.setText(configuration.getAttribute(
+                                       ATTR_ADDITIONAL_PROGRAM_ARGS, ""));
+                       addJvmPaths.setSelection(configuration.getAttribute(
+                                       ATTR_ADD_JVM_PATHS, false));
+                       additionalVmArgs.setText(configuration.getAttribute(
+                                       ATTR_ADDITIONAL_VM_ARGS, ""));
+                       // readProperties(configuration);
+               } catch (CoreException e) {
+                       e.printStackTrace();
+               }
+       }
+
+       public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+               // System.out.println("performApply");
+               configuration.setAttribute(ATTR_SYNC_BUNDLES,
+                               syncBundles.getSelection());
+               configuration.setAttribute(ATTR_CLEAR_DATA_DIRECTORY,
+                               clearDataDirectory.getSelection());
+
+               configuration.setAttribute(ATTR_ADDITIONAL_PROGRAM_ARGS,
+                               additionalProgramArgs.getText());
+               configuration.setAttribute(ATTR_ADDITIONAL_VM_ARGS,
+                               additionalVmArgs.getText());
+               configuration.setAttribute(ATTR_ADD_JVM_PATHS,
+                               addJvmPaths.getSelection());
+               // writeProperties(configuration);
+
+               OsgiLaunchHelper.updateLaunchConfiguration(configuration, isEclipse);
+       }
+
+       public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+               // System.out.println("setDefaults");
+               configuration.setAttribute(ATTR_SYNC_BUNDLES, true);
+               configuration.setAttribute(ATTR_CLEAR_DATA_DIRECTORY, false);
+               configuration.setAttribute(ATTR_ADD_JVM_PATHS, false);
+               configuration.setAttribute(ATTR_ADDITIONAL_VM_ARGS, "-Xmx128m");
+               configuration.setAttribute(ATTR_ADDITIONAL_PROGRAM_ARGS, "-console");
+       }
+
+       @Override
+       public void activated(ILaunchConfigurationWorkingCopy workingCopy) {
+               initializeFrom(workingCopy);
+               try {
+                       workingCopy.doSave();
+               } catch (CoreException e) {
+                       e.printStackTrace();
+               }
+       }
+
+       @Override
+       public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) {
+               // do nothing
+       }
+
+       class Listener extends SelectionAdapter implements ModifyListener {
+               public void widgetSelected(SelectionEvent e) {
+                       // Object source = e.getSource();
+                       // setDirty(true);
+                       updateLaunchConfigurationDialog();
+               }
+
+               public void modifyText(ModifyEvent e) {
+                       // System.out.println("modifyText : " + e);
+                       // setDirty(true);
+                       updateLaunchConfigurationDialog();
+               }
+       }
+
+       // private void readProperties(ILaunchConfiguration configuration) {
+       // BufferedReader reader = null;
+       // try {
+       // IFile propertiesFile = (IFile) configuration.getMappedResources()[0];
+       // propertiesFile.refreshLocal(IResource.DEPTH_ONE, null);
+       // reader = new BufferedReader(new InputStreamReader(propertiesFile
+       // .getContents()));
+       // String line = null;
+       // StringBuffer buf = new StringBuffer("");
+       // while ((line = reader.readLine()) != null) {
+       // buf.append(line);
+       // buf.append("\n");
+       // }
+       // propertiesText.setText(buf.toString());
+       // } catch (CoreException e) {
+       // ErrorDialog.openError(Display.getCurrent().getActiveShell(),
+       // "Error", "Cannot read properties", e.getStatus());
+       // return;
+       // } catch (Exception e) {
+       // ErrorDialog.openError(Display.getCurrent().getActiveShell(),
+       // "Error", "Cannot read properties",
+       // new Status(IStatus.ERROR, SlcIdeUiPlugin.ID,
+       // e.getMessage(), e));
+       // return;
+       // } finally {
+       // if (reader != null)
+       // try {
+       // reader.close();
+       // } catch (IOException e) {
+       // // silent
+       // }
+       // }
+       //
+       // }
+       //
+       // private void writeProperties(ILaunchConfiguration configuration) {
+       // InputStream in = null;
+       // IFile propertiesFile = null;
+       // try {
+       // propertiesFile = (IFile) configuration.getMappedResources()[0];
+       // in = new ByteArrayInputStream(propertiesText.getText().getBytes());
+       // propertiesFile.setContents(in, true, true, null);
+       // propertiesFile.refreshLocal(IResource.DEPTH_ONE, null);
+       // } catch (CoreException e) {
+       // ErrorDialog.openError(Display.getCurrent().getActiveShell(),
+       // "Error", "Cannot write properties", e.getStatus());
+       // return;
+       // } catch (Exception e) {
+       // ErrorDialog.openError(Display.getCurrent().getActiveShell(),
+       // "Error", "Cannot write properties",
+       // new Status(IStatus.ERROR, SlcIdeUiPlugin.ID,
+       // e.getMessage(), e));
+       // return;
+       // } finally {
+       // if (in != null)
+       // try {
+       // in.close();
+       // } catch (IOException e) {
+       // // silent
+       // }
+       // }
+       //
+       // }
+
+}
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLaunchHelper.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLaunchHelper.java
new file mode 100644 (file)
index 0000000..54566b5
--- /dev/null
@@ -0,0 +1,550 @@
+package org.argeo.slc.ide.ui.launch.osgi;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.TreeSet;
+
+import org.argeo.slc.ide.ui.SlcIdeUiPlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.IVMInstall2;
+import org.eclipse.jdt.launching.IVMInstallType;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.build.IPDEBuildConstants;
+import org.eclipse.pde.launching.IPDELauncherConstants;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * Most of the actual logic is concentrated in this class which manipulates
+ * {@link ILaunchConfigurationWorkingCopy}. Static method are used since the
+ * shortcut and launch configuration classes are already extending PDE classes.
+ */
+@SuppressWarnings("restriction")
+public class OsgiLaunchHelper implements OsgiLauncherConstants {
+       private static Boolean debug = true;
+
+       private final static String DEFAULT_DATA_DIR = "data";
+       private final static String DEFAULT_EXEC_DIR = "exec";
+       private final static String DEFAULT_VMARGS = "-Xmx256m";
+       private final static String DEFAULT_PROGRAM_ARGS = "-console";
+
+       /** Sets default values on this configuration. */
+       public static void setDefaults(ILaunchConfigurationWorkingCopy wc,
+                       Boolean isEclipse) {
+               try {
+                       if (isEclipse) {
+                               wc.setAttribute(IPDELauncherConstants.USE_DEFAULT, false);
+                               wc.setAttribute(IPDELauncherConstants.USE_PRODUCT, false);
+                       }
+
+                       wc.setAttribute(ATTR_ADD_JVM_PATHS, false);
+                       wc.setAttribute(ATTR_ADDITIONAL_VM_ARGS, DEFAULT_VMARGS);
+                       wc.setAttribute(ATTR_ADDITIONAL_PROGRAM_ARGS, DEFAULT_PROGRAM_ARGS);
+
+                       // Defaults
+                       String originalVmArgs = wc.getAttribute(
+                                       IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, "");
+                       wc.setAttribute(ATTR_DEFAULT_VM_ARGS, originalVmArgs);
+                       wc.setAttribute(IPDELauncherConstants.CONFIG_CLEAR_AREA, true);
+               } catch (CoreException e) {
+                       Shell shell = Display.getCurrent().getActiveShell();
+                       ErrorDialog.openError(shell, "Error",
+                                       "Cannot execute initalize configuration", e.getStatus());
+               }
+       }
+
+       /** Find the working directory based on this properties file. */
+       public static String findWorkingDirectory(IFile propertiesFile) {
+               try {
+                       IProject project = propertiesFile.getProject();
+                       IPath parent = propertiesFile.getProjectRelativePath()
+                                       .removeLastSegments(1);
+                       IFolder execFolder = project.getFolder(parent
+                                       .append(DEFAULT_EXEC_DIR));
+                       if (!execFolder.exists())
+                               execFolder.create(true, true, null);
+                       IFolder launchFolder = project.getFolder(execFolder
+                                       .getProjectRelativePath().append(
+                                                       extractName(propertiesFile)));
+                       if (!launchFolder.exists())
+                               launchFolder.create(true, true, null);
+                       return "${workspace_loc:"
+                                       + launchFolder.getFullPath().toString().substring(1) + "}";
+               } catch (Exception e) {
+                       e.printStackTrace();
+                       throw new RuntimeException("Cannot create working directory", e);
+               }
+       }
+
+       /** Extract the launch configuration name from the properties file. */
+       public static String extractName(IFile propertiesFile) {
+               IPath path = propertiesFile.getFullPath();
+               IPath pathNoExt = path.removeFileExtension();
+               return pathNoExt.segment(pathNoExt.segmentCount() - 1);
+
+       }
+
+       /** Expects properties file to be set as mapped resources */
+       public static void updateLaunchConfiguration(
+                       ILaunchConfigurationWorkingCopy wc, Boolean isEclipse) {
+               try {
+                       // Finds the properties file and load it
+                       IFile propertiesFile = (IFile) wc.getMappedResources()[0];
+                       propertiesFile.refreshLocal(IResource.DEPTH_ONE, null);
+                       Properties properties = readProperties(propertiesFile);
+
+                       // Extract information from the properties file
+                       List<String> bundlesToStart = new ArrayList<String>();
+                       Map<String, String> systemPropertiesToAppend = new HashMap<String, String>();
+                       String applicationId = interpretProperties(properties,
+                                       bundlesToStart, systemPropertiesToAppend);
+
+                       if (applicationId != null)
+                               wc.setAttribute(IPDELauncherConstants.APPLICATION,
+                                               applicationId);
+                       else {
+                               if (isEclipse)
+                                       throw new Exception("No application defined,"
+                                                       + " please set the 'eclipse.application' property"
+                                                       + " in the properties file");
+                       }
+
+                       // Define directories
+                       File workingDir = getWorkingDirectory(wc);
+                       File dataDir = new File(workingDir, DEFAULT_DATA_DIR);
+
+                       // Update the launch configuration accordingly
+                       updateLaunchConfiguration(wc, bundlesToStart,
+                                       systemPropertiesToAppend, dataDir.getAbsolutePath(),
+                                       isEclipse);
+               } catch (Exception e) {
+                       e.printStackTrace();
+                       Shell shell = SlcIdeUiPlugin.getDefault().getWorkbench()
+                                       .getActiveWorkbenchWindow().getShell();
+                       // Shell shell= Display.getCurrent().getActiveShell();
+                       ErrorDialog.openError(shell, "Error",
+                                       "Cannot prepare launch configuration",
+                                       new Status(IStatus.ERROR, SlcIdeUiPlugin.ID,
+                                                       e.getMessage(), e));
+                       return;
+               }
+       }
+
+       /**
+        * Actually modifies the launch configuration in order to reflect the
+        * current state read from the properties file and the launch configuration
+        * UI.
+        */
+       protected static void updateLaunchConfiguration(
+                       ILaunchConfigurationWorkingCopy wc, List<String> bundlesToStart,
+                       Map<String, String> systemPropertiesToAppend, String dataDir,
+                       Boolean isEclipse) throws CoreException {
+               // Convert bundle lists
+               final String targetBundles;
+               final String wkSpaceBundles;
+               if (wc.getAttribute(ATTR_SYNC_BUNDLES, true)) {
+                       StringBuffer tBuf = new StringBuffer();
+                       for (IPluginModelBase model : PluginRegistry.getExternalModels()) {
+                               tBuf.append(model.getBundleDescription().getSymbolicName());
+                               tBuf.append(',');
+                       }
+                       targetBundles = tBuf.toString();
+                       StringBuffer wBuf = new StringBuffer();
+                       models: for (IPluginModelBase model : PluginRegistry
+                                       .getWorkspaceModels()) {
+                               if (model.getBundleDescription() == null) {
+                                       System.err.println("No bundle description for " + model);
+                                       continue models;
+                               }
+                               wBuf.append(model.getBundleDescription().getSymbolicName());
+                               wBuf.append(',');
+                       }
+                       wkSpaceBundles = wBuf.toString();
+               } else {
+                       targetBundles = wc.getAttribute(targetBundlesAttr(isEclipse), "");
+                       wkSpaceBundles = wc.getAttribute(workspaceBundlesAttr(isEclipse),
+                                       "");
+               }
+               wc.setAttribute(targetBundlesAttr(isEclipse),
+                               convertBundleList(bundlesToStart, targetBundles));
+
+               wc.setAttribute(workspaceBundlesAttr(isEclipse),
+                               convertBundleList(bundlesToStart, wkSpaceBundles));
+
+               // Update other default information
+               wc.setAttribute(IPDELauncherConstants.DEFAULT_AUTO_START, false);
+
+               // VM arguments (system properties)
+               String defaultVmArgs = wc.getAttribute(
+                               OsgiLauncherConstants.ATTR_DEFAULT_VM_ARGS, "");
+               StringBuffer vmArgs = new StringBuffer(defaultVmArgs);
+
+               // Data dir system property
+               if (dataDir != null) {
+                       addSysProperty(vmArgs, OsgiLauncherConstants.ARGEO_OSGI_DATA_DIR,
+                                       dataDir);
+                       if (isEclipse) {
+                               wc.setAttribute(IPDELauncherConstants.LOCATION, dataDir);
+                       }
+               }
+
+               // Add locations of JVMs
+               if (wc.getAttribute(ATTR_ADD_JVM_PATHS, false))
+                       addVms(vmArgs);
+
+               // Add other system properties
+               for (String key : systemPropertiesToAppend.keySet())
+                       addSysProperty(vmArgs, key, systemPropertiesToAppend.get(key));
+
+               vmArgs.append(" ").append(wc.getAttribute(ATTR_ADDITIONAL_VM_ARGS, ""));
+
+               wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
+                               vmArgs.toString());
+
+               // Program arguments
+               StringBuffer progArgs = new StringBuffer("");
+               if (dataDir != null) {
+                       progArgs.append("-data ");
+                       progArgs.append(surroundSpaces(dataDir));
+
+                       if (wc.getAttribute(ATTR_CLEAR_DATA_DIRECTORY, false)) {
+                               File dataDirFile = new File(dataDir);
+                               deleteDir(dataDirFile);
+                               dataDirFile.mkdirs();
+                       }
+               }
+               String additionalProgramArgs = wc.getAttribute(
+                               OsgiLauncherConstants.ATTR_ADDITIONAL_PROGRAM_ARGS, "");
+               progArgs.append(' ').append(additionalProgramArgs);
+               wc.setAttribute(
+                               IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
+                               progArgs.toString());
+       }
+
+       /** The launch configuration attribute to use for target bundles */
+       protected static String targetBundlesAttr(Boolean isEclipse) {
+               return isEclipse ? IPDELauncherConstants.SELECTED_TARGET_PLUGINS
+                               : IPDELauncherConstants.TARGET_BUNDLES;
+       }
+
+       /** The launch configuration attribute to use for workspace bundles */
+       protected static String workspaceBundlesAttr(Boolean isEclipse) {
+               return isEclipse ? IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS
+                               : IPDELauncherConstants.WORKSPACE_BUNDLES;
+       }
+
+       /**
+        * Interprets special properties and register the others as system
+        * properties to append.
+        * 
+        * @return the application id defined by
+        *         {@link OsgiLauncherConstants#ECLIPSE_APPLICATION}, or null if not
+        *         found
+        */
+       protected static String interpretProperties(Properties properties,
+                       List<String> bundlesToStart,
+                       Map<String, String> systemPropertiesToAppend) {
+               String argeoOsgiStart = properties
+                               .getProperty(OsgiLauncherConstants.ARGEO_OSGI_START);
+               if (argeoOsgiStart != null) {
+                       StringTokenizer st = new StringTokenizer(argeoOsgiStart, ",");
+                       while (st.hasMoreTokens())
+                               bundlesToStart.add(st.nextToken());
+               }
+
+               String applicationId = null;
+               propKeys: for (Object keyObj : properties.keySet()) {
+                       String key = keyObj.toString();
+                       if (OsgiLauncherConstants.ARGEO_OSGI_START.equals(key))
+                               continue propKeys;
+                       else if (OsgiLauncherConstants.ARGEO_OSGI_BUNDLES.equals(key))
+                               continue propKeys;
+                       else if (OsgiLauncherConstants.ARGEO_OSGI_LOCATIONS.equals(key))
+                               continue propKeys;
+                       else if (OsgiLauncherConstants.OSGI_BUNDLES.equals(key))
+                               continue propKeys;
+                       else if (OsgiLauncherConstants.ECLIPSE_APPLICATION.equals(key))
+                               applicationId = properties.getProperty(key);
+                       else
+                               systemPropertiesToAppend.put(key, properties.getProperty(key));
+               }
+               return applicationId;
+       }
+
+       /** Adds a regular system property. */
+       protected static void addSysProperty(StringBuffer vmArgs, String key,
+                       String value) {
+               surroundSpaces(value);
+               String str = "-D" + key + "=" + value;
+               vmArgs.append(' ').append(str);
+       }
+
+       /** Adds JVMS registered in the workspace as special system properties. */
+       protected static void addVms(StringBuffer vmArgs) {
+               addVmSysProperty(vmArgs, "default", JavaRuntime.getDefaultVMInstall());
+               IVMInstallType[] vmTypes = JavaRuntime.getVMInstallTypes();
+               for (IVMInstallType vmType : vmTypes) {
+                       for (IVMInstall vmInstall : vmType.getVMInstalls()) {
+                               // printVm("", vmInstall);
+                               // properties based on name
+                               addVmSysProperty(vmArgs, vmInstall.getName(), vmInstall);
+                               if (vmInstall instanceof IVMInstall2) {
+                                       // properties based on version
+                                       IVMInstall2 vmInstall2 = (IVMInstall2) vmInstall;
+                                       String version = vmInstall2.getJavaVersion();
+                                       addVmSysProperty(vmArgs, version, vmInstall);
+
+                                       List<String> tokens = new ArrayList<String>();
+                                       StringTokenizer st = new StringTokenizer(version, ".");
+                                       while (st.hasMoreTokens())
+                                               tokens.add(st.nextToken());
+                                       if (tokens.size() >= 2)
+                                               addVmSysProperty(vmArgs,
+                                                               tokens.get(0) + "." + tokens.get(1), vmInstall);
+                               }
+                       }
+               }
+
+       }
+
+       /** Adds a special system property pointing to one of the registered JVMs. */
+       protected static void addVmSysProperty(StringBuffer vmArgs, String suffix,
+                       IVMInstall vmInstall) {
+               addSysProperty(vmArgs, OsgiLauncherConstants.VMS_PROPERTY_PREFIX + "."
+                               + suffix, vmInstall.getInstallLocation().getPath());
+       }
+
+       /** Surround the string with quotes if it contains spaces. */
+       protected static String surroundSpaces(String str) {
+               if (str.indexOf(' ') >= 0)
+                       return '\"' + str + '\"';
+               else
+                       return str;
+       }
+
+       /**
+        * Reformat the bundle list in order to reflect which bundles have to be
+        * started.
+        */
+       protected static String convertBundleList(List<String> bundlesToStart,
+                       String original) {
+               debug("Original bundle list: " + original);
+
+               StringTokenizer stComa = new StringTokenizer(original, ",");
+               // sort by bundle symbolic name
+               Set<String> bundleIds = new TreeSet<String>();
+               bundles: while (stComa.hasMoreTokens()) {
+
+                       String bundleId = stComa.nextToken();
+                       if (bundleId.indexOf('*') >= 0)
+                               throw new RuntimeException(
+                                               "Bundle id "
+                                                               + bundleId
+                                                               + " not properly formatted, clean your workspace projects");
+
+                       int indexAt = bundleId.indexOf('@');
+                       if (indexAt >= 0) {
+                               bundleId = bundleId.substring(0, indexAt);
+                       }
+
+                       // We can now rely on bundleId value
+
+                       if (bundleId.endsWith(".source")) {
+                               debug("Skip source bundle " + bundleId);
+                               continue bundles;
+                       } else if (bundleId
+                                       .equals(IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR)) {
+                               // skip simple configurator in order to avoid side-effects
+                               continue bundles;
+                       }
+                       bundleIds.add(bundleId);
+               }
+
+               StringBuffer bufBundles = new StringBuffer(1024);
+               boolean first = true;
+               for (String bundleId : bundleIds) {
+                       if (first)
+                               first = false;
+                       else
+                               bufBundles.append(',');
+                       boolean modified = false;
+                       if (bundlesToStart.contains(bundleId)) {
+                               bufBundles.append(bundleId).append('@').append("default:true");
+                               modified = true;
+                               debug("Will start " + bundleId);
+                       }
+
+                       if (!modified)
+                               bufBundles.append(bundleId);
+
+               }
+               String output = bufBundles.toString();
+               return output;
+       }
+
+       // UTILITIES
+       /** Recursively deletes a directory tree. */
+       private static void deleteDir(File dir) {
+               File[] files = dir.listFiles();
+               for (File file : files) {
+                       if (file.isDirectory())
+                               deleteDir(file);
+                       else
+                               file.delete();
+               }
+               dir.delete();
+       }
+
+       /** Loads a properties file. */
+       private static Properties readProperties(IFile file) throws CoreException {
+               Properties props = new Properties();
+
+               InputStream in = null;
+               try {
+                       in = file.getContents();
+                       props.load(in);
+               } catch (Exception e) {
+                       throw new CoreException(new Status(IStatus.ERROR,
+                                       SlcIdeUiPlugin.ID, "Cannot read properties file", e));
+               } finally {
+                       if (in != null)
+                               try {
+                                       in.close();
+                               } catch (IOException e) {
+                                       // silent
+                               }
+               }
+               return props;
+       }
+
+       // Hacked from
+       // org.eclipse.pde.internal.ui.launcher.LaunchArgumentsHelper.getWorkingDirectory(ILaunchConfiguration)
+       private static File getWorkingDirectory(ILaunchConfiguration configuration)
+                       throws CoreException {
+               String working;
+               try {
+                       working = configuration.getAttribute(
+                                       IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
+                                       new File(".").getCanonicalPath()); //$NON-NLS-1$
+               } catch (IOException e) {
+                       working = "${workspace_loc}/../"; //$NON-NLS-1$
+               }
+               File dir;
+               try {
+                       dir = new File(getSubstitutedString(working));
+               } catch (Exception e) {
+                       // the directory was most probably deleted
+                       IFile propertiesFile = (IFile) configuration.getMappedResources()[0];
+                       working = findWorkingDirectory(propertiesFile);
+                       dir = new File(getSubstitutedString(working));
+               }
+               if (!dir.exists())
+                       dir.mkdirs();
+               return dir;
+       }
+
+       // Hacked from
+       // org.eclipse.pde.internal.ui.launcher.LaunchArgumentsHelper.getSubstitutedString(String)
+       private static String getSubstitutedString(String text)
+                       throws CoreException {
+               if (text == null)
+                       return ""; //$NON-NLS-1$
+               IStringVariableManager mgr = VariablesPlugin.getDefault()
+                               .getStringVariableManager();
+               return mgr.performStringSubstitution(text);
+       }
+
+       /**
+        * Not used anymore, but kept because this routine may be useful in the
+        * future.
+        */
+       protected void addSelectedProjects(StringBuffer name, ISelection selection,
+                       List<String> bundlesToStart) {
+               Assert.isNotNull(selection);
+
+               Map<String, IPluginModelBase> bundleProjects = new HashMap<String, IPluginModelBase>();
+               for (IPluginModelBase modelBase : PluginRegistry.getWorkspaceModels()) {
+                       IProject bundleProject = modelBase.getUnderlyingResource()
+                                       .getProject();
+                       bundleProjects.put(bundleProject.getName(), modelBase);
+               }
+
+               IStructuredSelection sSelection = (IStructuredSelection) selection;
+               for (Iterator<?> it = sSelection.iterator(); it.hasNext();) {
+                       Object obj = it.next();
+                       if (obj instanceof IProject) {
+                               IProject project = (IProject) obj;
+                               if (bundleProjects.containsKey(project.getName())) {
+                                       IPluginModelBase modelBase = bundleProjects.get(project
+                                                       .getName());
+
+                                       BundleDescription bundleDescription = null;
+                                       if (modelBase.isFragmentModel()) {
+                                               BundleDescription[] hosts = modelBase
+                                                               .getBundleDescription().getHost().getHosts();
+                                               for (BundleDescription bd : hosts) {
+                                                       if (debug)
+                                                               System.out.println("Host for "
+                                                                               + modelBase.getBundleDescription()
+                                                                                               .getSymbolicName() + ": "
+                                                                               + bd.getSymbolicName());
+                                                       bundleDescription = bd;
+                                               }
+                                       } else {
+                                               bundleDescription = modelBase.getBundleDescription();
+                                       }
+
+                                       if (bundleDescription != null) {
+                                               String symbolicName = bundleDescription
+                                                               .getSymbolicName();
+                                               String bundleName = bundleDescription.getName();
+
+                                               bundlesToStart.add(symbolicName);
+
+                                               if (name.length() > 0)
+                                                       name.append(" ");
+                                               if (bundleName != null)
+                                                       name.append(bundleName);
+                                               else
+                                                       name.append(symbolicName);
+                                       }
+                               }
+                       }
+               }
+       }
+
+       static void debug(Object obj) {
+               if (debug)
+                       System.out.println(obj);
+       }
+
+}
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLauncherConstants.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLauncherConstants.java
new file mode 100644 (file)
index 0000000..8ada527
--- /dev/null
@@ -0,0 +1,32 @@
+package org.argeo.slc.ide.ui.launch.osgi;
+
+import org.argeo.slc.ide.ui.SlcIdeUiPlugin;
+
+/** Constants used by OSGi launch. */
+public interface OsgiLauncherConstants {
+
+       public final static String OSGI_BUNDLES = "osgi.bundles";
+       public final static String ECLIPSE_APPLICATION = "eclipse.application";
+
+       public final static String ARGEO_OSGI_START = "argeo.osgi.start";
+       public final static String ARGEO_OSGI_BUNDLES = "argeo.osgi.bundles";
+       public final static String ARGEO_OSGI_LOCATIONS = "argeo.osgi.locations";
+       public final static String ARGEO_OSGI_DATA_DIR = "argeo.osgi.data.dir";
+       public final static String VMS_PROPERTY_PREFIX = "slc.launch.vm";
+
+       // Configuration
+       public final static String ATTR_SYNC_BUNDLES = SlcIdeUiPlugin.ID
+                       + ".syncBundles";
+       public final static String ATTR_CLEAR_DATA_DIRECTORY = SlcIdeUiPlugin.ID
+                       + ".clearDataDirectory";
+
+       public final static String ATTR_DEFAULT_VM_ARGS = SlcIdeUiPlugin.ID
+                       + ".defaultVmArgs";
+       public final static String ATTR_ADDITIONAL_PROGRAM_ARGS = SlcIdeUiPlugin.ID
+                       + ".additionalProgramArgs";
+       public final static String ATTR_ADDITIONAL_VM_ARGS = SlcIdeUiPlugin.ID
+                       + ".additionalVmArgs";
+       public final static String ATTR_ADD_JVM_PATHS = SlcIdeUiPlugin.ID
+                       + ".addJvmPaths";
+       public final static String ATTR_DATADIR = SlcIdeUiPlugin.ID + ".dataDir";
+}
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/preferences/SlcLaunchPreferencePage.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/preferences/SlcLaunchPreferencePage.java
new file mode 100644 (file)
index 0000000..24c6757
--- /dev/null
@@ -0,0 +1,34 @@
+package org.argeo.slc.ide.ui.launch.preferences;\r
+\r
+import org.argeo.slc.ide.ui.SlcIdeUiPlugin;\r
+import org.eclipse.jface.preference.DirectoryFieldEditor;\r
+import org.eclipse.jface.preference.FieldEditorPreferencePage;\r
+import org.eclipse.ui.IWorkbench;\r
+import org.eclipse.ui.IWorkbenchPreferencePage;\r
+\r
+public class SlcLaunchPreferencePage extends FieldEditorPreferencePage implements\r
+               IWorkbenchPreferencePage {\r
+       public final static String PREF_SLC_RUNTIME_LOCATION = SlcIdeUiPlugin.ID\r
+                       + ".slcRuntimeLocation";\r
+       public final static String PREF_EMBEDDED_JAVA_LIBRARY_PATH = SlcIdeUiPlugin.ID\r
+                       + ".embeddedJavaLibraryPath";\r
+\r
+       public SlcLaunchPreferencePage() {\r
+//             IPreferenceStore store = SlcUiLaunchPlugin.getDefault()\r
+//                             .getPreferenceStore();\r
+//             setPreferenceStore(store);\r
+               setDescription("Argeo SLC Launch Preferences");\r
+       }\r
+\r
+       @Override\r
+       protected void createFieldEditors() {\r
+               addField(new DirectoryFieldEditor(PREF_SLC_RUNTIME_LOCATION,\r
+                               "SLC Runtime", getFieldEditorParent()));\r
+               addField(new DirectoryFieldEditor(PREF_EMBEDDED_JAVA_LIBRARY_PATH,\r
+                               "Embedded Java Library Path", getFieldEditorParent()));\r
+       }\r
+\r
+       public void init(IWorkbench workbench) {\r
+       }\r
+\r
+}\r
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchConfigurationTab.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchConfigurationTab.java
new file mode 100644 (file)
index 0000000..f73a8ca
--- /dev/null
@@ -0,0 +1,191 @@
+package org.argeo.slc.ide.ui.launch.script;\r
+\r
+import org.eclipse.core.resources.IResource;\r
+import org.eclipse.core.resources.ResourcesPlugin;\r
+import org.eclipse.core.runtime.CoreException;\r
+import org.eclipse.debug.core.ILaunchConfiguration;\r
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;\r
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;\r
+import org.eclipse.jface.window.Window;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.ModifyEvent;\r
+import org.eclipse.swt.events.ModifyListener;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.Text;\r
+import org.eclipse.ui.dialogs.ResourceSelectionDialog;\r
+\r
+public class SlcScriptLaunchConfigurationTab extends\r
+               AbstractLaunchConfigurationTab {\r
+\r
+       private Text scriptTF;\r
+       private Text propertiesTF;\r
+       private Text runtimeTF;\r
+       private Text targetsTF;\r
+       private Button pre093B;\r
+\r
+       public void createControl(Composite parent) {\r
+               Composite body = new Composite(parent, SWT.NONE);\r
+               setControl(body);\r
+               body.setLayout(new GridLayout(1, false));\r
+               body.setFont(parent.getFont());\r
+\r
+               createLabel(body, "Script location");\r
+               scriptTF = createSingleText(body);\r
+               createWorkspaceButton(body);\r
+\r
+               createLabel(body, "Runtime");\r
+               runtimeTF = createSingleText(body);\r
+\r
+               createLabel(body, "Targets");\r
+               targetsTF = createSingleText(body);\r
+\r
+               createLabel(body, "Properties");\r
+               propertiesTF = createMultipleText(body, 10);\r
+\r
+               pre093B = createCheckBox(body, "Pre SLC v0.9.3");\r
+       }\r
+\r
+       public String getName() {\r
+               return "SLC";\r
+       }\r
+\r
+       public void initializeFrom(ILaunchConfiguration configuration) {\r
+               try {\r
+                       scriptTF.setText(configuration.getAttribute(\r
+                                       SlcScriptUtils.ATTR_SCRIPT, ""));\r
+\r
+                       boolean pre093 = configuration.getAttribute(\r
+                                       SlcScriptUtils.ATTR_PRE093, false);\r
+\r
+                       propertiesTF.setText(configuration.getAttribute(\r
+                                       SlcScriptUtils.ATTR_PROPERTIES, ""));\r
+                       runtimeTF.setText(configuration.getAttribute(\r
+                                       SlcScriptUtils.ATTR_RUNTIME, ""));\r
+                       targetsTF.setText(configuration.getAttribute(\r
+                                       SlcScriptUtils.ATTR_TARGETS, ""));\r
+                       pre093B.setSelection(pre093);\r
+               } catch (CoreException e) {\r
+                       throw new RuntimeException("Cannot initialize tab", e);\r
+               }\r
+\r
+       }\r
+\r
+       public void performApply(ILaunchConfigurationWorkingCopy configuration) {\r
+               configuration.setAttribute(SlcScriptUtils.ATTR_SCRIPT, scriptTF\r
+                               .getText());\r
+               configuration.setAttribute(SlcScriptUtils.ATTR_PROPERTIES, propertiesTF\r
+                               .getText());\r
+               configuration.setAttribute(SlcScriptUtils.ATTR_RUNTIME, runtimeTF\r
+                               .getText());\r
+               configuration.setAttribute(SlcScriptUtils.ATTR_TARGETS, targetsTF\r
+                               .getText());\r
+               configuration.setAttribute(SlcScriptUtils.ATTR_PRE093, pre093B\r
+                               .getSelection());\r
+       }\r
+\r
+       public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {\r
+               configuration.setAttribute(SlcScriptUtils.ATTR_SCRIPT, "");\r
+               configuration.setAttribute(SlcScriptUtils.ATTR_PROPERTIES, "");\r
+               configuration.setAttribute(SlcScriptUtils.ATTR_RUNTIME, "");\r
+               configuration.setAttribute(SlcScriptUtils.ATTR_TARGETS, "");\r
+               configuration.setAttribute(SlcScriptUtils.ATTR_PRE093, false);\r
+       }\r
+\r
+       // UI Utils\r
+       protected Label createLabel(Composite parent, String text) {\r
+               Label t = new Label(parent, SWT.NONE | SWT.WRAP);\r
+               t.setText(text);\r
+               t.setFont(parent.getFont());\r
+               GridData gd = new GridData(GridData.FILL_HORIZONTAL);\r
+               gd.horizontalSpan = 1;\r
+               t.setLayoutData(gd);\r
+               return t;\r
+       }\r
+\r
+       protected Text createSingleText(Composite parent) {\r
+               Text t = new Text(parent, SWT.SINGLE | SWT.BORDER);\r
+               t.setFont(parent.getFont());\r
+               GridData gd = new GridData(GridData.FILL_HORIZONTAL);\r
+               gd.horizontalSpan = 1;\r
+               t.setLayoutData(gd);\r
+               t.addModifyListener(modifyListener);\r
+               return t;\r
+       }\r
+\r
+       protected Text createMultipleText(Composite parent, int verticalSpan) {\r
+               Text t = new Text(parent, SWT.MULTI | SWT.BORDER);\r
+               t.setFont(parent.getFont());\r
+               GridData gd = new GridData(GridData.FILL, GridData.FILL, true, true);\r
+               gd.horizontalSpan = 1;\r
+               gd.verticalSpan = verticalSpan;\r
+               t.setLayoutData(gd);\r
+               t.addModifyListener(modifyListener);\r
+               return t;\r
+       }\r
+\r
+       protected Button createCheckBox(Composite parent, String label) {\r
+               Button b = new Button(parent, SWT.CHECK);\r
+               b.setFont(parent.getFont());\r
+               b.setText(label);\r
+               b.addSelectionListener(selectionListener);\r
+               return b;\r
+\r
+       }\r
+\r
+       protected Button createWorkspaceButton(Composite parent) {\r
+               Button b = new Button(parent, SWT.PUSH);\r
+               b.setFont(parent.getFont());\r
+               b.setText("Workspace...");\r
+               b.addSelectionListener(new SelectionListener() {\r
+                       public void widgetDefaultSelected(SelectionEvent e) {\r
+                       }\r
+\r
+                       public void widgetSelected(SelectionEvent e) {\r
+                               handleWorkspaceLocationButtonSelected();\r
+                       }\r
+               });\r
+               return b;\r
+       }\r
+\r
+       protected void handleWorkspaceLocationButtonSelected() {\r
+               ResourceSelectionDialog dialog;\r
+               dialog = new ResourceSelectionDialog(getShell(), ResourcesPlugin\r
+                               .getWorkspace().getRoot(), "Select a file");\r
+               if (dialog.open() == Window.OK) {\r
+                       Object[] results = dialog.getResult();\r
+                       if (results == null || results.length < 1) {\r
+                               return;\r
+                       }\r
+                       IResource resource = (IResource) results[0];\r
+                       scriptTF.setText(SlcScriptUtils\r
+                                       .convertToWorkspaceLocation(resource));\r
+                       updateLaunchConfigurationDialog();\r
+               }\r
+       }\r
+\r
+       // LISTENERS\r
+       /**\r
+        * Modify listener that simply updates the owning launch configuration\r
+        * dialog.\r
+        */\r
+       private ModifyListener modifyListener = new ModifyListener() {\r
+               public void modifyText(ModifyEvent evt) {\r
+                       updateLaunchConfigurationDialog();\r
+               }\r
+       };\r
+       private SelectionListener selectionListener = new SelectionListener() {\r
+               public void widgetDefaultSelected(SelectionEvent e) {\r
+               }\r
+\r
+               public void widgetSelected(SelectionEvent e) {\r
+                       updateLaunchConfigurationDialog();\r
+               }\r
+       };\r
+\r
+}\r
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchConfigurationTabGroup.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchConfigurationTabGroup.java
new file mode 100644 (file)
index 0000000..e7d54a3
--- /dev/null
@@ -0,0 +1,16 @@
+package org.argeo.slc.ide.ui.launch.script;\r
+\r
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;\r
+import org.eclipse.debug.ui.CommonTab;\r
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;\r
+import org.eclipse.debug.ui.ILaunchConfigurationTab;\r
+\r
+public class SlcScriptLaunchConfigurationTabGroup extends\r
+               AbstractLaunchConfigurationTabGroup {\r
+\r
+       public void createTabs(ILaunchConfigurationDialog dialog, String mode) {\r
+               ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {\r
+                               new SlcScriptLaunchConfigurationTab(), new CommonTab() };\r
+               setTabs(tabs);\r
+       }\r
+}\r
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchDelegate.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchDelegate.java
new file mode 100644 (file)
index 0000000..75d8ce7
--- /dev/null
@@ -0,0 +1,258 @@
+package org.argeo.slc.ide.ui.launch.script;\r
+\r
+import java.io.ByteArrayInputStream;\r
+import java.io.IOException;\r
+import java.util.List;\r
+import java.util.Properties;\r
+import java.util.Vector;\r
+\r
+import org.argeo.slc.ide.ui.DeployedSlcSystem;\r
+import org.argeo.slc.ide.ui.EmbeddedSlcSystem;\r
+import org.argeo.slc.ide.ui.SlcSystem;\r
+import org.argeo.slc.ide.ui.SlcIdeUiPlugin;\r
+import org.argeo.slc.ide.ui.launch.preferences.SlcLaunchPreferencePage;\r
+import org.eclipse.core.resources.IFile;\r
+import org.eclipse.core.resources.IProject;\r
+import org.eclipse.core.resources.ResourcesPlugin;\r
+import org.eclipse.core.runtime.CoreException;\r
+import org.eclipse.core.runtime.IPath;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.core.runtime.Path;\r
+import org.eclipse.core.runtime.Status;\r
+import org.eclipse.core.variables.IStringVariableManager;\r
+import org.eclipse.core.variables.VariablesPlugin;\r
+import org.eclipse.debug.core.DebugPlugin;\r
+import org.eclipse.debug.core.ILaunch;\r
+import org.eclipse.debug.core.ILaunchConfiguration;\r
+import org.eclipse.debug.core.ILaunchManager;\r
+import org.eclipse.jdt.core.IJavaProject;\r
+import org.eclipse.jdt.core.IType;\r
+import org.eclipse.jdt.core.JavaCore;\r
+import org.eclipse.jdt.core.JavaModelException;\r
+import org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate;\r
+import org.eclipse.jdt.launching.IVMRunner;\r
+import org.eclipse.jdt.launching.VMRunnerConfiguration;\r
+import org.eclipse.jface.dialogs.ErrorDialog;\r
+import org.eclipse.swt.widgets.Shell;\r
+\r
+public class SlcScriptLaunchDelegate extends\r
+               AbstractJavaLaunchConfigurationDelegate {\r
+       public static final String ID = "org.argeo.slc.launch.slcScriptLaunchType";\r
+\r
+       public final static String ANT_MAIN = "org.apache.tools.ant.Main";\r
+       public final static String SLC_MAIN = "org.argeo.slc.cli.SlcMain";\r
+\r
+       @SuppressWarnings("deprecation")\r
+       public void launch(ILaunchConfiguration configuration, String mode,\r
+                       ILaunch launch, IProgressMonitor monitor) throws CoreException {\r
+               if (!saveBeforeLaunch(configuration, mode, monitor))\r
+                       return;\r
+\r
+               String scriptLocation = configuration.getAttribute(\r
+                               SlcScriptUtils.ATTR_SCRIPT, "");\r
+               if (scriptLocation.equals(""))\r
+                       abort("Script has to be provided", null, 1);\r
+\r
+               IStringVariableManager manager = VariablesPlugin.getDefault()\r
+                               .getStringVariableManager();\r
+               scriptLocation = manager.performStringSubstitution(scriptLocation);\r
+               IPath path = new Path(scriptLocation);\r
+               IFile[] files = ResourcesPlugin.getWorkspace().getRoot()\r
+                               .findFilesForLocation(path);\r
+\r
+               if (files.length == 0)\r
+                       abort("Coulkd not find related file", null, 1);\r
+\r
+               IFile file = (IFile) files[0];\r
+               DebugPlugin\r
+                               .logMessage("Launching " + file.getLocation().toFile(), null);\r
+\r
+               boolean pre093 = configuration.getAttribute(SlcScriptUtils.ATTR_PRE093,\r
+                               false);\r
+\r
+               // Retrieve SLC Runtime\r
+               SlcSystem slcSystem = findSlcSystem(file, pre093);\r
+               if (slcSystem == null)\r
+                       return;\r
+\r
+               IVMRunner vmRunner = slcSystem.getVmInstall().getVMRunner(mode);\r
+               final VMRunnerConfiguration vmConfig;\r
+               if (pre093) {\r
+                       vmConfig = createPre093Config(slcSystem, file, mode);\r
+               } else {\r
+                       vmConfig = createConfig(slcSystem, file, mode, configuration);\r
+               }\r
+               vmRunner.run(vmConfig, launch, monitor);\r
+       }\r
+\r
+       protected SlcSystem findSlcSystem(IFile file, boolean pre093)\r
+                       throws CoreException {\r
+               SlcSystem slcSystem = null;\r
+\r
+               IProject project = file.getProject();\r
+               if (project.getNature("org.eclipse.jdt.core.javanature") != null) {\r
+                       IJavaProject javaProject = JavaCore.create(project);\r
+                       if (checkProjectForEmbedded(javaProject, pre093)) {\r
+                               slcSystem = new EmbeddedSlcSystem(javaProject);\r
+                       }\r
+               }\r
+\r
+               if (slcSystem == null) {\r
+                       String slcRuntimePath = SlcIdeUiPlugin.getDefault()\r
+                                       .getPreferenceStore().getString(\r
+                                                       SlcLaunchPreferencePage.PREF_SLC_RUNTIME_LOCATION);\r
+                       if (slcRuntimePath == null || slcRuntimePath.equals("")) {\r
+                               showError("SLC Runtime path is not set. Set it in Windows > Preferences > SLC");\r
+                               return null;\r
+                       }\r
+\r
+                       slcSystem = new DeployedSlcSystem(slcRuntimePath);\r
+               }\r
+\r
+               return slcSystem;\r
+       }\r
+\r
+       protected boolean checkProjectForEmbedded(IJavaProject project,\r
+                       boolean pre093) {\r
+               try {\r
+                       IType mainType = null;\r
+                       if (pre093)\r
+                               mainType = project.findType(ANT_MAIN);\r
+                       else\r
+                               mainType = project.findType(SLC_MAIN);\r
+\r
+                       if (mainType == null)\r
+                               return false;\r
+                       else\r
+                               return true;\r
+               } catch (JavaModelException e) {\r
+                       e.printStackTrace();\r
+                       return false;\r
+               }\r
+       }\r
+\r
+       // Regular SLC\r
+       protected VMRunnerConfiguration createConfig(SlcSystem deployedSlc,\r
+                       IFile file, String mode, ILaunchConfiguration configuration)\r
+                       throws CoreException {\r
+               VMRunnerConfiguration vmConfig = new VMRunnerConfiguration(SLC_MAIN,\r
+                               deployedSlc.getClasspath());\r
+               vmConfig.setVMArguments(getVmArguments(deployedSlc));\r
+               vmConfig.setWorkingDirectory(file.getLocation().toFile().getParent());\r
+               vmConfig.setProgramArguments(getProgramArguments(deployedSlc, file,\r
+                               mode, configuration));\r
+               return vmConfig;\r
+       }\r
+\r
+       protected String[] getVmArguments(SlcSystem deployedSlc) {\r
+               List<String> list = new Vector<String>();\r
+               if (deployedSlc.getJavaLibraryPath() != null)\r
+                       list.add("-Djava.library.path=" + deployedSlc.getJavaLibraryPath());\r
+               return list.toArray(new String[list.size()]);\r
+       }\r
+\r
+       protected String[] getProgramArguments(SlcSystem deployedSlc, IFile file,\r
+                       String mode, ILaunchConfiguration configuration)\r
+                       throws CoreException {\r
+               List<String> list = new Vector<String>();\r
+\r
+               list.add("--mode");\r
+               list.add("single");\r
+\r
+               // Script\r
+               list.add("--script");\r
+               list.add(file.getLocation().toFile().getAbsolutePath());\r
+\r
+               // Runtime\r
+               String runtime = configuration.getAttribute(\r
+                               SlcScriptUtils.ATTR_RUNTIME, "");\r
+               if (!runtime.equals("")) {\r
+                       list.add("--runtime");\r
+                       list.add(runtime);\r
+               }\r
+\r
+               // Targets\r
+               String targets = configuration.getAttribute(\r
+                               SlcScriptUtils.ATTR_TARGETS, "");\r
+               if (!targets.equals("")) {\r
+                       list.add("--targets");\r
+                       list.add(targets);\r
+               }\r
+\r
+               // Properties\r
+               Properties properties = new Properties();\r
+               String str = configuration.getAttribute(SlcScriptUtils.ATTR_PROPERTIES,\r
+                               "");\r
+               ByteArrayInputStream in = new ByteArrayInputStream(str.getBytes());\r
+               try {\r
+                       properties.load(in);\r
+               } catch (IOException e) {\r
+                       throw new RuntimeException("Cannot read properties", e);\r
+               } finally {\r
+                       if (in != null)\r
+                               try {\r
+                                       in.close();\r
+                               } catch (IOException e) {\r
+                                       // silent\r
+                               }\r
+               }\r
+\r
+               for (Object key : properties.keySet()) {\r
+                       list.add("-p");\r
+                       StringBuffer buf = new StringBuffer("");\r
+                       buf.append(key).append('=').append(properties.get(key));\r
+                       list.add(buf.toString());\r
+               }\r
+\r
+               // Debug mode\r
+               if (mode.equals(ILaunchManager.DEBUG_MODE)) {\r
+                       list.add("--property");\r
+                       list.add("log4j.logger.org.argeo.slc=DEBUG");\r
+               }\r
+               return list.toArray(new String[list.size()]);\r
+       }\r
+\r
+       // Pre SLC v0.9.3\r
+       protected VMRunnerConfiguration createPre093Config(SlcSystem deployedSlc,\r
+                       IFile file, String mode) throws CoreException {\r
+               VMRunnerConfiguration vmConfig = new VMRunnerConfiguration(ANT_MAIN,\r
+                               deployedSlc.getClasspath());\r
+               vmConfig.setVMArguments(getPre093VmArguments(deployedSlc));\r
+               vmConfig.setWorkingDirectory(file.getLocation().toFile().getParent());\r
+               vmConfig.setProgramArguments(getPre093ProgramArguments(deployedSlc,\r
+                               file, mode));\r
+               return vmConfig;\r
+       }\r
+\r
+       protected String[] getPre093VmArguments(SlcSystem deployedSlc) {\r
+               List<String> list = new Vector<String>();\r
+               // list.add("-Dant.home=" + deployedSlc.getAntHome());\r
+               if (deployedSlc.getJavaLibraryPath() != null)\r
+                       list.add("-Djava.library.path=" + deployedSlc.getJavaLibraryPath());\r
+               return list.toArray(new String[list.size()]);\r
+       }\r
+\r
+       protected String[] getPre093ProgramArguments(SlcSystem deployedSlc,\r
+                       IFile file, String mode) {\r
+               List<String> list = new Vector<String>();\r
+               list.add("-f");\r
+               list.add(file.getLocation().toFile().getAbsolutePath());\r
+               if (mode.equals(ILaunchManager.DEBUG_MODE)) {\r
+                       list.add("-d");\r
+               }\r
+               return list.toArray(new String[list.size()]);\r
+       }\r
+\r
+       // Utilities\r
+       private static void showError(String message) {\r
+               Shell shell = SlcIdeUiPlugin.getDefault().getWorkbench()\r
+                               .getActiveWorkbenchWindow().getShell();\r
+\r
+               IStatus status = new Status(IStatus.ERROR, SlcIdeUiPlugin.ID,\r
+                               message);\r
+               ErrorDialog.openError(shell, "Error", "Cannot launch SLC script",\r
+                               status);\r
+       }\r
+\r
+}\r
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchShortcut.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchShortcut.java
new file mode 100644 (file)
index 0000000..dfb0044
--- /dev/null
@@ -0,0 +1,127 @@
+package org.argeo.slc.ide.ui.launch.script;\r
+\r
+import org.argeo.slc.ide.ui.SlcIdeUiPlugin;\r
+import org.eclipse.core.resources.IFile;\r
+import org.eclipse.core.runtime.CoreException;\r
+import org.eclipse.core.runtime.IPath;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.core.runtime.Status;\r
+import org.eclipse.debug.core.DebugPlugin;\r
+import org.eclipse.debug.core.ILaunchConfiguration;\r
+import org.eclipse.debug.core.ILaunchConfigurationType;\r
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;\r
+import org.eclipse.debug.core.ILaunchManager;\r
+import org.eclipse.debug.ui.DebugUITools;\r
+import org.eclipse.debug.ui.IDebugUIConstants;\r
+import org.eclipse.debug.ui.ILaunchShortcut;\r
+import org.eclipse.jface.dialogs.ErrorDialog;\r
+import org.eclipse.jface.viewers.ISelection;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.swt.widgets.Shell;\r
+import org.eclipse.ui.IEditorPart;\r
+\r
+public class SlcScriptLaunchShortcut implements ILaunchShortcut {\r
+       private boolean showDialog = false;\r
+\r
+       public void launch(ISelection selection, String mode) {\r
+               try {\r
+                       if (!(selection instanceof IStructuredSelection)) {\r
+                               throw new RuntimeException("Unknown selection "\r
+                                               + selection.getClass());\r
+                       }\r
+                       IStructuredSelection sSelection = (IStructuredSelection) selection;\r
+                       if (sSelection.size() != 1) {\r
+                               throw new RuntimeException("Can only launch one SLC script.");\r
+                       }\r
+                       Object obj = sSelection.iterator().next();\r
+                       if (!(obj instanceof IFile)) {\r
+                               throw new RuntimeException("Can only launch files.");\r
+                       }\r
+                       IFile file = ((IFile) obj);\r
+\r
+                       ILaunchManager manager = DebugPlugin.getDefault()\r
+                                       .getLaunchManager();\r
+                       ILaunchConfigurationType type = manager\r
+                                       .getLaunchConfigurationType(SlcScriptLaunchDelegate.ID);\r
+\r
+                       // Find or create config\r
+                       String configLocation = SlcScriptUtils\r
+                                       .convertToWorkspaceLocation(file);\r
+                       ILaunchConfiguration config = findLaunchConfiguration(\r
+                                       configLocation, manager.getLaunchConfigurations(type));\r
+                       if (config == null) {\r
+                               ILaunchConfigurationWorkingCopy wc = type.newInstance(null,\r
+                                               generateName(file));\r
+                               wc.setAttribute(SlcScriptUtils.ATTR_SCRIPT, configLocation);\r
+                               wc.setMappedResources(new IFile[] { file });\r
+                               config = wc.doSave();\r
+                       }\r
+\r
+                       // Launch\r
+                       launch(config, mode);\r
+               } catch (CoreException e) {\r
+                       Shell shell = SlcIdeUiPlugin.getDefault().getWorkbench()\r
+                                       .getActiveWorkbenchWindow().getShell();\r
+                       ErrorDialog.openError(shell, "Error",\r
+                                       "Cannot execute SLC launch shortcut", e.getStatus());\r
+               }\r
+\r
+       }\r
+\r
+       protected String generateName(IFile file) {\r
+               IPath relativePath = file.getProjectRelativePath();\r
+               String name = relativePath.toString();\r
+               int idx = name.lastIndexOf(".xml");\r
+               if (idx > 0)\r
+                       name = name.substring(0, idx);\r
+\r
+               if (name.startsWith("src/main/slc/root/"))\r
+                       name = name.substring("src/main/slc/root/".length());\r
+               else if (name.startsWith("src/main/slc/"))\r
+                       name = name.substring("src/main/slc/".length());\r
+\r
+               name = name.replace('/', '.');// otherwise not properly saved\r
+               return name;\r
+       }\r
+\r
+       protected ILaunchConfiguration findLaunchConfiguration(\r
+                       String configLocation, ILaunchConfiguration[] configs)\r
+                       throws CoreException {\r
+               for (ILaunchConfiguration config : configs) {\r
+                       String loc = config.getAttribute(SlcScriptUtils.ATTR_SCRIPT, "");\r
+                       if (loc.equals(configLocation)) {\r
+                               return config;\r
+                       }\r
+               }\r
+               return null;\r
+       }\r
+\r
+       protected void launch(ILaunchConfiguration configuration, String mode)\r
+                       throws CoreException {\r
+               if (showDialog) {\r
+                       IStatus status = new Status(IStatus.INFO, SlcIdeUiPlugin.ID,\r
+                                       "Configure SLC Launch");\r
+                       String groupId;\r
+                       if (mode.equals(ILaunchManager.DEBUG_MODE)) {\r
+                               groupId = IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP;\r
+                       } else {\r
+                               groupId = IDebugUIConstants.ID_RUN_LAUNCH_GROUP;\r
+                       }\r
+                       DebugUITools.openLaunchConfigurationDialog(SlcIdeUiPlugin\r
+                                       .getDefault().getWorkbench().getActiveWorkbenchWindow()\r
+                                       .getShell(), configuration, groupId, status);\r
+               } else {\r
+                       DebugUITools.launch(configuration, mode);\r
+               }\r
+\r
+       }\r
+\r
+       public void launch(IEditorPart editor, String mode) {\r
+               // not (yet) implemented\r
+       }\r
+\r
+       public void setShowDialog(boolean showDialog) {\r
+               this.showDialog = showDialog;\r
+       }\r
+\r
+}\r
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchShortcutWithDialog.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptLaunchShortcutWithDialog.java
new file mode 100644 (file)
index 0000000..9e8dd3e
--- /dev/null
@@ -0,0 +1,11 @@
+package org.argeo.slc.ide.ui.launch.script;\r
+\r
+\r
+public class SlcScriptLaunchShortcutWithDialog extends SlcScriptLaunchShortcut {\r
+\r
+       public SlcScriptLaunchShortcutWithDialog() {\r
+               super();\r
+               setShowDialog(true);\r
+       }\r
+\r
+}\r
diff --git a/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptUtils.java b/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/script/SlcScriptUtils.java
new file mode 100644 (file)
index 0000000..9a5bc42
--- /dev/null
@@ -0,0 +1,23 @@
+package org.argeo.slc.ide.ui.launch.script;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.variables.VariablesPlugin;
+
+public class SlcScriptUtils {
+
+       public final static String ATTR_SCRIPT = "script";
+       public final static String ATTR_PROPERTIES = "properties";
+       public final static String ATTR_RUNTIME = "runtime";
+       public final static String ATTR_TARGETS = "targets";
+       public final static String ATTR_PRE093 = "pre093";
+
+       public static String convertToWorkspaceLocation(IResource resource) {
+               return VariablesPlugin.getDefault().getStringVariableManager()
+                               .generateVariableExpression("workspace_loc",
+                                               resource.getFullPath().toString());
+       }
+
+       private SlcScriptUtils() {
+
+       }
+}
diff --git a/plugins/pom.xml b/plugins/pom.xml
new file mode 100644 (file)
index 0000000..e214637
--- /dev/null
@@ -0,0 +1,43 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.slc</groupId>
+               <artifactId>argeo-slc</artifactId>
+               <version>1.1.3-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>plugins</artifactId>
+       <name>SLC Eclipse Plugins</name>
+       <packaging>pom</packaging>
+       <modules>
+               <module>org.argeo.slc.client.ui</module>
+               <module>org.argeo.slc.client.ui.dist</module>
+               <module>org.argeo.slc.client.rcp</module>
+               <module>org.argeo.slc.client.rap</module>
+       </modules>
+       <build>
+               <resources>
+                       <resource>
+                               <directory>.</directory>
+                               <includes>
+                                       <include>plugin.xml</include>
+                                       <include>META-INF/**</include>
+                                       <include>icons/**</include>
+                               </includes>
+                       </resource>
+               </resources>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-source-plugin</artifactId>
+                               <configuration>
+                                       <!-- Prevents source jars to contain misleading data -->
+                                       <excludes>
+                                               <exclude>plugin.xml</exclude>
+                                               <exclude>META-INF/MANIFEST.MF</exclude>
+                                       </excludes>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+</project>
diff --git a/pom.xml b/pom.xml
index a390fcf966874af87c2d2a42717419fcfc56b872..2d4f1902432713c174b632149a415ca7f6457501 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
        <modules>
                <module>runtime</module>
                <module>modules</module>
-               <module>eclipse</module>
+               <module>plugins</module>
                <module>demo</module>
                <module>dep</module>
                <!-- <module>integration-tests</module> -->
diff --git a/runtime/org.argeo.slc.server/.classpath b/runtime/org.argeo.slc.server/.classpath
deleted file mode 100644 (file)
index 1747515..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
-       <classpathentry kind="src" output="target/classes" path="src/main/java"/>\r
-       <classpathentry kind="src" output="target/classes" path="src/main/resources"/>\r
-       <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>\r
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
-       <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
diff --git a/runtime/org.argeo.slc.server/.project b/runtime/org.argeo.slc.server/.project
deleted file mode 100644 (file)
index 278b92d..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.slc.server</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/runtime/org.argeo.slc.server/.settings/org.eclipse.jdt.core.prefs b/runtime/org.argeo.slc.server/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index e71a107..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#Fri Aug 29 11:25:17 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/runtime/org.argeo.slc.server/.settings/org.eclipse.ltk.core.refactoring.prefs b/runtime/org.argeo.slc.server/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644 (file)
index 4b61c77..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Jul 12 16:05:07 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/runtime/org.argeo.slc.server/.settings/org.springframework.ide.eclipse.core.prefs b/runtime/org.argeo.slc.server/.settings/org.springframework.ide.eclipse.core.prefs
deleted file mode 100644 (file)
index b93b9bd..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#Sun Jan 11 18:26:20 CET 2009
-eclipse.preferences.version=1
-org.springframework.ide.eclipse.core.builders.enable.beanmetadatabuilder=false
-org.springframework.ide.eclipse.core.enable.project.preferences=false
-org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.core.springvalidator=false
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanAlias-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanClass-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanConstructorArgument-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinition-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinitionHolder-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanFactory-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanInitDestroyMethod-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanReference-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.methodOverride-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.parsingProblems-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.requiredProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=false
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.core.springClasspath-org.springframework.ide.eclipse.core.springvalidator=false
diff --git a/runtime/org.argeo.slc.server/.springBeans b/runtime/org.argeo.slc.server/.springBeans
deleted file mode 100644 (file)
index c11d814..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beansProjectDescription>
-       <version>1</version>
-       <pluginVersion><![CDATA[2.2.1.v200811281800]]></pluginVersion>
-       <configSuffixes>
-               <configSuffix><![CDATA[xml]]></configSuffix>
-       </configSuffixes>
-       <enableImports><![CDATA[true]]></enableImports>
-       <configs>
-       </configs>
-       <configSets>
-       </configSets>
-</beansProjectDescription>
diff --git a/runtime/org.argeo.slc.server/pom.xml b/runtime/org.argeo.slc.server/pom.xml
deleted file mode 100644 (file)
index f43d284..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.slc</groupId>
-               <artifactId>runtime</artifactId>
-               <version>1.1.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <groupId>org.argeo.slc.runtime</groupId>
-       <artifactId>org.argeo.slc.server</artifactId>
-       <name>SLC Server</name>
-       <description>SLC Server</description>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-                               <configuration>
-                                       <instructions>
-                                               <Export-Package>
-                                                       org.argeo.slc.*,org.argeo.slc.server,org.argeo.slc.server.spring
-                                               </Export-Package>
-                                               <Import-Package>org.w3c.dom;version="0.0.0",
-                                                       javax.xml.*;version="0.0.0",
-                                                       org.argeo.slc.activemq;resolution:=optional,
-                                                       org.argeo.slc.execution,
-                                                       org.springframework.context.support,
-                                                       org.tmatesoft.svn.*;resolution:=optional,
-                                                       com.lowagie.*;resolution:=optional,
-                                                       com.springsource.json.*;resolution:=optional,
-                                                       org.springframework.oxm.*;resolution:=optional,
-                                                       *
-                                               </Import-Package>
-                                       </instructions>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
-       <dependencies>
-               <!-- Commons -->
-               <dependency>
-                       <groupId>org.argeo.commons.security</groupId>
-                       <artifactId>org.argeo.security.core</artifactId>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
-
-               <!-- SLC -->
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.core</artifactId>
-                       <version>1.1.3-SNAPSHOT</version>
-               </dependency>
-
-               <!-- Spring -->
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.springframework.web</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.springframework.web.servlet</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.springframework.aop</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.springframework.oxm</artifactId>
-                       <optional>true</optional>
-               </dependency>
-
-               <!-- Web -->
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.apache.commons.fileupload</artifactId>
-               </dependency>
-
-               <!-- J2EE -->
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>javax.servlet</artifactId>
-               </dependency>
-
-               <!-- AOP -->
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.aspectj.weaver</artifactId>
-               </dependency>
-
-               <!-- Docs -->
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>jxl</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>com.lowagie.text</artifactId>
-               </dependency>
-
-               <!-- Security -->
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>com.springsource.json</artifactId>
-                       <optional>true</optional>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.antlr</artifactId>
-                       <optional>true</optional>
-               </dependency>
-
-               <!-- SVN -->
-               <dependency>
-                       <groupId>org.argeo.tp</groupId>
-                       <artifactId>org.tmatesoft.svn</artifactId>
-                       <optional>true</optional>
-               </dependency>
-
-               <!-- Commons VFS <dependency> <groupId>org.apache.commons</groupId> <artifactId>com.springsource.org.apache.commons.vfs</artifactId> 
-                       </dependency> -->
-       </dependencies>
-</project>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/AgentService.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/AgentService.java
deleted file mode 100644 (file)
index 0c74e8e..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.services;
-
-import org.argeo.slc.runtime.SlcAgentDescriptor;
-
-public interface AgentService {
-       public void register(SlcAgentDescriptor slcAgentDescriptor);
-
-       public void unregister(SlcAgentDescriptor slcAgentDescriptor);
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/EventPublisherAspect.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/EventPublisherAspect.java
deleted file mode 100644 (file)
index a2fb8b4..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.services;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.msg.MsgConstants;
-import org.argeo.slc.msg.event.SlcEvent;
-import org.argeo.slc.msg.event.SlcEventPublisher;
-import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
-import org.argeo.slc.process.SlcExecution;
-import org.argeo.slc.runtime.SlcAgentDescriptor;
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.annotation.After;
-import org.aspectj.lang.annotation.Aspect;
-
-@Aspect
-public class EventPublisherAspect {
-       public final static String EVT_AGENT_REGISTERED = "agentRegistered";
-       public final static String EVT_AGENT_UNREGISTERED = "agentUnregistered";
-       public final static String EVT_NEW_SLC_EXECUTION = "newSlcExecution";
-       public final static String EVT_UPDATE_SLC_EXECUTION_STATUS = "updateSlcExecutionStatus";
-
-       private final static Log log = LogFactory
-                       .getLog(EventPublisherAspect.class);
-
-       private List<SlcEventPublisher> eventPublishers;
-
-       @After("execution(void org.argeo.slc.services.AgentService.register(..))")
-       public void registerAgent(JoinPoint jp) throws Throwable {
-               SlcAgentDescriptor agentDescriptor = (SlcAgentDescriptor) jp.getArgs()[0];
-               SlcEvent event = new SlcEvent(EVT_AGENT_REGISTERED);
-               event.getHeaders().put(MsgConstants.PROPERTY_SLC_AGENT_ID,
-                               agentDescriptor.getUuid());
-               publishEvent(event);
-       }
-
-       @After("execution(void org.argeo.slc.services.AgentService.unregister(..))")
-       public void unregisterAgent(JoinPoint jp) throws Throwable {
-               SlcAgentDescriptor agentDescriptor = (SlcAgentDescriptor) jp.getArgs()[0];
-               SlcEvent event = new SlcEvent(EVT_AGENT_UNREGISTERED);
-               event.getHeaders().put(MsgConstants.PROPERTY_SLC_AGENT_ID,
-                               agentDescriptor.getUuid());
-               publishEvent(event);
-       }
-
-       @After("execution(void org.argeo.slc.services.SlcExecutionService.newExecution(..))")
-       public void newSlcExecution(JoinPoint jp) throws Throwable {
-               SlcExecution slcExecution = (SlcExecution) jp.getArgs()[0];
-               SlcEvent event = new SlcEvent(EVT_NEW_SLC_EXECUTION);
-               event.getHeaders().put(MsgConstants.PROPERTY_SLC_EXECUTION_ID,
-                               slcExecution.getUuid());
-               publishEvent(event);
-       }
-
-       @After("execution(void org.argeo.slc.services.SlcExecutionService.updateStatus(..))")
-       public void updateSlcExecutionStatus(JoinPoint jp) throws Throwable {
-               SlcExecutionStatusRequest msg = (SlcExecutionStatusRequest) jp
-                               .getArgs()[0];
-               SlcEvent event = new SlcEvent(EVT_UPDATE_SLC_EXECUTION_STATUS);
-               event.getHeaders().put(MsgConstants.PROPERTY_SLC_EXECUTION_ID,
-                               msg.getSlcExecutionUuid());
-               event.getHeaders().put(MsgConstants.PROPERTY_SLC_EXECUTION_STATUS,
-                               msg.getNewStatus());
-               publishEvent(event);
-       }
-
-       public void setEventPublishers(List<SlcEventPublisher> eventPublishers) {
-               this.eventPublishers = eventPublishers;
-       }
-
-       protected void publishEvent(SlcEvent event) {
-
-               for (Iterator<SlcEventPublisher> it = eventPublishers.iterator(); it
-                               .hasNext();) {
-                       SlcEventPublisher eventPublisher = it.next();
-                       if (log.isTraceEnabled())
-                               log.debug("Publish event: "
-                                               + event.getHeaders().get(SlcEvent.EVENT_TYPE) + " to "
-                                               + eventPublisher);
-                       eventPublisher.publish(event);
-               }
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/ServiceMsgHandler.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/ServiceMsgHandler.java
deleted file mode 100644 (file)
index 405741e..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.services;
-
-import org.argeo.slc.SlcException;
-import org.argeo.slc.msg.MsgHandler;
-import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
-import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
-import org.argeo.slc.msg.test.tree.AddTreeTestResultAttachmentRequest;
-import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;
-import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;
-import org.argeo.slc.msg.test.tree.ResultPartRequest;
-import org.argeo.slc.process.SlcExecution;
-
-public class ServiceMsgHandler implements MsgHandler {
-       private TestManagerService testManagerService;
-       private SlcExecutionService slcExecutionService;
-
-       public Object handleMsg(Object msg) {
-               if (msg instanceof SlcExecution)
-                       slcExecutionService.newExecution((SlcExecution) msg);
-               else if (msg instanceof SlcExecutionStepsRequest)
-                       slcExecutionService.addSteps((SlcExecutionStepsRequest) msg);
-               else if (msg instanceof SlcExecutionStatusRequest)
-                       slcExecutionService.updateStatus((SlcExecutionStatusRequest) msg);
-               else if (msg instanceof CreateTreeTestResultRequest)
-                       testManagerService
-                                       .createTreeTestResult((CreateTreeTestResultRequest) msg);
-               else if (msg instanceof ResultPartRequest)
-                       testManagerService.addResultPart((ResultPartRequest) msg);
-               else if (msg instanceof CloseTreeTestResultRequest)
-                       testManagerService
-                                       .closeTreeTestResult((CloseTreeTestResultRequest) msg);
-               else if (msg instanceof AddTreeTestResultAttachmentRequest)
-                       testManagerService
-                                       .addAttachment((AddTreeTestResultAttachmentRequest) msg);
-               else
-                       throw new SlcException("Unrecognized message type " + msg);
-               return null;
-       }
-
-       public void setTestManagerService(TestManagerService testManagerService) {
-               this.testManagerService = testManagerService;
-       }
-
-       public void setSlcExecutionService(SlcExecutionService slcExecutionService) {
-               this.slcExecutionService = slcExecutionService;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/SlcExecutionService.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/SlcExecutionService.java
deleted file mode 100644 (file)
index 79663b2..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.services;
-
-import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
-import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
-import org.argeo.slc.process.SlcExecution;
-
-public interface SlcExecutionService {
-       public void newExecution(SlcExecution slcExecutionMsg);
-
-       public void updateStatus(SlcExecutionStatusRequest msg);
-
-       public void addSteps(SlcExecutionStepsRequest msg);
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/TestManagerService.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/TestManagerService.java
deleted file mode 100644 (file)
index 306994c..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.services;\r
-\r
-import org.argeo.slc.msg.test.tree.AddTreeTestResultAttachmentRequest;\r
-import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;\r
-import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;\r
-import org.argeo.slc.msg.test.tree.ResultPartRequest;\r
-import org.argeo.slc.test.TestRunDescriptor;\r
-\r
-/** Performs complex business operations. */\r
-public interface TestManagerService {\r
-       /** Performs operations related to the addition of a new test run. */\r
-       public void registerTestRunDescriptor(TestRunDescriptor testRunDescriptor);\r
-\r
-       /** Adds a result in a collection based on their ids. */\r
-       public void addResultToCollection(String collectionId, String resultUuid);\r
-\r
-       /** Removes a result from a collection based on their ids. */\r
-       public void removeResultFromCollection(String collectionId,\r
-                       String resultUuid);\r
-\r
-       public void createTreeTestResult(CreateTreeTestResultRequest msg);\r
-\r
-       public void addResultPart(ResultPartRequest msg);\r
-\r
-       public void addAttachment(AddTreeTestResultAttachmentRequest msg);\r
-\r
-       public void closeTreeTestResult(CloseTreeTestResultRequest msg);\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/AgentServiceImpl.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/AgentServiceImpl.java
deleted file mode 100644 (file)
index 7f525c2..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.services.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Executor;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.dao.runtime.SlcAgentDescriptorDao;
-import org.argeo.slc.runtime.SlcAgent;
-import org.argeo.slc.runtime.SlcAgentDescriptor;
-import org.argeo.slc.runtime.SlcAgentFactory;
-import org.argeo.slc.services.AgentService;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.InitializingBean;
-
-public class AgentServiceImpl implements AgentService, InitializingBean,
-               DisposableBean {
-       private final static Log log = LogFactory.getLog(AgentServiceImpl.class);
-
-       private final SlcAgentDescriptorDao slcAgentDescriptorDao;
-       private final SlcAgentFactory agentFactory;
-
-       private Executor systemExecutor;
-
-       private Long pingCycle = 20000l;
-
-       private Boolean pingThreadActive = true;
-
-       public AgentServiceImpl(SlcAgentDescriptorDao slcAgentDescriptorDao,
-                       SlcAgentFactory agentFactory) {
-               this.slcAgentDescriptorDao = slcAgentDescriptorDao;
-               this.agentFactory = agentFactory;
-       }
-
-       public void register(SlcAgentDescriptor slcAgentDescriptor) {
-               if (slcAgentDescriptorDao.getAgentDescriptor(slcAgentDescriptor
-                               .getUuid()) == null)
-                       slcAgentDescriptorDao.create(slcAgentDescriptor);
-               log.info("Registered agent #" + slcAgentDescriptor.getUuid());
-       }
-
-       public void unregister(SlcAgentDescriptor slcAgentDescriptor) {
-               slcAgentDescriptorDao.delete(slcAgentDescriptor);
-               log.info("Unregistered agent #" + slcAgentDescriptor.getUuid());
-       }
-
-       public void afterPropertiesSet() throws Exception {
-               // if (pingCycle > 0)
-               // new PingThread().start();
-               if (pingCycle > 0) {
-                       Thread authenticatedThread = new Thread("SLC Agents Ping") {
-                               public void run() {
-                                       systemExecutor.execute(new AgentsPing());
-                               }
-                       };
-                       authenticatedThread.start();
-
-               }
-       }
-
-       public synchronized void destroy() throws Exception {
-               pingThreadActive = false;
-               notifyAll();
-       }
-
-       public void setPingCycle(Long pingCycle) {
-               this.pingCycle = pingCycle;
-       }
-
-       public void setSystemExecutor(Executor securityService) {
-               this.systemExecutor = securityService;
-       }
-
-       protected class AgentsPing implements Runnable {
-               public void run() {
-
-                       // FIXME: temporary hack so that the ping starts after the server
-                       // has been properly started.
-                       try {
-                               Thread.sleep(10 * 1000);
-                       } catch (InterruptedException e1) {
-                               // silent
-                       }
-
-                       log.info("Start pinging agents.");
-                       while (pingThreadActive) {
-                               List<SlcAgentDescriptor> lst = slcAgentDescriptorDao
-                                               .listSlcAgentDescriptors();
-                               List<String> agentIds = new ArrayList<String>();
-                               for (SlcAgentDescriptor ad : lst)
-                                       agentIds.add(ad.getUuid());
-
-                               if (log.isTraceEnabled())
-                                       log.trace("Ping " + agentIds.size() + " agent(s).");
-                               for (String agentId : agentIds) {
-                                       SlcAgent agent = agentFactory.getAgent(agentId);
-                                       if (!agent.ping()) {
-                                               log.info("Agent " + agentId + " did not reply to ping,"
-                                                               + " removing its descriptor...");
-                                               slcAgentDescriptorDao.delete(agentId);
-                                       }
-                               }
-
-                               lst = slcAgentDescriptorDao.listSlcAgentDescriptors();
-                               agentIds = new ArrayList<String>();
-                               for (SlcAgentDescriptor ad : lst)
-                                       agentIds.add(ad.getUuid());
-                               agentFactory.pingAll(agentIds);
-
-                               synchronized (AgentServiceImpl.this) {
-                                       try {
-                                               AgentServiceImpl.this.wait(pingCycle);
-                                       } catch (InterruptedException e) {
-                                               // silent
-                                       }
-                               }
-                       }
-                       log.info("Stopped pinging agents.");
-               }
-
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceAdapter.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceAdapter.java
deleted file mode 100644 (file)
index 0b68375..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.services.impl;
-
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.execution.ExecutionProcess;
-import org.argeo.slc.execution.ExecutionStep;
-import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
-import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
-import org.argeo.slc.process.SlcExecutionNotifier;
-import org.argeo.slc.process.SlcExecutionStep;
-import org.argeo.slc.services.SlcExecutionService;
-
-/** In memory bridge between SLC execution notifier and service. */
-@SuppressWarnings("deprecation")
-public class SlcExecutionServiceAdapter implements SlcExecutionNotifier {
-       private final static Log log = LogFactory
-                       .getLog(SlcExecutionServiceAdapter.class);
-
-       private SlcExecutionService slcExecutionService;
-
-       public void updateStatus(ExecutionProcess slcExecution, String oldStatus,
-                       String newStatus) {
-               SlcExecutionStatusRequest req = new SlcExecutionStatusRequest(
-                               slcExecution.getUuid(), newStatus);
-               try {
-                       slcExecutionService.updateStatus(req);
-               } catch (Exception e) {
-                       log.trace("Cannot update process status " + e);
-               }
-       }
-
-       public void addSteps(ExecutionProcess slcExecution,
-                       List<ExecutionStep> additionalSteps) {
-               SlcExecutionStepsRequest req = new SlcExecutionStepsRequest(
-                               slcExecution.getUuid(), additionalSteps);
-               try {
-                       slcExecutionService.addSteps(req);
-               } catch (Exception e) {
-                       log.trace("Cannot add steps " + e);
-               }
-       }
-
-       public void setSlcExecutionService(SlcExecutionService slcExecutionService) {
-               this.slcExecutionService = slcExecutionService;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceImpl.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceImpl.java
deleted file mode 100644 (file)
index d8f3562..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.services.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.dao.process.SlcExecutionDao;
-import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
-import org.argeo.slc.msg.process.SlcExecutionStepsRequest;
-import org.argeo.slc.process.SlcExecution;
-import org.argeo.slc.process.SlcExecutionStep;
-import org.argeo.slc.services.SlcExecutionService;
-
-public class SlcExecutionServiceImpl implements SlcExecutionService {
-       private final Log log = LogFactory.getLog(getClass());
-
-       private final SlcExecutionDao slcExecutionDao;
-
-       public SlcExecutionServiceImpl(SlcExecutionDao slcExecutionDao) {
-               this.slcExecutionDao = slcExecutionDao;
-       }
-
-       public void newExecution(SlcExecution slcExecutionMsg) {
-               SlcExecution slcExecutionPersisted = slcExecutionDao
-                               .getSlcExecution(slcExecutionMsg.getUuid());
-               if (slcExecutionPersisted == null) {
-                       if (log.isTraceEnabled())
-                               log.trace("Creating SLC execution #"
-                                               + slcExecutionMsg.getUuid());
-
-                       slcExecutionDao.create(slcExecutionMsg);
-               } else {
-                       throw new SlcException(
-                                       "There is already an SlcExecution registered with id "
-                                                       + slcExecutionMsg.getUuid());
-                       // if (log.isTraceEnabled())
-                       // log.trace("Updating SLC execution #"
-                       // + slcExecutionMsg.getUuid());
-                       //
-                       // slcExecutionDao.merge(slcExecutionMsg);
-               }
-       }
-
-       public void updateStatus(SlcExecutionStatusRequest msg) {
-               SlcExecution slcExecution = slcExecutionDao.getSlcExecution(msg
-                               .getSlcExecutionUuid());
-               if (slcExecution == null)
-                       throw new SlcException("Could not find SLC execution #"
-                                       + msg.getSlcExecutionUuid());
-
-               slcExecution.setStatus(msg.getNewStatus());
-
-               if (msg.getNewStatus().equals(SlcExecution.COMPLETED)) {
-                       List<SlcExecutionStep> steps = new ArrayList<SlcExecutionStep>();
-                       steps.add(new SlcExecutionStep(SlcExecutionStep.END,
-                                       "Process finished."));
-                       slcExecutionDao.addSteps(slcExecution.getUuid(), steps);
-               }
-
-               if (log.isTraceEnabled())
-                       log.trace("Updating status for SLC execution #"
-                                       + slcExecution.getUuid() + " to status "
-                                       + msg.getNewStatus());
-
-               slcExecutionDao.update(slcExecution);
-       }
-
-       public void addSteps(SlcExecutionStepsRequest msg) {
-               slcExecutionDao.addSteps(msg.getSlcExecutionUuid(), msg.getSteps());
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/TestManagerServiceAdapter.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/TestManagerServiceAdapter.java
deleted file mode 100644 (file)
index 8f9985c..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.services.impl;
-
-import org.argeo.slc.core.attachment.Attachment;
-import org.argeo.slc.core.attachment.SimpleAttachment;
-import org.argeo.slc.core.test.tree.TreeTestResult;
-import org.argeo.slc.core.test.tree.TreeTestResultListener;
-import org.argeo.slc.msg.test.tree.AddTreeTestResultAttachmentRequest;
-import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;
-import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;
-import org.argeo.slc.msg.test.tree.ResultPartRequest;
-import org.argeo.slc.services.TestManagerService;
-import org.argeo.slc.test.TestResultPart;
-
-/** In memory access to a test manager service */
-public class TestManagerServiceAdapter implements TreeTestResultListener {
-       private Boolean onlyOnClose = false;
-
-       private TestManagerService testManagerService;
-
-       public void resultPartAdded(TreeTestResult testResult,
-                       TestResultPart testResultPart) {
-               if (onlyOnClose)
-                       return;
-
-               if (testResult.getResultParts().size() == 1
-                               && testResult.getResultParts().values().iterator().next()
-                                               .getParts().size() == 1) {
-                       CreateTreeTestResultRequest req = new CreateTreeTestResultRequest(
-                                       testResult);
-                       testManagerService.createTreeTestResult(req);
-               } else {
-                       ResultPartRequest req = new ResultPartRequest(testResult);
-                       testManagerService.addResultPart(req);
-               }
-       }
-
-       public void close(TreeTestResult testResult) {
-               if (onlyOnClose) {
-                       CreateTreeTestResultRequest req = new CreateTreeTestResultRequest(
-                                       testResult);
-                       testManagerService.createTreeTestResult(req);
-               } else {
-                       CloseTreeTestResultRequest req = new CloseTreeTestResultRequest(
-                                       testResult);
-                       testManagerService.closeTreeTestResult(req);
-               }
-       }
-
-       public void addAttachment(TreeTestResult testResult, Attachment attachment) {
-               if (onlyOnClose)
-                       return;
-               AddTreeTestResultAttachmentRequest req = new AddTreeTestResultAttachmentRequest();
-               req.setResultUuid(testResult.getUuid());
-               req.setAttachment((SimpleAttachment) attachment);
-               testManagerService.addAttachment(req);
-
-       }
-
-       /** Publishes the test result only when it gets closed. */
-       public void setOnlyOnClose(Boolean onlyOnClose) {
-               this.onlyOnClose = onlyOnClose;
-       }
-
-       public void setTestManagerService(TestManagerService testManagerService) {
-               this.testManagerService = testManagerService;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/TestManagerServiceImpl.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/TestManagerServiceImpl.java
deleted file mode 100644 (file)
index 1e02979..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.services.impl;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.argeo.slc.core.test.tree.TreeTestResult;\r
-import org.argeo.slc.core.test.tree.TreeTestResultCollection;\r
-import org.argeo.slc.dao.process.SlcExecutionDao;\r
-import org.argeo.slc.dao.test.TestRunDescriptorDao;\r
-import org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao;\r
-import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
-import org.argeo.slc.msg.test.tree.AddTreeTestResultAttachmentRequest;\r
-import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;\r
-import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;\r
-import org.argeo.slc.msg.test.tree.ResultPartRequest;\r
-import org.argeo.slc.process.SlcExecution;\r
-import org.argeo.slc.services.TestManagerService;\r
-import org.argeo.slc.test.TestRunDescriptor;\r
-\r
-/**\r
- * Implementation of complex operations impacting the underlying data.\r
- */\r
-public class TestManagerServiceImpl implements TestManagerService {\r
-       private Log log = LogFactory.getLog(getClass());\r
-\r
-       private final TreeTestResultDao treeTestResultDao;\r
-       private final TestRunDescriptorDao testRunDescriptorDao;\r
-       private final SlcExecutionDao slcExecutionDao;\r
-       private final TreeTestResultCollectionDao treeTestResultCollectionDao;\r
-\r
-       private String defaultCollectionId = "default";\r
-       \r
-       public TestManagerServiceImpl(TreeTestResultDao treeTestResultDao,\r
-                       TestRunDescriptorDao testRunDescriptorDao,\r
-                       SlcExecutionDao slcExecutionDao,\r
-                       TreeTestResultCollectionDao treeTestResultCollectionDao) {\r
-               this.treeTestResultDao = treeTestResultDao;\r
-               this.testRunDescriptorDao = testRunDescriptorDao;\r
-               this.slcExecutionDao = slcExecutionDao;\r
-               this.treeTestResultCollectionDao = treeTestResultCollectionDao;\r
-       }\r
-\r
-       public void registerTestRunDescriptor(TestRunDescriptor testRunDescriptor) {\r
-               if (testRunDescriptor != null) {\r
-                       if (log.isTraceEnabled())\r
-                               log.trace("Registering test run descriptor #"\r
-                                               + testRunDescriptor.getTestRunUuid());\r
-                       testRunDescriptorDao.saveOrUpdate(testRunDescriptor);\r
-\r
-                       // Update tree test result collection\r
-                       // TODO: optimize\r
-\r
-                       if (testRunDescriptor.getSlcExecutionUuid() != null) {\r
-                               SlcExecution slcExecution = slcExecutionDao\r
-                                               .getSlcExecution(testRunDescriptor\r
-                                                               .getSlcExecutionUuid());\r
-                               if (slcExecution != null) {\r
-                                       // Use Host as collection ID if host is available\r
-                                       String collectionId = slcExecution.getHost() != null ? slcExecution\r
-                                                       .getHost()\r
-                                                       : defaultCollectionId;\r
-                                       addResultToCollection(collectionId, testRunDescriptor\r
-                                                       .getTestResultUuid());\r
-                               }\r
-                       } else {\r
-                               if (log.isTraceEnabled())\r
-                                       log.trace("ResultUUID="\r
-                                                       + testRunDescriptor.getTestResultUuid());\r
-                               addResultToCollection(defaultCollectionId, testRunDescriptor\r
-                                               .getTestResultUuid());\r
-                       }\r
-               }\r
-       }\r
-\r
-       public void addResultToCollection(String collectionId, String resultUuid) {\r
-               // TODO: improve collections\r
-               TreeTestResultCollection ttrc = treeTestResultCollectionDao\r
-                               .getTestResultCollection(collectionId);\r
-               if (ttrc == null) {\r
-                       ttrc = new TreeTestResultCollection(collectionId);\r
-                       treeTestResultCollectionDao.create(ttrc);\r
-               }\r
-               treeTestResultCollectionDao.addResultToCollection(ttrc, resultUuid);\r
-       }\r
-\r
-       public void removeResultFromCollection(String collectionId,\r
-                       String resultUuid) {\r
-               TreeTestResultCollection ttrc = treeTestResultCollectionDao\r
-                               .getTestResultCollection(collectionId);\r
-               if (ttrc != null) {\r
-                       treeTestResultCollectionDao.removeResultFromCollection(ttrc,\r
-                                       resultUuid);\r
-               }\r
-\r
-               // Delete collection if empty\r
-               // see https://www.argeo.org/bugzilla/show_bug.cgi?id=74\r
-               if (ttrc.getResults().size() == 0) {\r
-                       treeTestResultCollectionDao.delete(ttrc);\r
-               }\r
-       }\r
-\r
-       public void createTreeTestResult(CreateTreeTestResultRequest msg) {\r
-               TreeTestResult treeTestResult = msg.getTreeTestResult();\r
-\r
-               if (log.isTraceEnabled())\r
-                       log.trace("Creating result #" + treeTestResult.getUuid());\r
-               treeTestResultDao.create(treeTestResult);\r
-\r
-               registerTestRunDescriptor(msg.getTestRunDescriptor());\r
-\r
-               // FIXME: temporary hack before better collection management is found\r
-               if (msg.getTestRunDescriptor() == null) {\r
-                       addResultToCollection("default", treeTestResult.getUuid());\r
-               }\r
-       }\r
-\r
-       public void addResultPart(ResultPartRequest msg) {\r
-               // registerTestRunDescriptor(msg.getTestRunDescriptor());\r
-\r
-               if (log.isTraceEnabled())\r
-                       log.trace("Adding result part to test result #"\r
-                                       + msg.getResultUuid());\r
-\r
-               treeTestResultDao.addResultPart(msg.getResultUuid(), msg.getPath(), msg\r
-                               .getResultPart(), msg.getRelatedElements());\r
-               // treeTestResultDao.updateAttributes(msg.getResultUuid(), msg\r
-               // .getAttributes());\r
-       }\r
-\r
-       public void closeTreeTestResult(CloseTreeTestResultRequest msg) {\r
-               if (log.isTraceEnabled())\r
-                       log.trace("Closing result #" + msg.getResultUuid() + " at date "\r
-                                       + msg.getCloseDate());\r
-\r
-               treeTestResultDao.close(msg.getResultUuid(), msg.getCloseDate());\r
-       }\r
-\r
-       public void addAttachment(AddTreeTestResultAttachmentRequest msg) {\r
-               if (log.isTraceEnabled())\r
-                       log.trace("Adding attachment " + msg.getAttachment()\r
-                                       + " to result #" + msg.getResultUuid());\r
-               treeTestResultDao.addAttachment(msg.getResultUuid(), msg\r
-                               .getAttachment());\r
-\r
-       }\r
-\r
-       public void setDefaultCollectionId(String defaultCollectionId) {\r
-               this.defaultCollectionId = defaultCollectionId;\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpAction.java
deleted file mode 100644 (file)
index 400b0cc..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer;
-
-import javax.servlet.http.HttpServletRequest;
-
-public interface AjxpAction<T extends AjxpDriver>{
-       public AjxpAnswer execute(T driver, HttpServletRequest request);
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpAnswer.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpAnswer.java
deleted file mode 100644 (file)
index 308fd0a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer;
-
-import javax.servlet.http.HttpServletResponse;
-
-public interface AjxpAnswer {
-       public static AjxpAnswer DO_NOTHING = new AjxpAnswer(){
-               public void updateResponse(HttpServletResponse response) {
-               }
-       };
-
-       public void updateResponse(HttpServletResponse response);
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpDriver.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpDriver.java
deleted file mode 100644 (file)
index 5df7a08..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer;
-
-import javax.servlet.http.HttpServletRequest;
-
-public interface AjxpDriver {
-       public AjxpAnswer executeAction(HttpServletRequest request); 
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpDriverException.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/AjxpDriverException.java
deleted file mode 100644 (file)
index 25c1fad..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer;
-
-public class AjxpDriverException extends RuntimeException {
-       static final long serialVersionUID = 1l;
-
-       public AjxpDriverException(String arg0) {
-               super(arg0);
-       }
-
-       public AjxpDriverException(String arg0, Throwable arg1) {
-               super(arg0, arg1);
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/SimpleAjxpDriver.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/SimpleAjxpDriver.java
deleted file mode 100644 (file)
index 754a9c9..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer;
-
-import java.util.Map;
-import java.util.TreeMap;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class SimpleAjxpDriver implements AjxpDriver {
-       protected final Log log = LogFactory.getLog(getClass());
-       private Map<String, AjxpAction<? extends AjxpDriver>> actions = new TreeMap<String, AjxpAction<? extends AjxpDriver>>();
-
-       public AjxpAnswer executeAction(HttpServletRequest request) {
-               String actionStr = request.getParameter("get_action");
-               if (actionStr == null) {
-                       actionStr = request.getParameter("action");
-               }
-               if (!actions.containsKey(actionStr)) {
-                       throw new AjxpDriverException("Action " + actionStr
-                                       + " not defined.");
-               }
-               AjxpAction action = actions.get(actionStr);
-               return action.execute(this,request);
-       }
-
-       public void setActions(Map<String, AjxpAction<? extends AjxpDriver>> actions) {
-               this.actions = actions;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/AbstractFileDownloadAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/AbstractFileDownloadAction.java
deleted file mode 100644 (file)
index fca3243..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer.file;
-
-import java.io.File;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.argeo.slc.web.ajaxplorer.AjxpAnswer;
-import org.argeo.slc.web.ajaxplorer.AjxpDriverException;
-
-public abstract class AbstractFileDownloadAction extends FileAction {
-       public AjxpAnswer execute(FileDriver driver, HttpServletRequest request) {
-               String fileStr = request.getParameter(getFileParameter());
-               if (fileStr == null) {
-                       throw new AjxpDriverException(
-                                       "A  file to download needs to be provided.");
-               }
-               File file = new File(driver.getBasePath() + fileStr);
-               return new AxpBasicDownloadAnswer(file);
-       }
-
-       /** Return 'file' by default. */
-       protected String getFileParameter() {
-               return "file";
-       }
-
-       /** To be overridden. Do nothing by default. */
-       protected void setHeaders(HttpServletResponse response, File file) {
-               // do nothing
-       }
-
-       protected class AxpBasicDownloadAnswer implements AjxpAnswer {
-               private final File file;
-
-               public AxpBasicDownloadAnswer(File file) {
-                       this.file = file;
-               }
-
-               public void updateResponse(HttpServletResponse response) {
-                       InputStream in = null;
-                       OutputStream out = null;
-                       try {
-                               setHeaders(response, file);
-
-                               if (log.isDebugEnabled())
-                                       log.debug("Download file " + file);
-                               in = FileUtils.openInputStream(file);
-                               out = response.getOutputStream();
-
-                               copyFile(in, out);
-                               out.flush();
-
-                       } catch (Exception e) {
-                               e.printStackTrace();
-                               throw new AjxpDriverException("Cannot download file " + file, e);
-                       } finally {
-                               IOUtils.closeQuietly(in);
-                               IOUtils.closeQuietly(out);
-                       }
-
-               }
-
-               protected void copyFile(InputStream in, OutputStream out)
-                               throws Exception {
-                       IOUtils.copy(in, out);
-               }
-
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/AjxpFile.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/AjxpFile.java
deleted file mode 100644 (file)
index 2a589a4..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer.file;
-
-import java.io.File;
-import java.net.URLEncoder;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.web.ajaxplorer.AjxpDriverException;
-
-public class AjxpFile {
-       private final static Log log = LogFactory.getLog(AjxpFile.class);
-
-       // FIXME: more generic modif time format?
-       private final static SimpleDateFormat sdf = new SimpleDateFormat(
-                       "dd/MM/yyyy hh:mm");
-
-       private final File file;
-       private final String parentPath;
-       private final String filePath;
-
-       private final String ext;
-       private final FileType type;
-
-       public AjxpFile(File file, String parentPath) {
-               this.file = file;
-               this.parentPath = parentPath;
-               if (parentPath.equals("/")) {
-                       this.filePath = "/" + file.getName();
-               } else {
-                       this.filePath = parentPath + "/" + file.getName();
-               }
-               this.ext = file.isDirectory() ? null : file.getName().substring(
-                               file.getName().indexOf('.') + 1);
-               this.type = FileType.findType(ext);
-       }
-
-       public String toXml(final LsMode mode, final String encoding) {
-               try {
-                       StringBuffer buf = new StringBuffer();
-                       buf.append("<tree");
-                       addAttr("text", file.getName(), buf);
-                       if (type != FileType.FOLDER) {
-                               if (mode == LsMode.SEARCH)
-                                       addAttr("is_file", "true", buf);// FIXME: consistent value?
-                               else if (mode == LsMode.FILE_LIST) {
-                                       addAttr("filename", filePath, buf);
-                                       addAttr("is_file", "1", buf);
-                                       addAttr("icon", type.getIcon(), buf);
-
-                                       addAttr("modiftime", formatModifTime(), buf);
-                                       addAttr("mimestring", type.getMimeString(), buf);
-                                       addAttr("filesize", formatFileSize(), buf);
-
-                                       if (type.isImage()) {
-                                               addAttr("is_image", "1", buf);
-                                               addAttr("image_type", type.getImageType(), buf);
-                                               addAttr("image_width", "100", buf);// FIXME: read image
-                                               addAttr("image_height", "100", buf);// FIXME: read image
-
-                                       } else {
-                                               addAttr("is_image", "0", buf);
-                                       }
-                               }
-
-                       } else {// dir
-                               if (mode == LsMode.NULL || mode == LsMode.FILE_LIST) {
-                                       addAttr("filename", filePath, buf);
-                                       if (mode == LsMode.NULL) {
-                                               addAttr("icon", "client/images/foldericon.png", buf);
-                                               addAttr("openicon", "client/images/openfoldericon.png",
-                                                               buf);
-                                               addAttr("parentName", parentPath, buf);
-                                               addAttr("src", "content.php?dir="
-                                                               + URLEncoder.encode(filePath, encoding), buf);
-                                               addAttr(
-                                                               "action",
-                                                               "javascript:ajaxplorer.getFoldersTree().clickNode(CURRENT_ID)",
-                                                               buf);
-                                       } else if (mode == LsMode.FILE_LIST) {
-                                               addAttr("icon", type.getIcon(), buf);// FIXME:
-                                               // consistent?
-                                               addAttr("is_file", "0", buf);
-                                               addAttr("is_image", "0", buf);
-                                               addAttr("mimestring", "Directory", buf);
-                                               addAttr("modiftime", formatModifTime(), buf);
-                                               addAttr("filesize", "-", buf);
-                                       }
-                               }
-
-                       }
-
-                       addAdditionalAttrs(buf, mode, encoding);
-
-                       buf.append("/>");
-
-                       if (log.isTraceEnabled())
-                               log.trace(buf.toString());
-
-                       return buf.toString();
-               } catch (Exception e) {
-                       throw new AjxpDriverException("Could not serialize file " + file, e);
-               }
-       }
-
-       private String formatModifTime() {
-               return sdf.format(new Date(file.lastModified()));
-       }
-
-       private String formatFileSize() {
-               return (file.length() / 1024) + " Kb";
-       }
-
-       protected void addAttr(String attrName, String attrValue, StringBuffer buf) {
-               buf.append(" ").append(attrName).append("=\"").append(attrValue)
-                               .append("\"");
-       }
-
-       /** To be overridden, do nothing by default. */
-       protected void addAdditionalAttrs(final StringBuffer buf,
-                       final LsMode mode, final String encoding) {
-
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileAction.java
deleted file mode 100644 (file)
index ff0aee5..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer.file;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.web.ajaxplorer.AjxpAction;
-
-public abstract class FileAction implements AjxpAction<FileDriver> {
-       protected final Log log = LogFactory.getLog(getClass());
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDeleteAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDeleteAction.java
deleted file mode 100644 (file)
index 563bd01..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.ajaxplorer.file;\r
-\r
-import java.io.File;\r
-import java.util.Map;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-\r
-import org.argeo.slc.web.ajaxplorer.AjxpAnswer;\r
-\r
-public class FileDeleteAction<T extends FileDriver> extends FileAction {\r
-\r
-       public AjxpAnswer execute(FileDriver driver, HttpServletRequest request) {\r
-               Map<Object, Object> params = request.getParameterMap();\r
-               for (Object paramKey : params.keySet()) {\r
-                       String param = paramKey.toString();\r
-                       log.debug("param=" + param + " (" + params.get(paramKey));\r
-                       if (param.length() < 4)\r
-                               continue;\r
-                       else {\r
-\r
-                               if (param.substring(0, 4).equals("file")) {\r
-                                       String[] values = (String[]) params.get(paramKey);\r
-                                       for (String path : values) {\r
-                                               File file = driver.getFile(path);\r
-                                               executeDelete((T) driver, file);\r
-                                       }\r
-                               }\r
-                       }\r
-               }\r
-\r
-               return AjxpAnswer.DO_NOTHING;\r
-       }\r
-\r
-       protected void executeDelete(T driver, File file) {\r
-               log.debug("Delete file " + file);\r
-               file.delete();\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDownloadAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDownloadAction.java
deleted file mode 100644 (file)
index ea863a3..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer.file;
-
-import java.io.File;
-
-import javax.servlet.http.HttpServletResponse;
-
-public class FileDownloadAction extends AbstractFileDownloadAction {
-
-       @Override
-       protected void setHeaders(HttpServletResponse response, File file) {
-               setDefaultDownloadHeaders(response, file.getName(), file.length());
-       }
-
-       public static void setDefaultDownloadHeaders(HttpServletResponse response,
-                       String fileName, Long fileLength) {
-               response.setContentType("application/force-download; name=\""
-                               + fileName + "\"");
-               response.setHeader("Content-Transfer-Encoding", "binary");
-               if (fileLength != null)
-                       response.setContentLength(fileLength.intValue());
-               response.setHeader("Content-Disposition", "attachement; filename=\""
-                               + fileName + "\"");
-               response.setHeader("Expires", "0");
-               response.setHeader("Cache-Control", "no-cache, must-revalidate");
-               response.setHeader("Pragma", "no-cache");
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDriver.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDriver.java
deleted file mode 100644 (file)
index 2e5acb0..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer.file;
-
-import java.io.File;
-
-import org.argeo.slc.web.ajaxplorer.SimpleAjxpDriver;
-
-public class FileDriver extends SimpleAjxpDriver{
-       private String basePath;
-       private String encoding = "UTF-8";
-
-       public String getBasePath() {
-               return basePath;
-       }
-       
-       public File getBaseDir(){
-               return new File(getBasePath());
-       }
-
-       public void setBasePath(String basePath) {
-               if (basePath.charAt(basePath.length() - 1) != File.separatorChar)
-                       basePath = basePath + File.separatorChar;
-               this.basePath = basePath;
-       }
-
-       public String getEncoding() {
-               return encoding;
-       }
-
-       public void setEncoding(String encoding) {
-               this.encoding = encoding;
-       }
-
-       public File getFile(String relpath) {
-               return new File(getBasePath() + relpath).getAbsoluteFile();
-       }
-
-       public File getFile(String dir, String fileName) {
-               return getFile(dir + File.separator + fileName);
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileImageProxyAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileImageProxyAction.java
deleted file mode 100644 (file)
index a74498c..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer.file;
-
-import java.io.File;
-
-import javax.servlet.http.HttpServletResponse;
-
-public class FileImageProxyAction extends AbstractFileDownloadAction {
-
-       @Override
-       protected void setHeaders(HttpServletResponse response, File file) {
-               FileType fileType = FileType.findType(file);
-               response.setContentType(fileType.getImageType());
-               response.setContentLength((int) file.length());
-               response.setHeader("Cache-Control", "public");
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileLsAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileLsAction.java
deleted file mode 100644 (file)
index 94240f0..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer.file;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.OutputStreamWriter;
-import java.util.List;
-import java.util.Vector;
-
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.io.IOUtils;
-import org.argeo.slc.web.ajaxplorer.AjxpAnswer;
-import org.argeo.slc.web.ajaxplorer.AjxpDriverException;
-
-public class FileLsAction<T extends FileDriver, F extends AjxpFile> extends
-               FileAction {
-
-       public AjxpAnswer execute(FileDriver driver, HttpServletRequest request) {
-               String modeStr = request.getParameter("mode");
-               LsMode mode;
-               if (modeStr == null)
-                       mode = LsMode.NULL;
-               else if (modeStr.equals("complete"))
-                       mode = LsMode.COMPLETE;
-               else if (modeStr.equals("file_list"))
-                       mode = LsMode.FILE_LIST;
-               else if (modeStr.equals("search"))
-                       mode = LsMode.SEARCH;
-               else
-                       throw new AjxpDriverException("Unkown mode " + modeStr);
-
-               String options = request.getParameter("options");
-               if (options != null) {
-                       if ("al".equals(options))
-                               mode = LsMode.FILE_LIST;
-               }
-
-               String path = request.getParameter("dir");
-               if (path == null) {
-                       path = "/";
-               }
-
-               boolean dirOnly = false;
-               if (mode == LsMode.NULL || mode == LsMode.COMPLETE) {
-                       dirOnly = true;
-               }
-
-               List<F> ajxpFiles = listFiles((T) driver, path, dirOnly);
-               /*
-                * File[] files = dir.listFiles(createFileFilter(request, dir));
-                * List<AjxpFile> ajxpFiles = new Vector<AjxpFile>(); for (File file :
-                * files) { if (file.isDirectory()) { ajxpFiles.add(new AjxpFile(file,
-                * path)); } else { if (!dirOnly) ajxpFiles.add(new AjxpFile(file,
-                * path)); } }
-                */
-               return new AxpLsAnswer(driver, ajxpFiles, mode);
-       }
-
-       protected List<F> listFiles(T driver, String path, boolean dirOnly) {
-               File dir = driver.getFile(path);
-
-               if (!dir.exists())
-                       throw new AjxpDriverException("Dir " + dir + " does not exist.");
-
-               FileFilter filter = createFileFilter(dir);
-               File[] files = dir.listFiles(filter);
-               List<F> ajxpFiles = new Vector<F>();
-               for (File file : files) {
-                       if (file.isDirectory()) {
-                               ajxpFiles.add((F) new AjxpFile(file, path));
-                       } else {
-                               if (!dirOnly)
-                                       ajxpFiles.add((F) new AjxpFile(file, path));
-                       }
-               }
-               return ajxpFiles;
-       }
-
-       /** To be overridden. Accept all by default. */
-       protected FileFilter createFileFilter(File dir) {
-               return new FileFilter() {
-                       public boolean accept(File pathname) {
-                               return true;
-                       }
-
-               };
-       }
-
-       protected class AxpLsAnswer implements AjxpAnswer {
-               private final List<F> files;
-               private final LsMode mode;
-               private final FileDriver driver;
-
-               public AxpLsAnswer(FileDriver driver, List<F> files, LsMode mode) {
-                       this.files = files;
-                       this.mode = mode;
-                       this.driver = driver;
-               }
-
-               public void updateResponse(HttpServletResponse response) {
-                       final String encoding = driver.getEncoding();
-                       response.setCharacterEncoding(encoding);
-                       response.setContentType("text/xml");
-
-                       ServletOutputStream out = null;
-                       OutputStreamWriter writer = null;
-                       try {
-                               out = response.getOutputStream();
-                               writer = new OutputStreamWriter(out, encoding);
-                               writer.write("<?xml version=\"1.0\" encoding=\"" + encoding
-                                               + "\"?>");
-                               // TODO add current path
-                               writer.write("<tree>");
-                               for (AjxpFile file : files) {
-                                       writer.write(file.toXml(mode, encoding));
-                               }
-                               writer.write("</tree>");
-                               writer.flush();
-
-                       } catch (Exception e) {
-                               throw new AjxpDriverException("Could not write response.", e);
-                       } finally {
-                               IOUtils.closeQuietly(writer);
-                               IOUtils.closeQuietly(out);
-                       }
-               }
-
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileMkdirAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileMkdirAction.java
deleted file mode 100644 (file)
index a60f3a3..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.ajaxplorer.file;\r
-\r
-import java.io.File;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-\r
-import org.argeo.slc.web.ajaxplorer.AjxpAnswer;\r
-\r
-public class FileMkdirAction<T extends FileDriver> extends FileAction {\r
-\r
-       public AjxpAnswer execute(FileDriver driver,\r
-                       HttpServletRequest request) {\r
-               String dir = request.getParameter("dir");\r
-               String dirName = request.getParameter("dirname");\r
-\r
-               File newDir = driver.getFile(dir, dirName);\r
-               newDir.mkdirs();\r
-\r
-               postProcess((T)driver,newDir);\r
-\r
-               return AjxpAnswer.DO_NOTHING;\r
-       }\r
-\r
-       protected void postProcess(T driver,File newDir) {\r
-\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileType.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileType.java
deleted file mode 100644 (file)
index 48d45a2..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer.file;
-
-import java.io.File;
-
-import org.argeo.slc.web.ajaxplorer.AjxpDriverException;
-
-public enum FileType {
-       FOLDER("folder.png", "Directory"), UNKNOWN("mime_empty.png", "Unkown"), GIF(
-                       "image.png", "GIF Picture"), JPEG("image.png", "JPEG Picture"), PNG(
-                       "image.png", "PNG Picture");
-
-       private final String icon;
-       private final String mimeString;
-
-       FileType(String icon, String mimeString) {
-               this.icon = icon;
-               this.mimeString = mimeString;
-       }
-
-       public String getIcon() {
-               return icon;
-       }
-
-       public String getMimeString() {
-               return mimeString;
-       }
-
-       public boolean isImage() {
-               return this == GIF || this == JPEG || this == PNG;
-       }
-
-       public String getImageType() {
-               switch (this) {
-               case GIF:
-                       return "image/gif";
-               case JPEG:
-                       return "image/jpeg";
-               case PNG:
-                       return "image/png";
-               }
-               throw new AjxpDriverException("Image type undefined for " + this);
-       }
-
-       public static FileType findType(File file) {
-               String ext = file.isDirectory() ? null : file.getName().substring(
-                               file.getName().indexOf('.') + 1);
-               return findType(ext);
-       }
-
-       /**
-        * Find the type based on the extension.
-        * 
-        * @param ext
-        *            the extension, null for a directory
-        */
-       public static FileType findType(String extArg) {
-               if (extArg == null)
-                       return FOLDER;
-
-               String ext = extArg.toLowerCase();
-               if (ext.equals("jpg") || ext.equals("jpeg"))
-                       return JPEG;
-               else if (ext.equals("gif"))
-                       return GIF;
-               else if (ext.equals("png"))
-                       return PNG;
-               else
-                       return UNKNOWN;
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileUploadAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileUploadAction.java
deleted file mode 100644 (file)
index 1620d93..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer.file;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.io.IOUtils;
-import org.argeo.slc.web.ajaxplorer.AjxpAnswer;
-import org.argeo.slc.web.ajaxplorer.AjxpDriverException;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
-
-public class FileUploadAction<T extends FileDriver> extends FileAction {
-
-       public AjxpAnswer execute(FileDriver driver, HttpServletRequest request) {
-               if (!(request instanceof MultipartHttpServletRequest)) {
-                       throw new AjxpDriverException(
-                                       "Cann only deal with MultipartHttpServletRequest");
-               }
-               MultipartHttpServletRequest mpr = (MultipartHttpServletRequest) request;
-               String dir = mpr.getParameter("dir");
-               String fileName = mpr.getParameter("Filename");
-
-               InputStream in = null;
-               OutputStream out = null;
-               File file = null;
-               try {
-                       MultipartFile mpfile = mpr.getFile("Filedata");
-                       in = mpfile.getInputStream();
-                       file = driver.getFile(dir, fileName);
-                       out = new FileOutputStream(file);
-                       IOUtils.copy(in, out);
-               } catch (IOException e) {
-                       throw new AjxpDriverException("Cannot upload file.", e);
-               } finally {
-                       IOUtils.closeQuietly(in);
-                       IOUtils.closeQuietly(out);
-               }
-               postProcess((T)driver, file);
-
-               return AjxpAnswer.DO_NOTHING;
-       }
-
-       protected void postProcess(T driver,File file) {
-
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/LsMode.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/LsMode.java
deleted file mode 100644 (file)
index e976a2d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer.file;
-
-public enum LsMode {
-       NULL, COMPLETE, FILE_LIST, SEARCH
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/mvc/AjxpDriverRequestHandler.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/mvc/AjxpDriverRequestHandler.java
deleted file mode 100644 (file)
index 9b929ed..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer.mvc;
-
-import java.io.IOException;
-import java.util.Map;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.web.ajaxplorer.AjxpAnswer;
-import org.argeo.slc.web.ajaxplorer.AjxpDriver;
-import org.springframework.web.HttpRequestHandler;
-
-public class AjxpDriverRequestHandler implements HttpRequestHandler {
-
-       protected final Log log = LogFactory.getLog(getClass());
-       private AjxpDriver driver;
-
-       public void handleRequest(HttpServletRequest req, HttpServletResponse resp)
-                       throws ServletException, IOException {
-               long id = System.currentTimeMillis();
-               try {
-                       if (log.isDebugEnabled())
-                               logRequest(id, req.getMethod(), req);
-
-                       AjxpAnswer answer = driver.executeAction(req);
-                       answer.updateResponse(resp);
-
-                       if (log.isTraceEnabled())
-                               log.trace(id + " " + req.getMethod() + " completed");
-               } catch (Exception e) {
-                       log.error(id + " Cannot process request.", e);
-                       throw new ServletException("Cannot process request " + id, e);
-               }
-
-       }
-
-       protected void logRequest(long id, String method, HttpServletRequest req) {
-               if (log.isDebugEnabled()) {
-                       StringBuffer buf = new StringBuffer(id + " Received " + method
-                                       + ": ");
-                       buf.append('{');
-                       @SuppressWarnings("unchecked")
-                       Map<String, String[]> params = req.getParameterMap();
-                       int count1 = 0;
-                       for (Map.Entry<String, String[]> entry : params.entrySet()) {
-                               if (count1 != 0)
-                                       buf.append(", ");
-                               buf.append(entry.getKey()).append("={");
-                               int count2 = 0;
-                               for (String value : entry.getValue()) {
-                                       if (count2 != 0)
-                                               buf.append(',');
-                                       buf.append(value);
-                                       count2++;
-                               }
-                               buf.append('}');
-                               count1++;
-                       }
-                       buf.append('}');
-                       log.debug(buf.toString());
-               }
-       }
-
-       public void setDriver(AjxpDriver driver) {
-               this.driver = driver;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/mvc/AjxpDriverServlet.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/mvc/AjxpDriverServlet.java
deleted file mode 100644 (file)
index d4e579e..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.ajaxplorer.mvc;
-
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Map;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.web.ajaxplorer.AjxpAnswer;
-import org.argeo.slc.web.ajaxplorer.AjxpDriver;
-import org.springframework.beans.BeanWrapper;
-import org.springframework.beans.BeanWrapperImpl;
-import org.springframework.beans.BeansException;
-import org.springframework.web.context.WebApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-import org.springframework.web.servlet.HttpServletBean;
-
-public class AjxpDriverServlet extends HttpServletBean {
-       static final long serialVersionUID = 1l;
-
-       protected final Log log = LogFactory.getLog(getClass());
-       private String driverBean;
-       private AjxpDriver driver;
-
-       @Override
-       public void init(ServletConfig sc) throws ServletException {
-               super.init(sc);
-               WebApplicationContext context = WebApplicationContextUtils
-                               .getRequiredWebApplicationContext(sc.getServletContext());
-               driverBean = sc.getInitParameter("driverBean");
-               if (driverBean == null) {
-                       throw new ServletException(
-                                       "No driver found, please set the driverBean property");
-               }
-
-               logger.info("Loading driver " + driverBean);
-               driver = (AjxpDriver) context.getBean(driverBean);
-
-               // overrideBeanProperties(sc);
-       }
-
-       @Override
-       protected void doGet(HttpServletRequest req, HttpServletResponse resp)
-                       throws ServletException, IOException {
-               processRequest("GET", req, resp);
-       }
-
-       @Override
-       protected void doPost(HttpServletRequest req, HttpServletResponse resp)
-                       throws ServletException, IOException {
-               processRequest("POST", req, resp);
-       }
-
-       protected void processRequest(String method, HttpServletRequest req,
-                       HttpServletResponse resp) throws ServletException, IOException {
-               long id = System.currentTimeMillis();
-               try {
-                       if (log.isDebugEnabled())
-                               logRequest(id, method, req);
-
-                       AjxpAnswer answer = driver.executeAction(req);
-                       answer.updateResponse(resp);
-
-                       if (log.isDebugEnabled())
-                               log.debug(id + " " + method + " completed");
-               } catch (Exception e) {
-                       log.error(id + " Cannot process request.", e);
-                       throw new ServletException("Cannot process request " + id, e);
-               }
-
-       }
-
-       public void setDriverBean(String driverName) {
-               this.driverBean = driverName;
-       }
-
-       protected void logRequest(long id, String method, HttpServletRequest req) {
-               if (log.isDebugEnabled()) {
-                       StringBuffer buf = new StringBuffer(id + " Received " + method
-                                       + ": ");
-                       buf.append('{');
-                       Map<String, String[]> params = req.getParameterMap();
-                       int count1 = 0;
-                       for (Map.Entry<String, String[]> entry : params.entrySet()) {
-                               if (count1 != 0)
-                                       buf.append(", ");
-                               buf.append(entry.getKey()).append("={");
-                               int count2 = 0;
-                               for (String value : entry.getValue()) {
-                                       if (count2 != 0)
-                                               buf.append(',');
-                                       buf.append(value);
-                                       count2++;
-                               }
-                               buf.append('}');
-                               count1++;
-                       }
-                       buf.append('}');
-                       log.debug(buf.toString());
-               }
-       }
-
-       protected void overrideBeanProperties(ServletConfig sc)
-                       throws ServletException {
-               BeanWrapper wrapper = new BeanWrapperImpl(driver);
-               Enumeration<String> en = sc.getInitParameterNames();
-               while (en.hasMoreElements()) {
-                       String name = en.nextElement();
-                       if (name.indexOf(driverBean + '.') == 0
-                                       && name.length() > (driverBean.length() + 1)) {
-                               String propertyName = name.substring(driverBean.length() + 1);
-                               String value = sc.getInitParameter(name);
-                               if (value != null) {
-                                       try {
-                                               wrapper.setPropertyValue(propertyName, value);
-                                       } catch (BeansException e) {
-                                               throw new ServletException("Cannot set property "
-                                                               + propertyName + " of bean " + driverBean, e);
-                                       }
-                               }
-                       }
-               }
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnAjxpFile.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnAjxpFile.java
deleted file mode 100644 (file)
index 5eedfc7..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.ajaxplorer.svn;\r
-\r
-import org.argeo.slc.web.ajaxplorer.file.AjxpFile;\r
-import org.argeo.slc.web.ajaxplorer.file.LsMode;\r
-import org.tmatesoft.svn.core.wc.SVNInfo;\r
-\r
-public class SvnAjxpFile extends AjxpFile {\r
-\r
-       protected final SVNInfo info;\r
-\r
-       public SvnAjxpFile(SVNInfo info, String parentPath) {\r
-               super(info.getFile(), parentPath);\r
-               this.info = info;\r
-       }\r
-\r
-       @Override\r
-       protected void addAdditionalAttrs(StringBuffer buf, LsMode mode,\r
-                       String encoding) {\r
-               addAttr("author", info.getAuthor(), buf);\r
-               addAttr("revision", Long.toString(info.getRevision().getNumber()), buf);\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDeleteAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDeleteAction.java
deleted file mode 100644 (file)
index 9175377..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.ajaxplorer.svn;\r
-\r
-import java.io.File;\r
-\r
-import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
-import org.argeo.slc.web.ajaxplorer.file.FileDeleteAction;\r
-import org.tmatesoft.svn.core.SVNException;\r
-\r
-public class SvnDeleteAction extends FileDeleteAction<SvnDriver> {\r
-       @Override\r
-       protected void executeDelete(SvnDriver driver, File file) {\r
-               try {\r
-                       driver.beginWriteAction(file.getParentFile());\r
-\r
-                       log.debug("SVN Delete: " + file);\r
-                       driver.getManager().getWCClient().doDelete(file, true, false);\r
-\r
-                       driver.commitAll("Commit delete of " + file.getName());\r
-                       driver.completeWriteAction(file.getParentFile());\r
-               } catch (SVNException e) {\r
-                       throw new AjxpDriverException("Cannot delete file " + file, e);\r
-               } finally {\r
-                       driver.rollbackWriteAction(file.getParentFile());\r
-               }\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDownloadAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDownloadAction.java
deleted file mode 100644 (file)
index 9ef3722..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.ajaxplorer.svn;\r
-\r
-import javax.servlet.ServletOutputStream;\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.apache.commons.io.IOUtils;\r
-import org.argeo.slc.web.ajaxplorer.AjxpAction;\r
-import org.argeo.slc.web.ajaxplorer.AjxpAnswer;\r
-import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
-import org.argeo.slc.web.ajaxplorer.file.FileDownloadAction;\r
-import org.tmatesoft.svn.core.io.SVNRepository;\r
-\r
-public class SvnDownloadAction implements AjxpAction<SvnDriver> {\r
-\r
-       public AjxpAnswer execute(SvnDriver driver, HttpServletRequest request) {\r
-               String path = request.getParameter("file");\r
-               if (path.charAt(path.length() - 1) == '/') {\r
-                       // probably a directory\r
-                       return AjxpAnswer.DO_NOTHING;\r
-               }\r
-\r
-               String revStr = request.getParameter("rev");\r
-               Long rev = Long.parseLong(revStr);\r
-               return new SvnDownloadAnswer(driver, path, rev);\r
-       }\r
-\r
-       public class SvnDownloadAnswer implements AjxpAnswer {\r
-               private final SvnDriver driver;\r
-               private final String path;\r
-               private final Long rev;\r
-\r
-               public SvnDownloadAnswer(SvnDriver driver, String path, Long rev) {\r
-                       this.driver = driver;\r
-                       this.path = path;\r
-                       this.rev = rev;\r
-               }\r
-\r
-               public void updateResponse(HttpServletResponse response) {\r
-                       ServletOutputStream out = null;\r
-                       try {\r
-                               FileDownloadAction.setDefaultDownloadHeaders(response,\r
-                                               getFileName(), null);\r
-                               response.setHeader("AjaXplorer-SvnFileName", getFileName());\r
-\r
-                               SVNRepository repository = driver.getRepository();\r
-                               out = response.getOutputStream();\r
-                               repository.getFile(path, rev, null, out);\r
-                       } catch (Exception e) {\r
-                               throw new AjxpDriverException("Cannot download revision " + rev\r
-                                               + " of path " + path, e);\r
-                       } finally {\r
-                               IOUtils.closeQuietly(out);\r
-                       }\r
-               }\r
-\r
-               protected String getFileName() {\r
-                       int lastIndexSlash = path.lastIndexOf('/');\r
-                       final String origFileName;\r
-                       if (lastIndexSlash != -1) {\r
-                               origFileName = path.substring(lastIndexSlash + 1);\r
-                       } else {\r
-                               origFileName = path;\r
-                       }\r
-\r
-                       int lastIndexPoint = origFileName.lastIndexOf('.');\r
-                       String prefix = origFileName.substring(0, lastIndexPoint);\r
-                       String ext = origFileName.substring(lastIndexPoint);\r
-                       return prefix + "-" + rev + ext;\r
-               }\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDriver.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnDriver.java
deleted file mode 100644 (file)
index 1d3e95f..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.ajaxplorer.svn;\r
-\r
-import java.io.File;\r
-\r
-import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
-import org.argeo.slc.web.ajaxplorer.file.FileDriver;\r
-import org.springframework.beans.factory.BeanNameAware;\r
-import org.tmatesoft.svn.core.SVNException;\r
-import org.tmatesoft.svn.core.SVNURL;\r
-import org.tmatesoft.svn.core.internal.io.fs.FSRepositoryFactory;\r
-import org.tmatesoft.svn.core.io.SVNRepository;\r
-import org.tmatesoft.svn.core.wc.SVNClientManager;\r
-import org.tmatesoft.svn.core.wc.SVNInfo;\r
-import org.tmatesoft.svn.core.wc.SVNRevision;\r
-import org.tmatesoft.svn.core.wc.admin.SVNAdminClient;\r
-\r
-public class SvnDriver extends FileDriver implements BeanNameAware {\r
-       private final static String DEFAULT_DATA_PATH = System\r
-                       .getProperty("user.home")\r
-                       + File.separator + "AjaXplorerArchiver" + File.separator + "data";\r
-\r
-       private final static long WRITE_ACTION_TIMEOUT = 10 * 60 * 1000;\r
-\r
-       private SVNURL baseUrl;\r
-       private SVNClientManager manager;\r
-\r
-       private String beanName;\r
-\r
-       private boolean isInWriteAction = false;\r
-\r
-       public void init() {\r
-               FSRepositoryFactory.setup();\r
-               manager = SVNClientManager.newInstance();\r
-\r
-               String basePath = getBasePath();\r
-               if (basePath != null) {\r
-                       File baseDir = new File(basePath);\r
-                       if (baseDir.exists()) {// base dir exists\r
-                               boolean shouldCheckOut = baseDirChecks(baseDir);\r
-                               if (shouldCheckOut) {\r
-                                       checkOut(baseDir);\r
-                               }\r
-                       } else {\r
-                               checkOut(baseDir);\r
-                       }\r
-               } else {\r
-                       String defaultBasePath = DEFAULT_DATA_PATH + File.separator\r
-                                       + "svnwc" + File.separator + beanName;\r
-                       log.warn("No base path provided, use " + defaultBasePath);\r
-                       setBasePath(defaultBasePath);\r
-\r
-                       File baseDir = new File(getBasePath());\r
-                       if (!baseDir.exists()) {\r
-                               baseDir.mkdirs();\r
-                       }\r
-\r
-                       if (baseDirChecks(baseDir)) {\r
-                               if (getBaseUrl() == null) {\r
-                                       String defaultRepoPath = DEFAULT_DATA_PATH + File.separator\r
-                                                       + "svnrepos" + File.separator + beanName;\r
-                                       log.warn("No base URL found, create repository at "\r
-                                                       + defaultRepoPath);\r
-                                       baseUrl = createRepository(new File(defaultRepoPath));\r
-                               }\r
-                               checkOut(new File(getBasePath()));\r
-                       }\r
-               }\r
-               log.info("SVN driver initialized with base url " + getBaseUrl()\r
-                               + " and base path " + getBasePath());\r
-       }\r
-\r
-       /** Builds a SVN URL. */\r
-       public SVNURL getSVNURL(String relativePath) {\r
-               try {\r
-                       return baseUrl.appendPath(relativePath, false);\r
-               } catch (SVNException e) {\r
-                       throw new AjxpDriverException(\r
-                                       "Cannot build URL from relative path " + relativePath\r
-                                                       + " and base url " + baseUrl);\r
-               }\r
-       }\r
-\r
-       public SVNRepository getRepository() {\r
-               try {\r
-                       return manager.createRepository(baseUrl, true);\r
-               } catch (SVNException e) {\r
-                       throw new AjxpDriverException("Cannot create repository for "\r
-                                       + baseUrl, e);\r
-               }\r
-       }\r
-\r
-       /**\r
-        * Verifies that the provided existing base dir is ok and whether one should\r
-        * check out. Set the base url from the working copy.\r
-        * \r
-        * @return whether one should check out.\r
-        */\r
-       protected boolean baseDirChecks(File baseDir) {\r
-               if (!baseDir.isDirectory()) {\r
-                       throw new AjxpDriverException("Base path " + baseDir\r
-                                       + " is not a directory.");\r
-               }\r
-\r
-               try {// retrieves SVN infos\r
-                       SVNInfo info = manager.getWCClient().doInfo(baseDir,\r
-                                       SVNRevision.WORKING);\r
-                       SVNURL baseUrlTemp = info.getURL();\r
-                       if (baseUrl != null) {\r
-                               if (!baseUrl.equals(baseUrlTemp)) {\r
-                                       throw new AjxpDriverException(\r
-                                                       "SVN URL of the working copy "\r
-                                                                       + baseUrlTemp\r
-                                                                       + " is not compatible with provided baseUrl "\r
-                                                                       + baseUrl);\r
-                               }\r
-                       } else {\r
-                               this.baseUrl = baseUrlTemp;\r
-                       }\r
-                       return false;\r
-               } catch (SVNException e) {// no info retrieved\r
-                       log\r
-                                       .warn("Could not retrieve SVN info from "\r
-                                                       + baseDir\r
-                                                       + "("\r
-                                                       + e.getMessage()\r
-                                                       + "). Guess that it is and empty dir and try to check out from provided URL.");\r
-                       if (baseDir.listFiles().length != 0) {\r
-                               throw new AjxpDriverException("Base dir " + baseDir\r
-                                               + " is not a working copy and not an empty dir.");\r
-                       }\r
-                       return true;\r
-               }\r
-       }\r
-\r
-       protected void checkOut(File baseDir) {\r
-               if (getBaseUrl() == null) {\r
-                       throw new AjxpDriverException(\r
-                                       "No SVN URL provided, cannot check out.");\r
-               }\r
-\r
-               // Make sure directory exists\r
-               baseDir.mkdirs();\r
-\r
-               try {\r
-                       long revision = manager.getUpdateClient().doCheckout(getBaseUrl(),\r
-                                       baseDir, SVNRevision.UNDEFINED, SVNRevision.HEAD, true);\r
-                       log.info("Checked out from " + baseUrl + " to " + baseDir\r
-                                       + " at revision " + revision);\r
-               } catch (SVNException e) {\r
-                       throw new AjxpDriverException("Cannot check out from " + baseUrl\r
-                                       + " to " + baseDir, e);\r
-               }\r
-       }\r
-\r
-       protected SVNURL createRepository(File repoDir) {\r
-               try {\r
-                       SVNAdminClient adminClient = manager.getAdminClient();\r
-                       return adminClient.doCreateRepository(repoDir, null, true, false);\r
-               } catch (SVNException e) {\r
-                       throw new AjxpDriverException("Cannot create repository at "\r
-                                       + repoDir, e);\r
-               }\r
-       }\r
-\r
-       private void updateIfRequired(File dir) {\r
-               try {\r
-                       SVNInfo wcInfo = manager.getWCClient().doInfo(getBaseDir(),\r
-                                       SVNRevision.WORKING);\r
-                       SVNRevision wcRev = wcInfo.getRevision();\r
-                       SVNInfo repoInfo = manager.getWCClient().doInfo(getBaseUrl(),\r
-                                       null, SVNRevision.HEAD);\r
-                       SVNRevision repoRev = repoInfo.getRevision();\r
-\r
-                       if (log.isTraceEnabled())\r
-                               log\r
-                                               .trace("WC Revision=" + wcRev + ", Repo Revision="\r
-                                                               + repoRev);\r
-\r
-                       if (!wcRev.equals(repoRev)) {\r
-                               log.debug("Update working copy from revision " + wcRev\r
-                                               + " to revision " + repoRev);\r
-                               manager.getUpdateClient().doUpdate(getBaseDir(),\r
-                                               SVNRevision.HEAD, true);\r
-                       }\r
-               } catch (SVNException e) {\r
-                       throw new AjxpDriverException("Cannot update working copy "\r
-                                       + getBaseDir(),e);\r
-               }\r
-       }\r
-\r
-       public synchronized void beginWriteAction(File dir) {\r
-               if (isInWriteAction) {\r
-                       try {\r
-                               wait(WRITE_ACTION_TIMEOUT);\r
-                       } catch (InterruptedException e) {\r
-                               // silent\r
-                       }\r
-                       if (isInWriteAction) {\r
-                               throw new AjxpDriverException(\r
-                                               "Still in write action after timeout "\r
-                                                               + WRITE_ACTION_TIMEOUT + " ms.");\r
-                       }\r
-               }\r
-\r
-               isInWriteAction = true;\r
-               updateIfRequired(dir);\r
-       }\r
-\r
-       public synchronized void completeWriteAction(File dir) {\r
-               isInWriteAction = false;\r
-               notifyAll();\r
-       }\r
-\r
-       public synchronized void rollbackWriteAction(File dir) {\r
-               // TODO: revert?\r
-               isInWriteAction = false;\r
-               notifyAll();\r
-       }\r
-       \r
-       public void commitAll(String message) throws SVNException{\r
-               if(log.isTraceEnabled())\r
-               log.trace("SVN Commit: " + getBaseDir());\r
-               manager.getCommitClient().doCommit(new File[] { getBaseDir() }, true,\r
-                               message, true, true);\r
-\r
-       }\r
-\r
-       /** Spring bean name, set at initialization. */\r
-       public void setBeanName(String beanName) {\r
-               this.beanName = beanName;\r
-       }\r
-\r
-       public void setBaseUrl(String baseUrl) {\r
-               try {\r
-                       this.baseUrl = SVNURL.parseURIDecoded(baseUrl);\r
-               } catch (SVNException e) {\r
-                       throw new AjxpDriverException("Cannot parse SVN URL " + baseUrl, e);\r
-               }\r
-       }\r
-\r
-       public SVNURL getBaseUrl() {\r
-               return baseUrl;\r
-       }\r
-\r
-       public SVNClientManager getManager() {\r
-               return manager;\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnLogAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnLogAction.java
deleted file mode 100644 (file)
index 24c12bc..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.ajaxplorer.svn;\r
-\r
-import java.io.File;\r
-import java.io.PrintWriter;\r
-import java.text.SimpleDateFormat;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Vector;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.apache.commons.io.IOUtils;\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.argeo.slc.web.ajaxplorer.AjxpAction;\r
-import org.argeo.slc.web.ajaxplorer.AjxpAnswer;\r
-import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
-import org.tmatesoft.svn.core.ISVNLogEntryHandler;\r
-import org.tmatesoft.svn.core.SVNException;\r
-import org.tmatesoft.svn.core.SVNLogEntry;\r
-import org.tmatesoft.svn.core.SVNLogEntryPath;\r
-import org.tmatesoft.svn.core.wc.SVNRevision;\r
-\r
-public class SvnLogAction implements AjxpAction<SvnDriver> {\r
-       private final SimpleDateFormat sdfIso = new SimpleDateFormat(\r
-                       "yyyy-MM-dd HH:mm:ss");\r
-       private final Log log = LogFactory.getLog(getClass());\r
-\r
-       public AjxpAnswer execute(SvnDriver driver, HttpServletRequest request) {\r
-               String fileStr = request.getParameter("file");\r
-               log.debug("Log file " + fileStr);\r
-               if (fileStr == null) {\r
-                       throw new AjxpDriverException("A  file needs to be provided.");\r
-               }\r
-               File file = new File(driver.getBasePath() + fileStr);\r
-               return new SvnLogAnswer(driver, file);\r
-       }\r
-\r
-       protected class SvnLogAnswer implements AjxpAnswer {\r
-               private final SvnDriver driver;\r
-               private final File file;\r
-\r
-               public SvnLogAnswer(SvnDriver driver, File file) {\r
-                       this.driver = driver;\r
-                       this.file = file;\r
-               }\r
-\r
-               public void updateResponse(HttpServletResponse response) {\r
-                       PrintWriter writer = null;\r
-                       try {\r
-                               writer = response.getWriter();\r
-                               writer.append("<tree>");\r
-                               writer.append("<log>");\r
-\r
-                               final List<SVNLogEntry> logEntries = new Vector<SVNLogEntry>();\r
-                               ISVNLogEntryHandler logHandler = new ISVNLogEntryHandler() {\r
-                                       public void handleLogEntry(SVNLogEntry logEntry)\r
-                                                       throws SVNException {\r
-                                               logEntries.add(logEntry);\r
-                                       }\r
-                               };\r
-\r
-                               driver.getManager().getLogClient().doLog(new File[] { file },\r
-                                               SVNRevision.create(0), SVNRevision.HEAD, true, true,\r
-                                               100, logHandler);\r
-\r
-                               for (int i = logEntries.size() - 1; i >= 0; i--) {\r
-                                       String xml = logEntryAsXml(logEntries.get(i), file);\r
-                                       if(log.isTraceEnabled())\r
-                                               log.trace(xml);\r
-                                       writer.append(xml);\r
-                               }\r
-\r
-                               writer.append("</log>");\r
-                               writer.append("</tree>");\r
-                       } catch (Exception e) {\r
-                               throw new AjxpDriverException(\r
-                                               "Cannot retrieve log for " + file, e);\r
-                       } finally {\r
-                               IOUtils.closeQuietly(writer);\r
-                       }\r
-               }\r
-\r
-       }\r
-\r
-       protected String logEntryAsXml(SVNLogEntry entry, File file) {\r
-               StringBuffer buf = new StringBuffer();\r
-               buf.append("<logentry");\r
-               buf.append(" revision=\"").append(entry.getRevision()).append("\"");\r
-               buf.append(" is_file=\"").append(file.isDirectory() ? "0" : "1")\r
-                               .append("\"");\r
-               buf.append(">");\r
-\r
-               buf.append("<author>").append(entry.getAuthor()).append("</author>");\r
-               buf.append("<date>").append(sdfIso.format(entry.getDate())).append(\r
-                               "</date>");\r
-\r
-               buf.append("<paths>");\r
-               Map<Object, SVNLogEntryPath> paths = entry.getChangedPaths();\r
-               for (SVNLogEntryPath path : paths.values()) {\r
-                       buf.append("<path>").append(path.getPath()).append("</path>");\r
-               }\r
-               buf.append("</paths>");\r
-\r
-               buf.append("<msg>").append(entry.getMessage()).append("</msg>");\r
-\r
-               buf.append("</logentry>");\r
-               return buf.toString();\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnLsAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnLsAction.java
deleted file mode 100644 (file)
index 4a3fc41..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.ajaxplorer.svn;\r
-\r
-import java.io.File;\r
-import java.io.FileFilter;\r
-import java.util.List;\r
-import java.util.Vector;\r
-\r
-import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
-import org.argeo.slc.web.ajaxplorer.file.FileLsAction;\r
-import org.tmatesoft.svn.core.SVNException;\r
-import org.tmatesoft.svn.core.wc.SVNInfo;\r
-import org.tmatesoft.svn.core.wc.SVNRevision;\r
-import org.tmatesoft.svn.core.wc.SVNWCClient;\r
-\r
-public class SvnLsAction extends FileLsAction<SvnDriver, SvnAjxpFile> {\r
-\r
-       @Override\r
-       protected List<SvnAjxpFile> listFiles(SvnDriver driver, final String path,\r
-                       final boolean dirOnly) {\r
-               try {\r
-                       File dir = driver.getFile(path);\r
-                       SVNWCClient client = driver.getManager().getWCClient();\r
-\r
-                       final List<SvnAjxpFile> res = new Vector<SvnAjxpFile>();\r
-                       FileFilter filter = createFileFilter(dir);\r
-                       File[] files = dir.listFiles(filter);\r
-                       for (File file : files) {\r
-                               //SVNStatus status = driver.getManager().getStatusClient().doStatus(file, false);\r
-                               \r
-                               SVNInfo info = client.doInfo(file, SVNRevision.WORKING);\r
-                               if (dirOnly) {\r
-                                       if (file.isDirectory())\r
-                                               res.add(new SvnAjxpFile(info, path));\r
-                               } else {\r
-                                       res.add(new SvnAjxpFile(info, path));\r
-                               }\r
-                       }\r
-                       return res;\r
-               } catch (SVNException e) {\r
-                       throw new AjxpDriverException("Cannot list svn dir " + path, e);\r
-               }\r
-       }\r
-\r
-       @Override\r
-       protected FileFilter createFileFilter(File dir) {\r
-               return new FileFilter() {\r
-\r
-                       public boolean accept(File pathname) {\r
-                               if (pathname.getName().equals(".svn")) {\r
-                                       return false;\r
-                               } else {\r
-                                       return true;\r
-                               }\r
-                       }\r
-\r
-               };\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnMkdirAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnMkdirAction.java
deleted file mode 100644 (file)
index 21cbaaa..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.ajaxplorer.svn;\r
-\r
-import java.io.File;\r
-\r
-import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
-import org.argeo.slc.web.ajaxplorer.file.FileMkdirAction;\r
-import org.tmatesoft.svn.core.SVNException;\r
-\r
-public class SvnMkdirAction extends FileMkdirAction<SvnDriver> {\r
-       @Override\r
-       protected void postProcess(SvnDriver driver, File newDir) {\r
-               try {\r
-                       driver.beginWriteAction(newDir.getParentFile());\r
-\r
-                       log.debug("SVN Add: " + newDir);\r
-                       driver.getManager().getWCClient().doAdd(newDir, true,\r
-                                       newDir.isDirectory(), true, true);\r
-\r
-                       driver.commitAll("Commit new dir " + newDir.getName());\r
-                       driver.completeWriteAction(newDir.getParentFile());\r
-               } catch (SVNException e) {\r
-                       throw new AjxpDriverException("Cannot commit new dir" + newDir, e);\r
-               } finally {\r
-                       driver.rollbackWriteAction(newDir.getParentFile());\r
-               }\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnUploadAction.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/svn/SvnUploadAction.java
deleted file mode 100644 (file)
index bcc9f6a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.ajaxplorer.svn;\r
-\r
-import java.io.File;\r
-\r
-import org.argeo.slc.web.ajaxplorer.AjxpDriverException;\r
-import org.argeo.slc.web.ajaxplorer.file.FileUploadAction;\r
-import org.tmatesoft.svn.core.SVNException;\r
-\r
-public class SvnUploadAction extends FileUploadAction<SvnDriver> {\r
-       @Override\r
-       protected void postProcess(SvnDriver driver, File file) {\r
-               try {\r
-                       driver.beginWriteAction(file.getParentFile());\r
-\r
-                       log.debug("SVN Add: " + file);\r
-                       driver.getManager().getWCClient().doAdd(file, true,\r
-                                       file.isDirectory(), true, true);\r
-\r
-                       driver.commitAll("Commit file " + file.getName());\r
-                       driver.completeWriteAction(file.getParentFile());\r
-               } catch (SVNException e) {\r
-                       throw new AjxpDriverException("Cannot commit file " + file, e);\r
-               } finally {\r
-                       driver.rollbackWriteAction(file.getParentFile());\r
-               }\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/AbstractServiceController.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/AbstractServiceController.java
deleted file mode 100644 (file)
index e4ebd50..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.argeo.slc.msg.ExecutionAnswer;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.mvc.AbstractController;
-
-public abstract class AbstractServiceController extends AbstractController {
-       public final static String KEY_ANSWER = "__answer";
-
-       private String viewName = null;
-
-       @Override
-       protected final ModelAndView handleRequestInternal(
-                       HttpServletRequest request, HttpServletResponse response)
-                       throws Exception {
-               ModelAndView mv = new ModelAndView();
-               mv.setViewName(getViewName());
-               try {
-                       handleServiceRequest(request, response, mv);
-               } catch (Exception e) {
-                       e.printStackTrace();
-                       StringWriter writer = new StringWriter();
-                       e.printStackTrace(new PrintWriter(writer));
-                       ExecutionAnswer answer = ExecutionAnswer.error(writer.toString());
-                       ModelAndView errorMv = new ModelAndView();
-                       errorMv.addObject(KEY_ANSWER, answer);
-                       errorMv.setViewName(KEY_ANSWER);
-                       return errorMv;
-               }
-
-               if (mv.getModel().size() == 0) {
-                       mv.addObject(KEY_ANSWER, ExecutionAnswer
-                                       .ok("Execution completed properly"));
-               }
-
-               if (mv.getViewName() == null && mv.getModel().size() == 1)
-                       mv.setViewName(mv.getModel().keySet().iterator().next().toString());
-
-               return mv;
-       }
-
-       protected abstract void handleServiceRequest(HttpServletRequest request,
-                       HttpServletResponse response, ModelAndView modelAndView)
-                       throws Exception;
-
-       public void setViewName(String viewName) {
-               this.viewName = viewName;
-       }
-
-       public String getViewName() {
-               return viewName;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/FileUploadBean.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/FileUploadBean.java
deleted file mode 100644 (file)
index b711300..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc;
-
-
-public class FileUploadBean {
-       private byte[] file;
-
-       public void setFile(byte[] file) {
-               this.file = file;
-       }
-
-       public byte[] getFile() {
-               return file;
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/JsonView.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/JsonView.java
deleted file mode 100644 (file)
index 25f96cf..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc;
-
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.argeo.slc.SlcException;
-import org.springframework.web.servlet.view.AbstractView;
-
-import com.springsource.json.writer.JSONObject;
-
-/** Marshal one of the object of the map to the output. */
-public class JsonView extends AbstractView {
-       private String modelKey = null;
-
-       public JsonView() {
-       }
-
-       @Override
-       @SuppressWarnings(value = { "unchecked" })
-       protected void renderMergedOutputModel(Map model,
-                       HttpServletRequest request, HttpServletResponse response)
-                       throws Exception {
-               final Object answer;
-               if (modelKey != null) {
-                       if (!model.containsKey(modelKey))
-                               throw new SlcException("Key " + modelKey
-                                               + " not found in model.");
-                       answer = model.get(modelKey);
-               } else {
-                       if (model.size() != 1)
-                               throw new SlcException(
-                                               "Model has a size different from 1. Specify a modelKey.");
-                       answer = model.values().iterator().next();
-               }
-
-               if (answer instanceof JSONObject) {
-                       ((JSONObject) answer).write(response.getWriter());
-               } else {
-                       JSONObject jsonObject = new JSONObject(answer);
-                       jsonObject.write(response.getWriter());
-               }
-       }
-
-       public void setModelKey(String modelKey) {
-               this.modelKey = modelKey;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/ResultExcelView.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/ResultExcelView.java
deleted file mode 100644 (file)
index 91ef9af..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc;
-
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import jxl.write.Label;
-import jxl.write.WritableSheet;
-import jxl.write.WritableWorkbook;
-
-import org.argeo.slc.SlcException;
-import org.argeo.slc.core.structure.tree.TreeSPath;
-import org.argeo.slc.core.test.SlcTestUtils;
-import org.argeo.slc.core.test.tree.PartSubList;
-import org.argeo.slc.core.test.tree.TreeTestResult;
-import org.argeo.slc.test.TestResultPart;
-import org.springframework.web.servlet.view.document.AbstractJExcelView;
-
-public class ResultExcelView extends AbstractJExcelView {
-       public final static String MODELKEY_RESULT = "result";
-
-       
-       @SuppressWarnings(value = { "unchecked" })
-       protected void buildExcelDocument(Map model, WritableWorkbook workbook,
-                       HttpServletRequest request, HttpServletResponse response) {
-               try {
-                       if (workbook.getNumberOfSheets() == 0) {
-                               workbook.createSheet("SLC", 0);
-                       }
-                       WritableSheet sheet = workbook.getSheet("SLC");
-
-                       TreeTestResult ttr = (TreeTestResult) model
-                                       .get(MODELKEY_RESULT);
-
-                       sheet.addCell(new Label(0, 0, "Result " + ttr.getUuid()));
-
-                       int currentRow = 1;
-                       for (TreeSPath path : ttr.getResultParts().keySet()) {
-                               PartSubList lst = ttr.getResultParts().get(path);
-                               sheet.addCell(new Label(0, currentRow, "Path " + path));
-                               currentRow++;
-                               for (TestResultPart part : lst.getParts()) {
-                                       sheet.addCell(new Label(0, currentRow, SlcTestUtils
-                                                       .statusToString(part.getStatus())));
-                                       sheet.addCell(new Label(1, currentRow, part.getMessage()));
-                                       currentRow++;
-                               }
-                               currentRow++;// add an empty line between paths
-                       }
-               } catch (Exception e) {
-                       throw new SlcException("Could not write spreadsheet.", e);
-               }
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/ResultPdfView.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/ResultPdfView.java
deleted file mode 100644 (file)
index 7891e18..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc;
-
-import java.awt.Color;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.argeo.slc.core.structure.tree.TreeSPath;
-import org.argeo.slc.core.test.SlcTestUtils;
-import org.argeo.slc.core.test.tree.PartSubList;
-import org.argeo.slc.core.test.tree.TreeTestResult;
-import org.argeo.slc.test.TestResultPart;
-import org.argeo.slc.test.TestStatus;
-import org.springframework.web.servlet.view.document.AbstractPdfView;
-
-import com.lowagie.text.Cell;
-import com.lowagie.text.Document;
-import com.lowagie.text.Paragraph;
-import com.lowagie.text.Table;
-import com.lowagie.text.pdf.PdfWriter;
-
-public class ResultPdfView extends AbstractPdfView {
-       // private static final Log log = LogFactory.getLog(ResultPdfView.class);
-
-       public final static String MODELKEY_RESULT = "result";
-
-       @Override
-       @SuppressWarnings(value = { "unchecked" })
-       protected void buildPdfDocument(Map model, Document document,
-                       PdfWriter writer, HttpServletRequest request,
-                       HttpServletResponse response) throws Exception {
-               TreeTestResult ttr = (TreeTestResult) model.get(MODELKEY_RESULT);
-
-               document.addTitle("Result " + ttr.getUuid());
-               document.add(new Paragraph("Result " + ttr.getUuid()));
-
-               for (TreeSPath path : ttr.getResultParts().keySet()) {
-                       PartSubList lst = ttr.getResultParts().get(path);
-                       document.add(new Paragraph("Path " + path));
-                       Table table = new Table(2, lst.getParts().size());
-                       for (TestResultPart part : lst.getParts()) {
-                               Integer status = part.getStatus();
-                               Cell statusCell = new Cell(SlcTestUtils.statusToString(status));
-                               final Color color;
-                               if (status.equals(TestStatus.PASSED))
-                                       color = Color.GREEN;
-                               else if (status.equals(TestStatus.FAILED))
-                                       color = Color.RED;
-                               else
-                                       color = Color.MAGENTA;
-
-                               statusCell.setBackgroundColor(color);
-                               table.addCell(statusCell);
-                               table.addCell(part.getMessage());
-                       }
-                       document.add(table);
-               }
-
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/WebSlcEventListenerRegister.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/WebSlcEventListenerRegister.java
deleted file mode 100644 (file)
index a671a72..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-
-import org.argeo.slc.msg.event.SlcEventListenerDescriptor;
-import org.argeo.slc.msg.event.SlcEventListenerRegister;
-import org.springframework.web.context.request.RequestContextHolder;
-
-public class WebSlcEventListenerRegister implements SlcEventListenerRegister,
-               Serializable {
-       public final static String ATTR_EVENT_LISTENER = "slcEventListener";
-
-       static final long serialVersionUID = 1l;
-
-       // private String clientId = UUID.randomUUID().toString();
-
-       /** Synchronized */
-       private List<SlcEventListenerDescriptor> descriptors = new Vector<SlcEventListenerDescriptor>();
-
-       public synchronized void addEventListenerDescriptor(
-                       SlcEventListenerDescriptor eventListenerDescriptor) {
-               if (descriptors.contains(eventListenerDescriptor))
-                       descriptors.remove(eventListenerDescriptor);
-               descriptors.add(eventListenerDescriptor);
-       }
-
-       public synchronized void removeEventListenerDescriptor(
-                       SlcEventListenerDescriptor eventListenerDescriptor) {
-               descriptors.remove(eventListenerDescriptor);
-       }
-
-       public synchronized List<SlcEventListenerDescriptor> getDescriptorsCopy() {
-               return new ArrayList<SlcEventListenerDescriptor>(descriptors);
-       }
-
-       public String getId() {
-               return RequestContextHolder.currentRequestAttributes().getSessionId();
-       }
-
-       // public SlcEvent listen(SlcEventListener eventListener, Long timeout) {
-       // return eventListener.listen(clientId, getDescriptorsCopy(), timeout);
-       // }
-
-       // public void init() {
-       // clientId = getSessionId();
-       // checkClientId();
-       //
-       // if (log.isDebugEnabled())
-       // log.debug("Initialized web event listener " + clientId);
-       // }
-       //
-       // public void close() {
-       // checkClientId();
-       // if (log.isDebugEnabled())
-       // log.debug("Closed web event listener " + clientId);
-       // }
-
-       // protected void checkClientId() {
-       // String sessionId = getSessionId();
-       // if (clientId == null || !clientId.equals(sessionId))
-       // throw new SlcException("Client id " + clientId
-       // + " not consistent with web session id " + sessionId);
-       // }
-       //
-       // protected String getSessionId() {
-       // return RequestContextHolder.currentRequestAttributes().getSessionId();
-       // }
-       //
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/XsltMarshallerView.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/XsltMarshallerView.java
deleted file mode 100644 (file)
index 4d1d50e..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.mvc;\r
-\r
-import javax.xml.parsers.DocumentBuilderFactory;\r
-import javax.xml.transform.Source;\r
-import javax.xml.transform.dom.DOMResult;\r
-import javax.xml.transform.dom.DOMSource;\r
-\r
-import org.argeo.slc.SlcException;\r
-import org.argeo.slc.core.test.tree.TreeTestResult;\r
-import org.argeo.slc.core.test.tree.TreeTestResultCollection;\r
-import org.argeo.slc.process.SlcExecution;\r
-import org.springframework.oxm.Marshaller;\r
-import org.springframework.web.servlet.view.xslt.XsltView;\r
-import org.w3c.dom.Document;\r
-\r
-public class XsltMarshallerView extends XsltView {\r
-\r
-       private Marshaller marshaller;\r
-\r
-       @Override\r
-       protected Class<?>[] getSourceTypes() {\r
-               return new Class[] { TreeTestResult.class,\r
-                               TreeTestResultCollection.class, SlcExecution.class };\r
-       }\r
-\r
-       @Override\r
-       protected Source convertSource(Object source) throws Exception {\r
-               Document document = DocumentBuilderFactory.newInstance()\r
-                               .newDocumentBuilder().newDocument();\r
-               DOMResult result = new DOMResult(document);\r
-               if (!marshaller.supports(source.getClass()))\r
-                       throw new SlcException("Object of type " + source.getClass()\r
-                                       + " not supported.");\r
-               marshaller.marshal(source, result);\r
-               return new DOMSource(result.getNode());\r
-       }\r
-\r
-       public void setMarshaller(Marshaller marshaller) {\r
-               this.marshaller = marshaller;\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/XsltMarshallerViewResolver.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/XsltMarshallerViewResolver.java
deleted file mode 100644 (file)
index 55e44de..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.mvc;\r
-\r
-import java.io.IOException;\r
-import java.util.Map;\r
-import java.util.TreeMap;\r
-\r
-import javax.xml.transform.Source;\r
-import javax.xml.transform.TransformerException;\r
-import javax.xml.transform.URIResolver;\r
-import javax.xml.transform.stream.StreamSource;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.argeo.slc.SlcException;\r
-import org.springframework.core.io.Resource;\r
-import org.springframework.oxm.Marshaller;\r
-import org.springframework.web.servlet.view.AbstractUrlBasedView;\r
-import org.springframework.web.servlet.view.xslt.XsltViewResolver;\r
-\r
-/**\r
- * Xslt View resolver implementing URI resolver as well.\r
- * \r
- * @see URIResolver\r
- * @see XsltViewResolver\r
- */\r
-public class XsltMarshallerViewResolver extends XsltViewResolver implements\r
-               URIResolver {\r
-       private final static Log log = LogFactory\r
-                       .getLog(XsltMarshallerViewResolver.class);\r
-\r
-       private Marshaller marshaller;\r
-       private Map<String, Source> cacheUriResolver = new TreeMap<String, Source>();\r
-\r
-       public XsltMarshallerViewResolver() {\r
-               setUriResolver(this);\r
-       }\r
-\r
-       @Override\r
-       protected AbstractUrlBasedView buildView(String viewName) throws Exception {\r
-               AbstractUrlBasedView viewT = super.buildView(viewName);\r
-               XsltMarshallerView view = (XsltMarshallerView) viewT;\r
-               view.setMarshaller(marshaller);\r
-               return view;\r
-       }\r
-\r
-       public void setMarshaller(Marshaller marshaller) {\r
-               this.marshaller = marshaller;\r
-       }\r
-\r
-       public Source resolve(String href, String base) throws TransformerException {\r
-               if (log.isTraceEnabled())\r
-                       log.trace("Resolve URI for href=" + href + " base=" + base);\r
-\r
-               Source res = null;\r
-               if (isCache())\r
-                       res = cacheUriResolver.get(href);\r
-\r
-               if (res == null)\r
-                       res = getStylesheetSource(href);\r
-\r
-               if (res == null)\r
-                       res = getStylesheetSource(getPrefix() + href);\r
-\r
-               if (res == null)\r
-                       throw new SlcException("Can't resolve URI for href=" + href\r
-                                       + " base=" + base);\r
-\r
-               if (isCache() && !cacheUriResolver.containsKey(href))\r
-                       cacheUriResolver.put(href, res);\r
-\r
-               return res;\r
-       }\r
-\r
-       protected Source getStylesheetSource(String url) {\r
-               if (log.isDebugEnabled()) {\r
-                       log.debug("Loading XSLT stylesheet from '" + url + "'");\r
-               }\r
-               try {\r
-                       final Resource stylesheetResource = getApplicationContext()\r
-                                       .getResource(url);\r
-                       String systemId = url.substring(0, url.lastIndexOf('/') + 1);\r
-                       return new StreamSource(stylesheetResource.getInputStream(),\r
-                                       systemId);\r
-               } catch (IOException e) {\r
-                       if (log.isTraceEnabled())\r
-                               log.trace("Cannot load stylesheet " + url, e);\r
-                       return null;\r
-               }\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/AgentController.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/AgentController.java
deleted file mode 100644 (file)
index 79f8c24..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.mvc.controllers;\r
-\r
-import java.util.List;\r
-import java.util.Vector;\r
-\r
-import org.argeo.slc.dao.runtime.SlcAgentDescriptorDao;\r
-import org.argeo.slc.msg.ExecutionAnswer;\r
-import org.argeo.slc.msg.ObjectList;\r
-import org.argeo.slc.runtime.SlcAgentDescriptor;\r
-import org.springframework.stereotype.Controller;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-\r
-/**\r
- * Controle and information about the agents.\r
- */\r
-\r
-@Controller\r
-public class AgentController {\r
-\r
-       // IoC\r
-       private SlcAgentDescriptorDao slcAgentDescriptorDao;\r
-\r
-       @RequestMapping("/listAgents.service")\r
-       protected ObjectList listAgents() {\r
-               List<SlcAgentDescriptor> list = slcAgentDescriptorDao\r
-                               .listSlcAgentDescriptors();\r
-               return new ObjectList(list);\r
-       }\r
-\r
-       @RequestMapping("/cleanAgents.service")\r
-       protected ExecutionAnswer cleanAgents() {\r
-\r
-               List<SlcAgentDescriptor> list = slcAgentDescriptorDao\r
-                               .listSlcAgentDescriptors();\r
-               for (SlcAgentDescriptor t : new Vector<SlcAgentDescriptor>(list)) {\r
-                       slcAgentDescriptorDao.delete(t);\r
-               }\r
-               return ExecutionAnswer.ok("Execution completed properly");\r
-       }\r
-\r
-       // IoC\r
-       public void setSlcAgentDescriptorDao(\r
-                       SlcAgentDescriptorDao slcAgentDescriptorDao) {\r
-               this.slcAgentDescriptorDao = slcAgentDescriptorDao;\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/EventController.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/EventController.java
deleted file mode 100644 (file)
index 60218b9..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.mvc.controllers;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.argeo.slc.msg.ExecutionAnswer;\r
-import org.argeo.slc.msg.event.SlcEvent;\r
-import org.argeo.slc.msg.event.SlcEventListener;\r
-import org.argeo.slc.msg.event.SlcEventListenerDescriptor;\r
-import org.argeo.slc.msg.event.SlcEventListenerRegister;\r
-import org.springframework.stereotype.Controller;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestParam;\r
-\r
-@Controller\r
-public class EventController {\r
-\r
-       private final static Log log = LogFactory.getLog(EventController.class);\r
-\r
-       private Long defaultTimeout = 10000l;\r
-\r
-       // IoC\r
-       private SlcEventListener eventListener = null;\r
-       // the following bean as a Session scope.\r
-       private SlcEventListenerRegister eventListenerRegister;\r
-\r
-       // Business Methods\r
-       @RequestMapping("/addEventListener.service")\r
-       public ExecutionAnswer addEventListener(\r
-                       @RequestParam(SlcEvent.EVENT_TYPE) String eventType,\r
-                       @RequestParam(value = SlcEvent.EVENT_FILTER, required = false) String eventFilter) {\r
-\r
-               eventListenerRegister\r
-                               .addEventListenerDescriptor(new SlcEventListenerDescriptor(\r
-                                               eventType, eventFilter));\r
-               if (log.isTraceEnabled()) {\r
-                       log.trace("Registered listener on register "\r
-                                       + eventListenerRegister.getId() + " for type " + eventType\r
-                                       + ", filter=" + eventFilter);\r
-                       log.trace("Nb of registered descriptors : "\r
-                                       + eventListenerRegister.getDescriptorsCopy().size());\r
-               }\r
-               return ExecutionAnswer.ok("Execution completed properly");\r
-\r
-       }\r
-\r
-       @RequestMapping("/removeEventListener.service")\r
-       public ExecutionAnswer removeEventListener(\r
-                       @RequestParam(SlcEvent.EVENT_TYPE) String eventType,\r
-                       @RequestParam(value = SlcEvent.EVENT_FILTER, required = false) String eventFilter) {\r
-\r
-               eventListenerRegister\r
-                               .removeEventListenerDescriptor(new SlcEventListenerDescriptor(\r
-                                               eventType, eventFilter));\r
-               if (log.isTraceEnabled()) {\r
-                       log.trace("Removed listener from register "\r
-                                       + eventListenerRegister.getId() + " for type " + eventType\r
-                                       + ", filter=" + eventFilter);\r
-                       log.trace("Nb of registered descriptors : "\r
-                                       + eventListenerRegister.getDescriptorsCopy().size());\r
-               }\r
-               return ExecutionAnswer.ok("Execution completed properly");\r
-       }\r
-\r
-       @RequestMapping("/pollEvent.service")\r
-       public Object pollEvent(\r
-                       @RequestParam(value = "timeout", required = false) String timeoutStr) {\r
-               final Long timeout;\r
-               if (timeoutStr != null)\r
-                       timeout = Long.parseLong(timeoutStr);\r
-               else\r
-                       timeout = defaultTimeout;\r
-               if (log.isTraceEnabled()) {\r
-                       log.trace("Begin poolEvent.service :"\r
-                                       + " Nb of registered descriptors : "\r
-                                       + eventListenerRegister.getDescriptorsCopy().size());\r
-               }\r
-               SlcEvent event = eventListener.listen(eventListenerRegister.getId(),\r
-                               eventListenerRegister.getDescriptorsCopy(), timeout);\r
-               if (event != null) {\r
-                       if (log.isTraceEnabled())\r
-                               log.trace("Event heard : " + event.toString());\r
-                       return event;\r
-               } else {\r
-                       if (log.isTraceEnabled())\r
-                               log.trace("No Event heard - Time out: ");\r
-                       return ExecutionAnswer.ok("Execution completed properly");\r
-               }\r
-\r
-       }\r
-\r
-       public void setEventListenerRegister(\r
-                       SlcEventListenerRegister eventListenerRegister) {\r
-               this.eventListenerRegister = eventListenerRegister;\r
-       }\r
-\r
-       public void setDefaultTimeout(Long defaultTimeout) {\r
-               this.defaultTimeout = defaultTimeout;\r
-       }\r
-\r
-       public void setEventListener(SlcEventListener eventListener) {\r
-               this.eventListener = eventListener;\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ProcessController.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ProcessController.java
deleted file mode 100644 (file)
index 579b5bf..0000000
+++ /dev/null
@@ -1,278 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.mvc.controllers;\r
-\r
-import java.io.BufferedReader;\r
-import java.text.SimpleDateFormat;\r
-import java.util.Comparator;\r
-import java.util.List;\r
-import java.util.SortedSet;\r
-import java.util.TreeSet;\r
-import java.util.UUID;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.argeo.slc.SlcException;\r
-import org.argeo.slc.core.attachment.AttachmentsStorage;\r
-import org.argeo.slc.dao.process.SlcExecutionDao;\r
-import org.argeo.slc.execution.ExecutionModuleDescriptor;\r
-import org.argeo.slc.msg.ExecutionAnswer;\r
-import org.argeo.slc.msg.MsgConstants;\r
-import org.argeo.slc.msg.ObjectList;\r
-import org.argeo.slc.process.SlcExecution;\r
-import org.argeo.slc.process.SlcExecutionStep;\r
-import org.argeo.slc.runtime.SlcAgent;\r
-import org.argeo.slc.runtime.SlcAgentFactory;\r
-import org.argeo.slc.services.SlcExecutionService;\r
-import org.springframework.oxm.Marshaller;\r
-import org.springframework.oxm.Unmarshaller;\r
-import org.springframework.stereotype.Controller;\r
-import org.springframework.ui.Model;\r
-import org.springframework.util.Assert;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestParam;\r
-import org.springframework.xml.transform.StringSource;\r
-\r
-@Controller\r
-public class ProcessController {\r
-\r
-       private final static Log log = LogFactory.getLog(ProcessController.class);\r
-\r
-       private SlcExecutionDao slcExecutionDao;\r
-       private SlcAgentFactory agentFactory;\r
-       private Unmarshaller unmarshaller;\r
-       private Marshaller marshaller;\r
-       private SlcExecutionService slcExecutionService;\r
-       private AttachmentsStorage attachmentsStorage;\r
-\r
-       private SlcExecutionManager slcExecutionManager;\r
-\r
-       @RequestMapping("/listSlcExecutions.service")\r
-       protected ObjectList listSlcExecutions() {\r
-               List<SlcExecution> list = slcExecutionDao.listSlcExecutions();\r
-               return new ObjectList(list);\r
-       }\r
-\r
-       @RequestMapping("/getExecutionDescriptor.service")\r
-       protected ExecutionModuleDescriptor getExecutionDescriptor(\r
-                       @RequestParam String agentId, @RequestParam String moduleName,\r
-                       @RequestParam String version) {\r
-\r
-               SlcAgent slcAgent = agentFactory.getAgent(agentId);\r
-\r
-               ExecutionModuleDescriptor md = slcAgent.getExecutionModuleDescriptor(\r
-                               moduleName, version);\r
-               return md;\r
-       }\r
-\r
-       @RequestMapping("/listModulesDescriptors.service")\r
-       protected ObjectList listModulesDescriptors(@RequestParam String agentId) {\r
-               // TODO: use centralized agentId property (from MsgConstants)?\r
-               SlcAgent slcAgent = agentFactory.getAgent(agentId);\r
-\r
-               List<ExecutionModuleDescriptor> descriptors = slcAgent\r
-                               .listExecutionModuleDescriptors();\r
-               SortedSet<ExecutionModuleDescriptor> set = new TreeSet<ExecutionModuleDescriptor>(\r
-                               new Comparator<ExecutionModuleDescriptor>() {\r
-\r
-                                       public int compare(ExecutionModuleDescriptor md1,\r
-                                                       ExecutionModuleDescriptor md2) {\r
-                                               String str1 = md1.getLabel() != null ? md1.getLabel()\r
-                                                               : md1.getName();\r
-                                               String str2 = md2.getLabel() != null ? md2.getLabel()\r
-                                                               : md2.getName();\r
-                                               return str1.compareTo(str2);\r
-                                       }\r
-                               });\r
-               set.addAll(descriptors);\r
-               return new ObjectList(set);\r
-       }\r
-\r
-       @RequestMapping("/getSlcExecution.service")\r
-       protected SlcExecution getSlcExecution(@RequestParam String uuid) {\r
-               SlcExecution slcExecution = slcExecutionDao.getSlcExecution(uuid);\r
-               initializeSEM();\r
-               slcExecutionManager.retrieveRealizedFlows(slcExecution);\r
-               return slcExecution;\r
-       }\r
-\r
-       @RequestMapping("/newSlcExecution.service")\r
-       protected ExecutionAnswer newSlcExecution(HttpServletRequest request,\r
-                       Model model) throws Exception {\r
-\r
-               String agentId = request\r
-                               .getParameter(MsgConstants.PROPERTY_SLC_AGENT_ID);\r
-               Assert.notNull(agentId, "agent id");\r
-\r
-               String answer = request.getParameter("body");\r
-               if (answer == null) {\r
-                       // lets read the message body instead\r
-                       BufferedReader reader = request.getReader();\r
-                       StringBuffer buffer = new StringBuffer();\r
-                       String line = null;\r
-                       while (((line = reader.readLine()) != null)) {\r
-                               buffer.append(line);\r
-                       }\r
-                       answer = buffer.toString();\r
-               }\r
-\r
-               if (log.isTraceEnabled())\r
-                       log.debug("Received message:\n" + answer);\r
-\r
-               StringSource source = new StringSource(answer);\r
-               SlcExecution slcExecution = (SlcExecution) unmarshaller\r
-                               .unmarshal(source);\r
-\r
-               // Workaround for https://www.argeo.org/bugzilla/show_bug.cgi?id=86\r
-               if (slcExecution.getUuid() == null\r
-                               || slcExecution.getUuid().length() < 8)\r
-                       slcExecution.setUuid(UUID.randomUUID().toString());\r
-\r
-               slcExecution.setStatus(SlcExecution.SCHEDULED);\r
-               slcExecution.getSteps().add(\r
-                               new SlcExecutionStep(SlcExecutionStep.START,\r
-                                               "Process started from the Web UI"));\r
-\r
-               initializeSEM();\r
-               slcExecutionManager.storeRealizedFlows(slcExecution);\r
-               slcExecutionService.newExecution(slcExecution);\r
-               SlcAgent agent = agentFactory.getAgent(agentId);\r
-               //agent.runSlcExecution(slcExecution);\r
-\r
-               return ExecutionAnswer.ok("Execution completed properly");\r
-       }\r
-\r
-       @RequestMapping("/tailSlcExecutionStepsCount.service")\r
-       protected ObjectList tailSlcExecutionSteps(@RequestParam String uuid,\r
-                       @RequestParam Integer stepCount) {\r
-               List<SlcExecutionStep> list = slcExecutionDao\r
-                               .tailSteps(uuid, stepCount);\r
-               return new ObjectList(list);\r
-       }\r
-\r
-       @RequestMapping("/tailSlcExecutionStepsOffset.service")\r
-       protected ObjectList tailSlcExecutionSteps(@RequestParam String uuid,\r
-                       @RequestParam String stepOffsetUuid) {\r
-               List<SlcExecutionStep> list = slcExecutionDao.tailSteps(uuid,\r
-                               stepOffsetUuid);\r
-               return new ObjectList(list);\r
-       }\r
-\r
-       @RequestMapping("/downloadSlcExecution.service")\r
-       protected void downloadSlcExecution(@RequestParam String uuid,\r
-                       @RequestParam String ext, HttpServletResponse response)\r
-                       throws Exception {\r
-               String contentType;\r
-               // cf. http://en.wikipedia.org/wikServicei/Internet_media_type\r
-               if ("csv".equals(ext))\r
-                       contentType = "text/csv";\r
-               else if ("pdf".equals(ext))\r
-                       contentType = "application/pdf";\r
-               else if ("zip".equals(ext))\r
-                       contentType = "application/zip";\r
-               else if ("html".equals(ext))\r
-                       contentType = "application/html";\r
-               else if ("txt".equals(ext) || "log".equals(ext))\r
-                       contentType = "text/plain";\r
-               else if ("doc".equals(ext) || "docx".equals(ext))\r
-                       contentType = "application/msword";\r
-               else if ("xls".equals(ext) || "xlsx".equals(ext))\r
-                       contentType = "application/vnd.ms-excel";\r
-               else if ("xml".equals(ext))\r
-                       contentType = "text/xml";\r
-               else\r
-                       contentType = "Content-Type: application/force-download";\r
-\r
-               String name = "Process-" + uuid + "." + ext;\r
-\r
-               SlcExecution process = slcExecutionDao.getSlcExecution(uuid);\r
-\r
-               SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");\r
-\r
-               // TODO: put it in a separate view\r
-               if ("log".equals(ext)) {\r
-                       StringBuffer buf = new StringBuffer("");\r
-                       buf.append("#\n# PROCESS " + process.getUuid() + "\n#\n\n");\r
-                       buf\r
-                                       .append("Started at " + df.format(process.getStartDate())\r
-                                                       + "\n");\r
-                       buf.append("Ended at " + df.format(process.getEndDate()) + "\n");\r
-                       buf.append("On host " + process.getHost() + "\n");\r
-                       buf.append("\n# LOG\n\n");\r
-                       for (SlcExecutionStep step : process.getSteps()) {\r
-                               buf.append(df.format(step.getTimestamp()));\r
-                               buf.append(" ");\r
-                               for (int i = 0; i < step.getLogLines().size(); i++) {\r
-                                       if (i > 0)\r
-                                               buf.append('\n');\r
-                                       buf.append(step.getLogLines().get(i));\r
-                               }\r
-                               buf.append(" - ");\r
-                               buf.append(step.getType());\r
-                               buf.append(" - ");\r
-                               buf.append('[').append(step.getThread()).append(']');\r
-                               buf.append('\n');\r
-                       }\r
-                       prepareDownloadResponse(name, contentType, response);\r
-                       response.getWriter().print(buf);\r
-               } else {\r
-                       throw new SlcException("Unsupported content type " + contentType);\r
-               }\r
-       }\r
-\r
-       protected void prepareDownloadResponse(String name, String contentType,\r
-                       HttpServletResponse response) {\r
-               response.setHeader("Content-Disposition", "attachment; filename=\""\r
-                               + name + "\"");\r
-               response.setContentType(contentType + ";name=\"" + name + "\"");\r
-               response.setHeader("Expires", "0");\r
-               response.setHeader("Cache-Control", "no-cache, must-revalidate");\r
-               response.setHeader("Pragma", "no-cache");\r
-       }\r
-\r
-       private void initializeSEM() {\r
-               slcExecutionManager = new SlcExecutionManager(unmarshaller, marshaller,\r
-                               attachmentsStorage);\r
-       }\r
-\r
-       public void setSlcExecutionDao(SlcExecutionDao slcExecutionDao) {\r
-               this.slcExecutionDao = slcExecutionDao;\r
-       }\r
-\r
-       public void setSlcExecutionService(SlcExecutionService slcExecutionService) {\r
-               this.slcExecutionService = slcExecutionService;\r
-       }\r
-\r
-       public void setUnmarshaller(Unmarshaller unmarshaller) {\r
-               this.unmarshaller = unmarshaller;\r
-       }\r
-\r
-       public void setMarshaller(Marshaller marshaller) {\r
-               this.marshaller = marshaller;\r
-       }\r
-\r
-       public void setAttachmentsStorage(AttachmentsStorage attachmentsStorage) {\r
-               this.attachmentsStorage = attachmentsStorage;\r
-       }\r
-\r
-       public void setAgentFactory(SlcAgentFactory agentFactory) {\r
-               this.agentFactory = agentFactory;\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/RenderingResultController.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/RenderingResultController.java
deleted file mode 100644 (file)
index 58d423a..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.mvc.controllers;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-\r
-import org.argeo.slc.SlcException;\r
-import org.argeo.slc.core.test.tree.TreeTestResult;\r
-import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
-import org.springframework.stereotype.Controller;\r
-import org.springframework.ui.ModelMap;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestParam;\r
-\r
-/**\r
- * Sends back the results, rendered or as collection.\r
- */\r
-\r
-@Controller\r
-public class RenderingResultController {\r
-       // private static final Log log =\r
-       // LogFactory.getLog(RenderingResultController.class);\r
-\r
-       public final static String MODELKEY_RESULT = "result";\r
-\r
-       // IoC\r
-       private TreeTestResultDao treeTestResultDao;\r
-\r
-       @RequestMapping("/resultView.*")\r
-       public String getPdfResultView(@RequestParam("uuid") String uuid,\r
-                       ModelMap model, HttpServletRequest request) {\r
-\r
-               TreeTestResult result = treeTestResultDao.getTestResult(uuid);\r
-               if (result == null)\r
-                       throw new SlcException("No result found for uuid " + uuid);\r
-               model.addAttribute(MODELKEY_RESULT, result);\r
-\r
-               String docType = request.getRequestURI().substring(\r
-                               request.getRequestURI().lastIndexOf(".") + 1);\r
-\r
-               if ("pdf".equals(docType))\r
-                       return "resultPdfView";\r
-               if ("xls".equals(docType))\r
-                       return "resultExcelView";\r
-               if ("xslt".equals(docType))\r
-                       return "resultXsltView";\r
-               if ("xml".equals(docType))\r
-                       return "resultXmlView";\r
-\r
-               throw new SlcException("No renderer found for files of extension "\r
-                               + docType);\r
-       }\r
-\r
-       // IoC\r
-\r
-       public void setTreeTestResultDao(TreeTestResultDao treeTestResultDao) {\r
-               this.treeTestResultDao = treeTestResultDao;\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ResultController.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ResultController.java
deleted file mode 100644 (file)
index 0cf8fed..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.mvc.controllers;\r
-\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.SortedSet;\r
-\r
-import javax.servlet.ServletOutputStream;\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.apache.commons.io.FilenameUtils;\r
-import org.argeo.slc.SlcException;\r
-import org.argeo.slc.core.attachment.AttachmentsStorage;\r
-import org.argeo.slc.core.attachment.SimpleAttachment;\r
-import org.argeo.slc.core.test.tree.ResultAttributes;\r
-import org.argeo.slc.core.test.tree.TreeTestResult;\r
-import org.argeo.slc.core.test.tree.TreeTestResultCollection;\r
-import org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao;\r
-import org.argeo.slc.dao.test.tree.TreeTestResultDao;\r
-import org.argeo.slc.msg.ExecutionAnswer;\r
-import org.argeo.slc.msg.ObjectList;\r
-import org.argeo.slc.msg.ReferenceList;\r
-import org.argeo.slc.services.TestManagerService;\r
-import org.springframework.stereotype.Controller;\r
-import org.springframework.ui.Model;\r
-import org.springframework.util.PatternMatchUtils;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestParam;\r
-\r
-@Controller\r
-public class ResultController {\r
-\r
-       // private final static Log log =\r
-       // LogFactory.getLog(ServiceController.class);\r
-\r
-       // Constants\r
-       protected final String FORCE_DOWNLOAD = "Content-Type: application/force-download";\r
-\r
-       // IoC\r
-       private TreeTestResultDao treeTestResultDao;\r
-       private TreeTestResultCollectionDao treeTestResultCollectionDao;\r
-       private TestManagerService testManagerService;\r
-       private AttachmentsStorage attachmentsStorage;\r
-\r
-       // Business Methods\r
-       @RequestMapping("/getResult.service")\r
-       protected TreeTestResult getResult(\r
-                       @RequestParam(value = "uuid", required = false) String uuid) {\r
-\r
-               TreeTestResult result = treeTestResultDao.getTestResult(uuid);\r
-               if (result == null)\r
-                       throw new SlcException("No result found for uuid " + uuid);\r
-               return result;\r
-       }\r
-\r
-       @RequestMapping("/addResultToCollection.service")\r
-       protected ExecutionAnswer addResultToCollection(\r
-                       @RequestParam String collectionId, @RequestParam String resultUuid) {\r
-               testManagerService.addResultToCollection(collectionId, resultUuid);\r
-               return ExecutionAnswer.ok("Execution completed properly");\r
-       }\r
-\r
-       @RequestMapping("/removeResultFromCollection.service")\r
-       protected ExecutionAnswer removeResultFromCollection(\r
-                       HttpServletRequest request) {\r
-               String collectionId = request.getParameter("collectionId");\r
-               String[] resultUuids = request.getParameterValues("resultUuid");\r
-               String[] attrNames = request.getParameterValues("attrName");\r
-               String[] attrPatterns = request.getParameterValues("attrPattern");\r
-\r
-               // Checks\r
-               if (collectionId == null)\r
-                       throw new SlcException("A collection id must be specified");\r
-               if (attrNames != null\r
-                               && (attrPatterns == null || attrNames.length != attrPatterns.length))\r
-                       throw new SlcException(\r
-                                       "There must be as many attrName as attrPatterns");\r
-\r
-               // Remove specified results\r
-               if (resultUuids != null)\r
-                       for (String resultUuid : resultUuids)\r
-                               testManagerService.removeResultFromCollection(collectionId,\r
-                                               resultUuid);\r
-\r
-               if (attrNames != null) {\r
-                       TreeTestResultCollection sourceCollection = treeTestResultCollectionDao\r
-                                       .getTestResultCollection(collectionId);\r
-\r
-                       int index = 0;\r
-                       for (String attrName : attrNames) {\r
-                               String attrPattern = attrPatterns[index];// safe: checked above\r
-\r
-                               List<TreeTestResult> results = new ArrayList<TreeTestResult>(\r
-                                               sourceCollection.getResults());\r
-                               for (TreeTestResult treeTestResult : results) {\r
-                                       if (PatternMatchUtils.simpleMatch(attrPattern,\r
-                                                       treeTestResult.getAttributes().get(attrName))) {\r
-                                               testManagerService.removeResultFromCollection(\r
-                                                               collectionId, treeTestResult.getUuid());\r
-                                       }\r
-                               }\r
-                               index++;\r
-                       }\r
-               } else {\r
-                       if (resultUuids == null) {// no specs\r
-                               // remove all\r
-                               // TODO: optimize\r
-                               TreeTestResultCollection sourceCollection = treeTestResultCollectionDao\r
-                                               .getTestResultCollection(collectionId);\r
-                               List<TreeTestResult> results = new ArrayList<TreeTestResult>(\r
-                                               sourceCollection.getResults());\r
-                               for (TreeTestResult treeTestResult : results) {\r
-                                       testManagerService.removeResultFromCollection(collectionId,\r
-                                                       treeTestResult.getUuid());\r
-                               }\r
-\r
-                       }\r
-               }\r
-               return ExecutionAnswer.ok("Execution completed properly");\r
-       }\r
-\r
-       @RequestMapping("/listCollectionRefs.service")\r
-       protected ReferenceList listCollectionRefs(HttpServletRequest request,\r
-                       HttpServletResponse response) {\r
-\r
-               SortedSet<TreeTestResultCollection> results = treeTestResultCollectionDao\r
-                               .listCollections();\r
-\r
-               ReferenceList referenceList = new ReferenceList();\r
-               for (TreeTestResultCollection collection : results) {\r
-                       referenceList.getReferences().add(collection.getId());\r
-               }\r
-               return referenceList;\r
-       }\r
-\r
-       @RequestMapping("/listResultAttributes.service")\r
-       protected ObjectList listResultAttributes(@RequestParam String id,\r
-                       Model model) {\r
-\r
-               List<ResultAttributes> resultAttributes = treeTestResultCollectionDao\r
-                               .listResultAttributes(id);\r
-               return new ObjectList(resultAttributes);\r
-       }\r
-\r
-       @RequestMapping("/listResults.service")\r
-       @SuppressWarnings(value = { "unchecked" })\r
-       protected ObjectList listResults(\r
-                       @RequestParam(value = "collectionId", required = false) String collectionId,\r
-                       HttpServletRequest request) {\r
-               Map<String, String[]> parameterMap = request.getParameterMap();\r
-               Map<String, String> attributes = new HashMap<String, String>();\r
-               for (String parameter : parameterMap.keySet()) {\r
-                       if (parameter.startsWith("attr.")) {\r
-                               String key = parameter.substring("attr.".length());\r
-                               attributes.put(key, parameterMap.get(parameter)[0]);\r
-                       }\r
-               }\r
-\r
-               List<TreeTestResult> resultAttributes = treeTestResultCollectionDao\r
-                               .listResults(collectionId, attributes);\r
-               return new ObjectList(resultAttributes);\r
-       }\r
-\r
-       @RequestMapping("/copyCollectionToCollection.service")\r
-       protected ExecutionAnswer copyCollectionToCollection(\r
-                       @RequestParam String sourceCollectionId,\r
-                       @RequestParam String targetCollectionId, HttpServletRequest request) {\r
-\r
-               String[] attrNames = request.getParameterValues("attrName");\r
-               String[] attrPatterns = request.getParameterValues("attrPattern");\r
-\r
-               // Checks\r
-               if (sourceCollectionId == null || targetCollectionId == null)\r
-                       throw new SlcException(\r
-                                       "Source and target collection ids must be specified");\r
-               if (attrNames != null\r
-                               && (attrPatterns == null || attrNames.length != attrPatterns.length))\r
-                       throw new SlcException(\r
-                                       "There must be as many attrName as attrPatterns");\r
-\r
-               TreeTestResultCollection sourceCollection = treeTestResultCollectionDao\r
-                               .getTestResultCollection(sourceCollectionId);\r
-               if (attrNames != null) {\r
-                       int index = 0;\r
-                       for (String attrName : attrNames) {\r
-                               String attrPattern = attrPatterns[index];// safe: checked above\r
-\r
-                               for (TreeTestResult treeTestResult : sourceCollection\r
-                                               .getResults()) {\r
-                                       if (PatternMatchUtils.simpleMatch(attrPattern,\r
-                                                       treeTestResult.getAttributes().get(attrName))) {\r
-                                               testManagerService.addResultToCollection(\r
-                                                               targetCollectionId, treeTestResult.getUuid());\r
-                                       }\r
-                               }\r
-                               index++;\r
-                       }\r
-               } else {\r
-                       // remove all\r
-                       // TODO: optimize\r
-                       for (TreeTestResult treeTestResult : sourceCollection.getResults()) {\r
-                               testManagerService.addResultToCollection(targetCollectionId,\r
-                                               treeTestResult.getUuid());\r
-                       }\r
-               }\r
-               return ExecutionAnswer.ok("Execution completed properly");\r
-       }\r
-\r
-       @RequestMapping("/getAttachment.service")\r
-       protected void getAttachment(@RequestParam String uuid,\r
-                       @RequestParam String contentType, @RequestParam String name,\r
-                       HttpServletResponse response) throws Exception {\r
-               if (contentType == null || "".equals(contentType.trim())) {\r
-                       if (name != null) {\r
-                               contentType = FORCE_DOWNLOAD;\r
-                               String ext = FilenameUtils.getExtension(name);\r
-                               // cf. http://en.wikipedia.org/wikServicei/Internet_media_type\r
-                               if ("csv".equals(ext))\r
-                                       contentType = "text/csv";\r
-                               else if ("pdf".equals(ext))\r
-                                       contentType = "application/pdf";\r
-                               else if ("zip".equals(ext))\r
-                                       contentType = "application/zip";\r
-                               else if ("html".equals(ext))\r
-                                       contentType = "application/html";\r
-                               else if ("txt".equals(ext))\r
-                                       contentType = "text/plain";\r
-                               else if ("doc".equals(ext) || "docx".equals(ext))\r
-                                       contentType = "application/msword";\r
-                               else if ("xls".equals(ext) || "xlsx".equals(ext))\r
-                                       contentType = "application/vnd.ms-excel";\r
-                               else if ("xml".equals(ext))\r
-                                       contentType = "text/xml";\r
-                       }\r
-               }\r
-\r
-               if (name != null) {\r
-                       contentType = contentType + ";name=\"" + name + "\"";\r
-                       response.setHeader("Content-Disposition", "attachment; filename=\""\r
-                                       + name + "\"");\r
-               }\r
-               response.setHeader("Expires", "0");\r
-               response.setHeader("Cache-Control", "no-cache, must-revalidate");\r
-               response.setHeader("Pragma", "no-cache");\r
-\r
-               SimpleAttachment resourceDescriptor = new SimpleAttachment();\r
-               resourceDescriptor.setUuid(uuid);\r
-               resourceDescriptor.setContentType(contentType);\r
-\r
-               response.setContentType(contentType);\r
-               ServletOutputStream outputStream = response.getOutputStream();\r
-               attachmentsStorage.retrieveAttachment(resourceDescriptor, outputStream);\r
-       }\r
-\r
-       // IoC\r
-\r
-       public void setTreeTestResultDao(TreeTestResultDao treeTestResultDao) {\r
-               this.treeTestResultDao = treeTestResultDao;\r
-       }\r
-\r
-       public void setTestManagerService(TestManagerService testManagerService) {\r
-               this.testManagerService = testManagerService;\r
-       }\r
-\r
-       public void setTreeTestResultCollectionDao(\r
-                       TreeTestResultCollectionDao treeTestResultCollectionDao) {\r
-               this.treeTestResultCollectionDao = treeTestResultCollectionDao;\r
-       }\r
-\r
-       public void setAttachmentsStorage(AttachmentsStorage attachmentsStorage) {\r
-               this.attachmentsStorage = attachmentsStorage;\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ServerController.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/ServerController.java
deleted file mode 100644 (file)
index aabb7eb..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.mvc.controllers;\r
-\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-\r
-import org.apache.commons.fileupload.FileItem;\r
-import org.apache.commons.fileupload.FileItemFactory;\r
-import org.apache.commons.fileupload.disk.DiskFileItemFactory;\r
-import org.apache.commons.fileupload.servlet.ServletFileUpload;\r
-import org.argeo.slc.BasicNameVersion;\r
-import org.argeo.slc.NameVersion;\r
-import org.argeo.slc.core.build.ResourceDistribution;\r
-import org.argeo.slc.deploy.DynamicRuntime;\r
-import org.argeo.slc.deploy.Module;\r
-import org.argeo.slc.msg.ExecutionAnswer;\r
-import org.springframework.core.io.ByteArrayResource;\r
-import org.springframework.stereotype.Controller;\r
-import org.springframework.ui.Model;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestParam;\r
-\r
-/**\r
- * Sends back the results, rendered or as collection.\r
- */\r
-\r
-@Controller\r
-public class ServerController {\r
-\r
-       // IoC\r
-       private DynamicRuntime<?> dynamicRuntime;\r
-\r
-       // Create a factory for disk-based file items\r
-       private FileItemFactory factory = new DiskFileItemFactory();\r
-       // Create a new file upload handler\r
-       private ServletFileUpload upload = new ServletFileUpload(factory);\r
-\r
-       // SERVER HANDLING\r
-\r
-       @RequestMapping("/isServerReady.service")\r
-       protected ExecutionAnswer isServerReady(Model model) {\r
-               // Does nothing for now, it will return an OK answer.\r
-               return ExecutionAnswer.ok("Execution completed properly");\r
-       }\r
-\r
-       @RequestMapping("/shutdownRuntime.service")\r
-       protected ExecutionAnswer shutdownRuntime(Model model) {\r
-               new Thread() {\r
-                       public void run() {\r
-                               // wait in order to let call return\r
-                               try {\r
-                                       Thread.sleep(3000);\r
-                               } catch (InterruptedException e) {\r
-                                       // silent\r
-                               }\r
-                               dynamicRuntime.shutdown();\r
-                       }\r
-               }.start();\r
-               return ExecutionAnswer.ok("Server shutting down...");\r
-       }\r
-\r
-       // MODULE HANDLING\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @RequestMapping("/installModule.service")\r
-       public void installModule(HttpServletRequest request) throws Exception {\r
-\r
-               // TODO : handle the exception better\r
-\r
-               // Parse the request\r
-               List<FileItem> items = upload.parseRequest(request);\r
-\r
-               byte[] arr = null;\r
-               for (FileItem item : items) {\r
-                       if (!item.isFormField()) {\r
-                               arr = item.get();\r
-                               break;\r
-                       }\r
-               }\r
-\r
-               ByteArrayResource res = new ByteArrayResource(arr);\r
-               Module module = dynamicRuntime.installModule(new ResourceDistribution(\r
-                               res));\r
-               // TODO: customize whether the module is started or not\r
-               dynamicRuntime.startModule(module);\r
-       }\r
-\r
-       @RequestMapping("/uninstallModule.service")\r
-       public void uninstallModule(@RequestParam(value = "name") String name,\r
-                       @RequestParam(value = "version") String version) {\r
-               NameVersion nameVersion = new BasicNameVersion(name, version);\r
-               dynamicRuntime.uninstallModule(nameVersion);\r
-       }\r
-\r
-       // IoC\r
-       public void setDynamicRuntime(DynamicRuntime<?> dynamicRuntime) {\r
-               this.dynamicRuntime = dynamicRuntime;\r
-       }\r
-\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/SlcExecutionManager.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/controllers/SlcExecutionManager.java
deleted file mode 100644 (file)
index 3a07b79..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*\r
- * Copyright (C) 2007-2012 Mathieu Baudier\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.web.mvc.controllers;\r
-\r
-import java.io.ByteArrayInputStream;\r
-import java.io.ByteArrayOutputStream;\r
-import java.io.InputStream;\r
-import java.util.UUID;\r
-\r
-import javax.xml.transform.stream.StreamSource;\r
-\r
-import org.apache.commons.io.IOUtils;\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.argeo.slc.core.attachment.Attachment;\r
-import org.argeo.slc.core.attachment.AttachmentsStorage;\r
-import org.argeo.slc.core.attachment.SimpleAttachment;\r
-import org.argeo.slc.msg.ObjectList;\r
-import org.argeo.slc.process.SlcExecution;\r
-import org.springframework.oxm.Marshaller;\r
-import org.springframework.oxm.Unmarshaller;\r
-import org.springframework.xml.transform.StringResult;\r
-\r
-public class SlcExecutionManager {\r
-       private final static Log log = LogFactory.getLog(SlcExecutionManager.class);\r
-\r
-       private Unmarshaller unmarshaller;\r
-       private Marshaller marshaller;\r
-       private AttachmentsStorage attachmentsStorage;\r
-\r
-       public SlcExecutionManager(Unmarshaller unmarshaller,\r
-                       Marshaller marshaller, AttachmentsStorage attachmentsStorage) {\r
-\r
-               this.unmarshaller = unmarshaller;\r
-               this.marshaller = marshaller;\r
-               this.attachmentsStorage = attachmentsStorage;\r
-       }\r
-\r
-       void storeRealizedFlows(SlcExecution slcExecution) {\r
-\r
-               Attachment attachment = realizedFlowsAttachment(UUID.randomUUID()\r
-                               .toString(), slcExecution);\r
-               InputStream in = null;\r
-               try {\r
-                       ObjectList ol = new ObjectList(slcExecution.getRealizedFlows());\r
-                       StringResult result = new StringResult();\r
-                       marshaller.marshal(ol, result);\r
-                       in = new ByteArrayInputStream(result.toString().getBytes());\r
-                       attachmentsStorage.storeAttachment(attachment, in);\r
-\r
-                       slcExecution.setRealizedFlowsXml(attachment.getUuid());\r
-               } catch (Exception e) {\r
-                       log.error("Could not store realized flows as attachment #"\r
-                                       + attachment.getUuid(), e);\r
-               } finally {\r
-                       IOUtils.closeQuietly(in);\r
-               }\r
-       }\r
-\r
-       void retrieveRealizedFlows(SlcExecution slcExecution) {\r
-               Attachment attachment = realizedFlowsAttachment(slcExecution\r
-                               .getRealizedFlowsXml(), slcExecution);\r
-\r
-               ByteArrayOutputStream out = null;\r
-               ByteArrayInputStream in = null;\r
-               try {\r
-                       // TODO: optimize with piped streams\r
-                       out = new ByteArrayOutputStream();\r
-                       attachmentsStorage.retrieveAttachment(attachment, out);\r
-\r
-                       byte[] arr = out.toByteArray();\r
-                       in = new ByteArrayInputStream(arr);\r
-                       StreamSource source = new StreamSource(in);\r
-                       ObjectList ol = (ObjectList) unmarshaller.unmarshal(source);\r
-                       ol.fill(slcExecution.getRealizedFlows());\r
-               } catch (Exception e) {\r
-                       log.error("Could not retrieve realized flows from attachment #"\r
-                                       + attachment.getUuid(), e);\r
-               } finally {\r
-                       IOUtils.closeQuietly(in);\r
-                       IOUtils.closeQuietly(out);\r
-               }\r
-       }\r
-\r
-       /** Unify labeling in the package */\r
-       static Attachment realizedFlowsAttachment(String attachmentUuid,\r
-                       SlcExecution slcExecution) {\r
-               return new SimpleAttachment(attachmentUuid,\r
-                               "RealizedFlows of SlcExecution #" + slcExecution.getUuid(),\r
-                               "text/xml");\r
-       }\r
-}\r
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AbstractAvailableModules.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AbstractAvailableModules.java
deleted file mode 100644 (file)
index 90c8220..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc.provisioning;
-
-import java.io.IOException;
-import java.io.Writer;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.argeo.slc.NameVersion;
-import org.argeo.slc.build.ModularDistribution;
-import org.springframework.web.HttpRequestHandler;
-
-/** List of modules for a distribution. */
-public abstract class AbstractAvailableModules implements HttpRequestHandler {
-       protected abstract void print(Writer out, String baseUrl,
-                       ModularDistribution md) throws IOException;
-
-       public final void handleRequest(HttpServletRequest request,
-                       HttpServletResponse response) throws ServletException, IOException {
-               response.setContentType(getContentType());
-
-               ModularDistribution md = (ModularDistribution) request
-                               .getAttribute("modularDistribution");
-
-               String baseUrl = "http://" + request.getServerName() + ":"
-                               + request.getServerPort() + request.getContextPath()
-                               + request.getServletPath() + "/" + md.getName() + "/"
-                               + md.getVersion() + "/";
-
-               print(response.getWriter(), baseUrl, md);
-       }
-
-       public String getContentType() {
-               return "text/plain";
-       }
-
-       protected String jarUrl(String baseUrl, NameVersion nameVersion) {
-               return baseUrl + jarFileName(nameVersion);
-       }
-
-       protected String jarFileName(NameVersion nameVersion) {
-               return nameVersion.getName() + "-" + nameVersion.getVersion() + ".jar";
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AbstractProvisioningInterceptor.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AbstractProvisioningInterceptor.java
deleted file mode 100644 (file)
index 99f55f4..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc.provisioning;
-
-import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
-
-public abstract class AbstractProvisioningInterceptor extends
-               HandlerInterceptorAdapter {
-       
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableDistributions.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableDistributions.java
deleted file mode 100644 (file)
index b4aa3ed..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc.provisioning;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.argeo.slc.build.ModularDistribution;
-import org.springframework.web.HttpRequestHandler;
-
-/** List of distributions. */
-public class AvailableDistributions implements HttpRequestHandler {
-       private Set<ModularDistribution> modularDistributions;
-
-       public void handleRequest(HttpServletRequest request,
-                       HttpServletResponse response) throws ServletException, IOException {
-               response.setContentType("text/html");
-
-               String baseUrl = "http://" + request.getServerName() + ":"
-                               + request.getServerPort() + request.getContextPath()
-                               + request.getServletPath() + "/";
-
-               Writer out = response.getWriter();
-
-               out.write("<h1>Distributions</h1>");
-               for (Iterator<ModularDistribution> it = modularDistributions.iterator(); it
-                               .hasNext();) {
-                       ModularDistribution md = it.next();
-                       out.write("<h2>" + md + "</h2>");
-                       out.write("Modules: ");
-                       String moduleBase = baseUrl + md.getName() + "/" + md.getVersion()
-                                       + "/";
-
-                       String modulesListHtml = moduleBase + "modules.html";
-                       out.write(" <a href=\"" + modulesListHtml + "\">html</a>");
-
-                       String modulesListPlain = moduleBase + "modules";
-                       out.write(" <a href=\"" + modulesListPlain + "\">plain</a>");
-
-                       String modulesListOsgiBoot = moduleBase + "osgiBoot";
-                       out.write(" <a href=\"" + modulesListOsgiBoot + "\">osgiBoot</a>");
-
-                       out.write("<br/>");
-
-                       out.write("Eclipse update site: ");
-                       String updateSiteUrl = baseUrl + md.getName() + "/"
-                                       + md.getVersion() + "/site.xml";
-                       out.write("<a href=\"" + updateSiteUrl + "\">" + updateSiteUrl
-                                       + "</a>");
-               }
-       }
-
-       public void setModularDistributions(
-                       Set<ModularDistribution> modularDistributions) {
-               this.modularDistributions = modularDistributions;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesHtml.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesHtml.java
deleted file mode 100644 (file)
index 7fd83a0..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc.provisioning;
-
-import java.io.IOException;
-import java.io.Writer;
-
-import org.argeo.slc.NameVersion;
-import org.argeo.slc.build.Distribution;
-import org.argeo.slc.build.ModularDistribution;
-import org.argeo.slc.core.build.ResourceDistribution;
-
-/** List of modules for a distribution. */
-public class AvailableModulesHtml extends AbstractAvailableModules {
-       @Override
-       protected void print(Writer out, String baseUrl, ModularDistribution md)
-                       throws IOException {
-               out.write("<h1>Distribution " + md + "</h1>");
-
-               for (NameVersion nameVersion : md.listModulesNameVersions()) {
-                       Distribution distribution = md.getModuleDistribution(nameVersion
-                                       .getName(), nameVersion.getVersion());
-
-                       String moduleUrl = null;
-                       if (distribution instanceof ResourceDistribution) {
-                               String url = ((ResourceDistribution) distribution)
-                                               .getResource().getURL().toString();
-                               if (url.startsWith("reference:"))
-                                       moduleUrl = url;
-                       }
-
-                       if (moduleUrl == null)
-                               moduleUrl = jarUrl(baseUrl, nameVersion);
-
-                       out.write("<a href=\"" + moduleUrl + "\">"
-                                       + jarFileName(nameVersion) + "</a><br/>");
-               }
-       }
-
-       @Override
-       public String getContentType() {
-               return "text/html";
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesOsgiBoot.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesOsgiBoot.java
deleted file mode 100644 (file)
index 8c0a180..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc.provisioning;
-
-import java.io.IOException;
-import java.io.Writer;
-
-import org.argeo.slc.NameVersion;
-import org.argeo.slc.build.ModularDistribution;
-
-/** List of modules for a distribution. */
-public class AvailableModulesOsgiBoot extends AbstractAvailableModules {
-       private String separator = ",";
-
-       @Override
-       protected void print(Writer out, String baseUrl, ModularDistribution md)
-                       throws IOException {
-               for (NameVersion nameVersion : md.listModulesNameVersions()) {
-                       String fileName = nameVersion.getName() + "-"
-                                       + nameVersion.getVersion() + ".jar";
-                       String moduleUrl = baseUrl + fileName;
-                       out.write(nameVersion.getName() + separator
-                                       + nameVersion.getVersion() + separator + moduleUrl);
-                       out.write("\n");
-               }
-       }
-
-       public void setSeparator(String separator) {
-               this.separator = separator;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesPlain.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/AvailableModulesPlain.java
deleted file mode 100644 (file)
index 10cb52b..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc.provisioning;
-
-import java.io.IOException;
-import java.io.Writer;
-
-import org.argeo.slc.NameVersion;
-import org.argeo.slc.build.ModularDistribution;
-
-/** List of modules for a distribution. */
-public class AvailableModulesPlain extends AbstractAvailableModules {
-       @Override
-       protected void print(Writer out, String baseUrl, ModularDistribution md)
-                       throws IOException {
-               for (NameVersion nameVersion : md.listModulesNameVersions()) {
-                       String fileName = nameVersion.getName() + "-"
-                                       + nameVersion.getVersion() + ".jar";
-                       String moduleUrl = baseUrl + fileName;
-                       out.write(moduleUrl);
-                       out.write("\n");
-               }
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/BundleHandler.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/BundleHandler.java
deleted file mode 100644 (file)
index 94a48fe..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc.provisioning;
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.StreamReadable;
-import org.argeo.slc.UnsupportedException;
-import org.argeo.slc.build.Distribution;
-import org.argeo.slc.build.ModularDistribution;
-import org.springframework.web.HttpRequestHandler;
-
-public class BundleHandler implements HttpRequestHandler {
-       private final static Log log = LogFactory.getLog(BundleHandler.class);
-
-       public void handleRequest(HttpServletRequest request,
-                       HttpServletResponse response) throws ServletException, IOException {
-               String path = request.getPathInfo();
-
-               if (log.isDebugEnabled())
-                       log.debug("Bundle jar Requested: " + path);
-               response.setContentType("application/java-archive");
-
-               String moduleName = request.getParameter("moduleName");
-               if (moduleName == null)
-                       moduleName = request.getAttribute("moduleName").toString();
-               String moduleVersion = request.getParameter("moduleVersion");
-               if (moduleVersion == null)
-                       moduleVersion = request.getAttribute("moduleVersion").toString();
-
-               ModularDistribution modularDistribution = (ModularDistribution) request
-                               .getAttribute("modularDistribution");
-               Distribution distribution = modularDistribution.getModuleDistribution(
-                               moduleName, moduleVersion);
-               if (distribution instanceof StreamReadable)
-                       IOUtils.copy(((StreamReadable) distribution).getInputStream(),
-                                       response.getOutputStream());
-               else
-                       throw new UnsupportedException("distribution", distribution);
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/BundleJarInterceptor.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/BundleJarInterceptor.java
deleted file mode 100644 (file)
index 4821c09..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc.provisioning;
-
-import java.util.StringTokenizer;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.argeo.slc.SlcException;
-import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
-
-public class BundleJarInterceptor extends HandlerInterceptorAdapter {
-
-       @Override
-       public boolean preHandle(HttpServletRequest request,
-                       HttpServletResponse response, Object handler) throws Exception {
-               String path = request.getPathInfo();
-               StringTokenizer stS = new StringTokenizer(path, "/");
-               String fileName = null;
-               while (stS.hasMoreTokens()) {
-                       String token = stS.nextToken();
-                       if (!stS.hasMoreTokens()) {
-                               fileName = token;
-                       }
-               }
-
-               int ind_ = fileName.indexOf('-');
-               String moduleName;
-               if (ind_ > -1)
-                       moduleName = fileName.substring(0, ind_);
-               else
-                       throw new SlcException("Cannot determine version for " + fileName);
-
-               String versionAndExtension = fileName.substring(ind_ + 1);
-               int indExt = versionAndExtension.lastIndexOf('.');
-               String moduleVersion = versionAndExtension.substring(0, indExt);
-
-               request.setAttribute("moduleName", moduleName);
-               request.setAttribute("moduleVersion", moduleVersion);
-
-               return true;
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/EclipseUpdateSiteHandler.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/EclipseUpdateSiteHandler.java
deleted file mode 100644 (file)
index 870c884..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc.provisioning;
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.argeo.slc.build.ModularDistribution;
-import org.springframework.web.HttpRequestHandler;
-
-/** An Eclipse update site, serving site.xml features/* and plugins/*. */
-public class EclipseUpdateSiteHandler implements HttpRequestHandler {
-       public void handleRequest(HttpServletRequest request,
-                       HttpServletResponse response) throws ServletException, IOException {
-
-               ModularDistribution modularDistribution = (ModularDistribution) request
-                               .getAttribute("modularDistribution");
-               response.getWriter().write(
-                               modularDistribution.getModulesDescriptor("eclipse").toString());
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/EclipseUpdateSiteInterceptor.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/EclipseUpdateSiteInterceptor.java
deleted file mode 100644 (file)
index d529fab..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc.provisioning;
-
-import java.util.StringTokenizer;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.argeo.slc.SlcException;
-import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
-
-public class EclipseUpdateSiteInterceptor extends HandlerInterceptorAdapter {
-       public final static String RELEASE = "RELEASE";
-       public final static String LATEST = "LATEST";
-
-       @Override
-       public boolean preHandle(HttpServletRequest request,
-                       HttpServletResponse response, Object handler) throws Exception {
-               String path = request.getPathInfo();
-               StringTokenizer stS = new StringTokenizer(path, "/");
-               String type = null;
-               pathTokenizer: while (stS.hasMoreTokens()) {
-                       String token = stS.nextToken();
-                       if (token.equals("plugins") || token.equals("features")) {
-                               type = token;
-                               break pathTokenizer;
-                       }
-               }
-
-               if (type == null || !stS.hasMoreTokens())
-                       throw new SlcException("Cannot determine file name from path "
-                                       + path);
-
-               String fileName = stS.nextToken();
-
-               int ind_ = fileName.indexOf('_');
-               String moduleName;
-               if (ind_ > -1)
-                       moduleName = fileName.substring(0, ind_);
-               else
-                       throw new SlcException("Cannot determine version for " + fileName);
-
-               String versionAndExtension = fileName.substring(ind_ + 1);
-               int indExt = versionAndExtension.lastIndexOf('.');
-               String moduleVersion = versionAndExtension.substring(0, indExt);
-
-               request.setAttribute("moduleName", moduleName);
-               request.setAttribute("moduleVersion", moduleVersion);
-
-               return true;
-       }
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/ListModularDistributions.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/ListModularDistributions.java
deleted file mode 100644 (file)
index f0523dd..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc.provisioning;
-
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.argeo.slc.BasicNameVersion;
-import org.argeo.slc.NameVersion;
-import org.argeo.slc.build.BuildConstants;
-import org.argeo.slc.build.ModularDistribution;
-import org.argeo.slc.msg.ObjectList;
-import org.argeo.slc.msg.build.ModularDistributionDescriptor;
-import org.argeo.slc.web.mvc.AbstractServiceController;
-import org.springframework.web.servlet.ModelAndView;
-
-/** List of distributions. */
-public class ListModularDistributions extends AbstractServiceController
-               implements Comparator<ModularDistributionDescriptor> {
-       private Set<ModularDistribution> modularDistributions;
-
-       private String provisioningServletPath = "/dist";
-
-       @Override
-       protected void handleServiceRequest(HttpServletRequest request,
-                       HttpServletResponse response, ModelAndView modelAndView)
-                       throws Exception {
-
-               String baseUrl = "http://" + request.getServerName() + ":"
-                               + request.getServerPort() + request.getContextPath()
-                               + provisioningServletPath + "/";
-
-               SortedSet<ModularDistributionDescriptor> descriptors = new TreeSet<ModularDistributionDescriptor>(
-                               this);
-
-               Set<String> names = new HashSet<String>();
-               Set<String> namesRelease = new HashSet<String>();
-
-               // Scan distributions
-               for (Iterator<ModularDistribution> it = modularDistributions.iterator(); it
-                               .hasNext();) {
-                       ModularDistribution md = it.next();
-                       ModularDistributionDescriptor mdd = fromNameVersion(baseUrl, md);
-
-                       descriptors.add(mdd);
-                       names.add(mdd.getName());
-                       if (!md.getVersion().contains(BuildConstants.SNAPSHOT))
-                               namesRelease.add(mdd.getName());
-               }
-
-               // Add LATESTs and RELEASEs
-               for (String name : names)
-                       descriptors.add(fromNameVersion(baseUrl, new BasicNameVersion(name,
-                                       BuildConstants.LATEST)));
-               for (String name : namesRelease)
-                       descriptors.add(fromNameVersion(baseUrl, new BasicNameVersion(name,
-                                       BuildConstants.RELEASE)));
-
-               modelAndView.addObject(new ObjectList(descriptors));
-       }
-
-       public void setModularDistributions(
-                       Set<ModularDistribution> modularDistributions) {
-               this.modularDistributions = modularDistributions;
-       }
-
-       public void setProvisioningServletPath(String provisioningServletPath) {
-               this.provisioningServletPath = provisioningServletPath;
-       }
-
-       protected ModularDistributionDescriptor fromNameVersion(String baseUrl,
-                       NameVersion md) {
-               String moduleBase = baseUrl + md.getName() + "/" + md.getVersion()
-                               + "/";
-               ModularDistributionDescriptor mdd = new ModularDistributionDescriptor();
-               mdd.setName(md.getName());
-               mdd.setVersion(md.getVersion());
-
-               mdd.getModulesDescriptors().put("modularDistribution",
-                               moduleBase + "modularDistribution");
-               mdd.getModulesDescriptors().put("eclipse", moduleBase + "site.xml");
-               return mdd;
-
-       }
-
-       /** RELEASEs first, then LATESTs, then version */
-       public int compare(ModularDistributionDescriptor mdd1,
-                       ModularDistributionDescriptor mdd2) {
-               final int BEFORE = -1;
-               final int AFTER = 1;
-
-               String n1 = mdd1.getName();
-               String v1 = mdd1.getVersion();
-               String n2 = mdd2.getName();
-               String v2 = mdd2.getVersion();
-
-               if (v1.equals(BuildConstants.RELEASE))
-                       if (v2.equals(BuildConstants.RELEASE))
-                               return n1.compareTo(n2);
-                       else
-                               return BEFORE;
-               else if (v2.equals(BuildConstants.RELEASE))
-                       return AFTER;// we know 1 not RELEASE
-               else if (v1.equals(BuildConstants.LATEST))
-                       if (v2.equals(BuildConstants.LATEST))
-                               return n1.compareTo(n2);
-                       else
-                               return BEFORE;
-               else if (v2.equals(BuildConstants.LATEST))
-                       return AFTER;// we know 1 not LATEST or RELEASE
-               else if (n1.equals(n2))
-                       return v1.compareTo(v2);
-               else
-                       return n1.compareTo(n2);
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/ModularDistributionInterceptor.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/mvc/provisioning/ModularDistributionInterceptor.java
deleted file mode 100644 (file)
index 85d4dbd..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Mathieu Baudier
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.argeo.slc.web.mvc.provisioning;
-
-import java.util.Iterator;
-import java.util.Set;
-import java.util.SortedMap;
-import java.util.StringTokenizer;
-import java.util.TreeMap;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.argeo.slc.BasicNameVersion;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.build.BuildConstants;
-import org.argeo.slc.build.ModularDistribution;
-import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
-
-public class ModularDistributionInterceptor extends HandlerInterceptorAdapter {
-       private Set<ModularDistribution> modularDistributions;
-
-       @Override
-       public boolean preHandle(HttpServletRequest request,
-                       HttpServletResponse response, Object handler) throws Exception {
-               String path = request.getPathInfo();
-               StringTokenizer stS = new StringTokenizer(path, "/");
-               String distributionName = stS.nextToken();
-               String distributionVersion = stS.nextToken();
-
-               SortedMap<String, ModularDistribution> choices = new TreeMap<String, ModularDistribution>();
-               distribs: for (Iterator<ModularDistribution> it = modularDistributions
-                               .iterator(); it.hasNext();) {
-                       ModularDistribution md = it.next();
-                       if (md.getName().equals(distributionName)) {
-                               if (distributionVersion.equals(BuildConstants.RELEASE)
-                                               && md.getVersion().contains(BuildConstants.SNAPSHOT))
-                                       continue distribs;
-
-                               else if (distributionVersion.equals(BuildConstants.LATEST))
-                                       choices.put(md.getVersion(), md);
-                               else if (distributionVersion.equals(md.getVersion())) {
-                                       choices.put(md.getVersion(), md);
-                                       break distribs;
-                               }
-                       }
-               }
-
-               if (choices.size() == 0)
-                       throw new SlcException("Cannot find distribution for "
-                                       + new BasicNameVersion(distributionName,
-                                                       distributionVersion));
-
-               ModularDistribution modularDistribution = choices.get(choices
-                               .firstKey());
-
-               request.setAttribute("modularDistribution", modularDistribution);
-
-               return true;
-       }
-
-       public void setModularDistributions(
-                       Set<ModularDistribution> modularDistributions) {
-               this.modularDistributions = modularDistributions;
-       }
-
-}
diff --git a/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/server/jmx/spring.xml b/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/server/jmx/spring.xml
deleted file mode 100644 (file)
index b969cb5..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (C) 2007-2012 Mathieu Baudier
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-            http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:aop="http://www.springframework.org/schema/aop"
-       xmlns:tx="http://www.springframework.org/schema/tx"
-       xsi:schemaLocation="
-        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
-       default-lazy-init="true">
-
-       <!-- MBeans -->
-       <bean id="hibernateStatistics"
-               class="org.hibernate.jmx.StatisticsService" lazy-init="false">
-               <property name="sessionFactory" ref="sessionFactory" />
-       </bean>
-
-       <!-- JMX -->
-       <bean id="jmxExporter"
-               class="org.springframework.jmx.export.MBeanExporter"
-               lazy-init="false">
-               <property name="beans">
-                       <map>
-                               <entry
-                                       key="bean:name=hibernateStatistics,type=statistics,sessionFactory=sessionFactory"
-                                       value-ref="hibernateStatistics" />
-                       </map>
-               </property>
-       </bean>
-
-       <bean id="jxmServerConnector"
-               class="org.springframework.jmx.support.ConnectorServerFactoryBean"
-               lazy-init="false" depends-on="rmiRegistry">
-               <property name="objectName" value="connector:name=rmi" />
-               <property name="serviceUrl"
-                       value="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/springconnector" />
-       </bean>
-
-       <bean id="rmiRegistry"
-               class="org.springframework.remoting.rmi.RmiRegistryFactoryBean"
-               lazy-init="false">
-               <property name="port" value="1099" />
-       </bean>
-</beans>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/web/ajaxplorer/file/spring.xml b/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/web/ajaxplorer/file/spring.xml
deleted file mode 100644 (file)
index 6c12a5d..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xmlns:aop="http://www.springframework.org/schema/aop"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"\r
-       default-lazy-init="true">\r
-\r
-       <bean id="driver.file.template"\r
-               class="org.argeo.slc.web.ajaxplorer.file.FileDriver"\r
-               abstract="true">\r
-               <property name="actions">\r
-                       <map>\r
-                               <entry key="ls" value-ref="action.file.ls" />\r
-                               <entry key="download" value-ref="action.file.download" />\r
-                               <entry key="image_proxy"\r
-                                       value-ref="action.file.image_proxy" />\r
-                               <entry key="upload" value-ref="action.file.upload" />\r
-                               <entry key="mkdir" value-ref="action.file.mkdir" />\r
-                               <entry key="delete" value-ref="action.file.delete" />\r
-                       </map>\r
-               </property>\r
-       </bean>\r
-\r
-       <!-- ACTIONS FS -->\r
-       <bean id="action.file.ls"\r
-               class="org.argeo.slc.web.ajaxplorer.file.FileLsAction" />\r
-\r
-       <bean id="action.file.download"\r
-               class="org.argeo.slc.web.ajaxplorer.file.FileDownloadAction" />\r
-\r
-       <bean id="action.file.image_proxy"\r
-               class="org.argeo.slc.web.ajaxplorer.file.FileImageProxyAction" />\r
-\r
-       <bean id="action.file.upload"\r
-               class="org.argeo.slc.web.ajaxplorer.file.FileUploadAction" />\r
-\r
-       <bean id="action.file.mkdir"\r
-               class="org.argeo.slc.web.ajaxplorer.file.FileMkdirAction" />\r
-\r
-       <bean id="action.file.delete"\r
-               class="org.argeo.slc.web.ajaxplorer.file.FileDeleteAction" />\r
-</beans>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/web/ajaxplorer/svn/spring.xml b/runtime/org.argeo.slc.server/src/main/resources/org/argeo/slc/web/ajaxplorer/svn/spring.xml
deleted file mode 100644 (file)
index 5ea651f..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
-    Copyright (C) 2007-2012 Mathieu Baudier\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"\r
-       default-lazy-init="true">\r
-\r
-       <import resource="classpath:/org/argeo/slc/web/ajaxplorer/file/spring.xml" />\r
-\r
-       <bean id="driver.svn.template" class="org.argeo.slc.web.ajaxplorer.svn.SvnDriver"\r
-               init-method="init" abstract="true">\r
-               <property name="actions">\r
-                       <map>\r
-                               <entry key="ls" value-ref="action.svn.ls" />\r
-                               <entry key="download" value-ref="action.svn.download" />\r
-                               <entry key="image_proxy" value-ref="action.svn.image_proxy" />\r
-                               <entry key="upload" value-ref="action.svn.upload" />\r
-                               <entry key="mkdir" value-ref="action.svn.mkdir" />\r
-                               <entry key="delete" value-ref="action.svn.delete" />\r
-                               <entry key="svnlog" value-ref="action.svn.svnlog" />\r
-                               <entry key="svndownload" value-ref="action.svn.svndownload" />\r
-                       </map>\r
-               </property>\r
-       </bean>\r
-\r
-       <!-- ACTIONS SVN -->\r
-       <bean id="action.svn.ls" class="org.argeo.slc.web.ajaxplorer.svn.SvnLsAction" />\r
-\r
-       <bean id="action.svn.upload" class="org.argeo.slc.web.ajaxplorer.svn.SvnUploadAction" />\r
-\r
-       <bean id="action.svn.mkdir" class="org.argeo.slc.web.ajaxplorer.svn.SvnMkdirAction" />\r
-\r
-       <bean id="action.svn.delete" class="org.argeo.slc.web.ajaxplorer.svn.SvnDeleteAction" />\r
-\r
-       <bean id="action.svn.svnlog" class="org.argeo.slc.web.ajaxplorer.svn.SvnLogAction" />\r
-\r
-       <bean id="action.svn.download" class="org.argeo.slc.web.ajaxplorer.file.FileDownloadAction" />\r
-\r
-       <bean id="action.svn.image_proxy" class="org.argeo.slc.web.ajaxplorer.file.FileImageProxyAction" />\r
-\r
-       <bean id="action.svn.svndownload" class="org.argeo.slc.web.ajaxplorer.svn.SvnDownloadAction" />\r
-\r
-\r
-</beans>
\ No newline at end of file
diff --git a/runtime/org.argeo.slc.server/tmp/MANIFEST.MF b/runtime/org.argeo.slc.server/tmp/MANIFEST.MF
deleted file mode 100644 (file)
index 3ccfd19..0000000
+++ /dev/null
@@ -1,312 +0,0 @@
-Manifest-Version: 1.0
-Export-Package: org.hibernate;version="3.3.1.GA";uses:="javax.naming,j
- avax.transaction,org.hibernate.classic,org.hibernate.criterion,org.hi
- bernate.engine,org.hibernate.exception,org.hibernate.jdbc,org.hiberna
- te.metadata,org.hibernate.stat,org.hibernate.transform,org.hibernate.
- type",org.hibernate.action;version="3.3.1.GA";uses:="org.hibernate,or
- g.hibernate.cache,org.hibernate.collection,org.hibernate.engine,org.h
- ibernate.persister.collection,org.hibernate.persister.entity",org.hib
- ernate.bytecode;version="3.3.1.GA";uses:="org.hibernate.bytecode.util
- ,org.hibernate.proxy",org.hibernate.bytecode.cglib;version="3.3.1.GA"
- ;uses:="org.hibernate.bytecode,org.hibernate.bytecode.util,org.hibern
- ate.proxy,org.hibernate.repackage.cglib.asm,org.hibernate.repackage.c
- glib.beans,org.hibernate.repackage.cglib.proxy,org.hibernate.repackag
- e.cglib.reflect,org.hibernate.repackage.cglib.transform.impl",org.hib
- ernate.bytecode.javassist;version="3.3.1.GA";uses:="javassist.bytecod
- e,javassist.util.proxy,org.hibernate.bytecode,org.hibernate.bytecode.
- util,org.hibernate.proxy",org.hibernate.bytecode.util;version="3.3.1.
- GA",org.hibernate.cache;version="3.3.1.GA";uses:="javax.transaction,n
- et.sf.ehcache,net.sf.swarmcache,org.hibernate,org.hibernate.cache.acc
- ess,org.hibernate.cfg,org.hibernate.engine,org.hibernate.transaction,
- org.hibernate.type,org.jboss.cache,org.jboss.cache.optimistic,org.slf
- 4j",org.hibernate.cache.access;version="3.3.1.GA";uses:="org.hibernat
- e.cache",org.hibernate.cache.entry;version="3.3.1.GA";uses:="org.hibe
- rnate,org.hibernate.collection,org.hibernate.engine,org.hibernate.eve
- nt,org.hibernate.persister.collection,org.hibernate.persister.entity"
- ,org.hibernate.cache.impl;version="3.3.1.GA";uses:="org.hibernate.cac
- he,org.hibernate.cfg,org.hibernate.mapping",org.hibernate.cache.impl.
- bridge;version="3.3.1.GA";uses:="org.hibernate.cache,org.hibernate.ca
- che.access,org.hibernate.cfg",org.hibernate.cache.jbc2;version="3.3.1
- .GA";uses:="javax.transaction,org.hibernate.cache,org.hibernate.cfg,o
- rg.jboss.cache,org.jboss.cache.config,org.jboss.cache.notifications.a
- nnotation",org.hibernate.cache.jbc2.access;version="3.3.1.GA";uses:="
- org.hibernate.cache,org.hibernate.cache.access,org.hibernate.cache.jb
- c2",org.hibernate.cache.jbc2.builder;version="3.3.1.GA";uses:="org.hi
- bernate.cache,org.hibernate.cache.jbc2,org.hibernate.cfg,org.jboss.ca
- che,org.jgroups",org.hibernate.cache.jbc2.collection;version="3.3.1.G
- A";uses:="org.hibernate.cache,org.hibernate.cache.access,org.hibernat
- e.cache.jbc2,org.hibernate.cache.jbc2.access,org.jboss.cache",org.hib
- ernate.cache.jbc2.entity;version="3.3.1.GA";uses:="org.hibernate.cach
- e,org.hibernate.cache.access,org.hibernate.cache.jbc2,org.hibernate.c
- ache.jbc2.access,org.jboss.cache",org.hibernate.cache.jbc2.query;vers
- ion="3.3.1.GA";uses:="org.hibernate.cache,org.hibernate.cache.jbc2,or
- g.jboss.cache",org.hibernate.cache.jbc2.timestamp;version="3.3.1.GA";
- uses:="org.hibernate.cache,org.hibernate.cache.jbc2,org.jboss.cache,o
- rg.jboss.cache.notifications.annotation,org.jboss.cache.notifications
- .event",org.hibernate.cache.jbc2.util;version="3.3.1.GA";uses:="org.h
- ibernate.cache,org.jboss.cache,org.jboss.cache.config,org.jboss.cache
- .optimistic",org.hibernate.cfg;version="3.3.1.GA";uses:="org.dom4j,or
- g.hibernate,org.hibernate.bytecode,org.hibernate.cache,org.hibernate.
- connection,org.hibernate.dialect,org.hibernate.dialect.function,org.h
- ibernate.engine,org.hibernate.engine.query.sql,org.hibernate.event,or
- g.hibernate.exception,org.hibernate.hql,org.hibernate.jdbc,org.hibern
- ate.jdbc.util,org.hibernate.mapping,org.hibernate.proxy,org.hibernate
- .tool.hbm2ddl,org.hibernate.transaction,org.hibernate.type,org.w3c.do
- m,org.xml.sax",org.hibernate.classic;version="3.3.1.GA";uses:="org.hi
- bernate,org.hibernate.type",org.hibernate.collection;version="3.3.1.G
- A";uses:="org.dom4j,org.hibernate,org.hibernate.engine,org.hibernate.
- loader,org.hibernate.persister.collection,org.hibernate.type",org.hib
- ernate.connection;version="3.3.1.GA";uses:="javax.sql,org.hibernate",
- org.hibernate.context;version="3.3.1.GA";uses:="javax.transaction,org
- .hibernate,org.hibernate.classic,org.hibernate.engine,org.slf4j",org.
- hibernate.criterion;version="3.3.1.GA";uses:="org.hibernate,org.hiber
- nate.engine,org.hibernate.impl,org.hibernate.persister.collection,org
- .hibernate.transform,org.hibernate.type",org.hibernate.dialect;versio
- n="3.3.1.GA";uses:="org.hibernate,org.hibernate.dialect.function,org.
- hibernate.dialect.lock,org.hibernate.engine,org.hibernate.exception,o
- rg.hibernate.persister.entity,org.hibernate.sql,org.hibernate.type,or
- g.slf4j",org.hibernate.dialect.function;version="3.3.1.GA";uses:="org
- .hibernate,org.hibernate.dialect,org.hibernate.engine,org.hibernate.t
- ype",org.hibernate.dialect.lock;version="3.3.1.GA";uses:="org.hiberna
- te,org.hibernate.engine,org.hibernate.persister.entity",org.hibernate
- .engine;version="3.3.1.GA";uses:="javax.transaction,org.hibernate,org
- .hibernate.action,org.hibernate.cache,org.hibernate.cfg,org.hibernate
- .classic,org.hibernate.collection,org.hibernate.connection,org.hibern
- ate.dialect,org.hibernate.dialect.function,org.hibernate.engine.loadi
- ng,org.hibernate.engine.query,org.hibernate.engine.query.sql,org.hibe
- rnate.engine.transaction,org.hibernate.event,org.hibernate.exception,
- org.hibernate.id,org.hibernate.impl,org.hibernate.jdbc,org.hibernate.
- loader.custom,org.hibernate.persister.collection,org.hibernate.persis
- ter.entity,org.hibernate.property,org.hibernate.proxy,org.hibernate.s
- ql,org.hibernate.stat,org.hibernate.transform,org.hibernate.type,org.
- slf4j",org.hibernate.engine.loading;version="3.3.1.GA";uses:="org.hib
- ernate.collection,org.hibernate.engine,org.hibernate.persister.collec
- tion",org.hibernate.engine.query;version="3.3.1.GA";uses:="org.hibern
- ate,org.hibernate.engine,org.hibernate.engine.query.sql,org.hibernate
- .event,org.hibernate.hql,org.hibernate.loader.custom.sql,org.hibernat
- e.type",org.hibernate.engine.query.sql;version="3.3.1.GA";uses:="org.
- hibernate,org.hibernate.type",org.hibernate.engine.transaction;versio
- n="3.3.1.GA";uses:="org.hibernate,org.hibernate.engine,org.slf4j",org
- .hibernate.event;version="3.3.1.GA";uses:="org.hibernate,org.hibernat
- e.cfg,org.hibernate.collection,org.hibernate.engine,org.hibernate.per
- sister.collection,org.hibernate.persister.entity,org.hibernate.util",
- org.hibernate.event.def;version="3.3.1.GA";uses:="org.hibernate,org.h
- ibernate.collection,org.hibernate.engine,org.hibernate.event,org.hibe
- rnate.persister.collection,org.hibernate.persister.entity,org.hiberna
- te.type",org.hibernate.exception;version="3.3.1.GA";uses:="org.hibern
- ate,org.hibernate.dialect",org.hibernate.hql;version="3.3.1.GA";uses:
- ="org.hibernate,org.hibernate.engine,org.hibernate.event,org.hibernat
- e.transform,org.hibernate.type",org.hibernate.hql.antlr;version="3.3.
- 1.GA";uses:="antlr,antlr.collections",org.hibernate.hql.ast;version="
- 3.3.1.GA";uses:="antlr,antlr.collections,org.hibernate,org.hibernate.
- engine,org.hibernate.event,org.hibernate.hql,org.hibernate.hql.antlr,
- org.hibernate.hql.ast.tree,org.hibernate.hql.ast.util,org.hibernate.i
- d,org.hibernate.type",org.hibernate.hql.ast.exec;version="3.3.1.GA";u
- ses:="antlr.collections,org.hibernate,org.hibernate.engine,org.hibern
- ate.engine.transaction,org.hibernate.hql.ast,org.hibernate.persister.
- entity,org.slf4j",org.hibernate.hql.ast.tree;version="3.3.1.GA";uses:
- ="antlr,antlr.collections,org.hibernate,org.hibernate.dialect.functio
- n,org.hibernate.engine,org.hibernate.hql.antlr,org.hibernate.hql.ast,
- org.hibernate.hql.ast.util,org.hibernate.param,org.hibernate.persiste
- r.collection,org.hibernate.persister.entity,org.hibernate.sql,org.hib
- ernate.type,org.slf4j",org.hibernate.hql.ast.util;version="3.3.1.GA";
- uses:="antlr,antlr.collections,antlr.collections.impl,org.hibernate,o
- rg.hibernate.dialect.function,org.hibernate.engine,org.hibernate.hql.
- antlr,org.hibernate.hql.ast,org.hibernate.hql.ast.tree,org.hibernate.
- persister.collection,org.hibernate.persister.entity,org.hibernate.sql
- ,org.hibernate.type,org.slf4j",org.hibernate.hql.classic;version="3.3
- .1.GA";uses:="org.hibernate,org.hibernate.dialect,org.hibernate.engin
- e,org.hibernate.event,org.hibernate.hql,org.hibernate.loader,org.hibe
- rnate.persister.collection,org.hibernate.persister.entity,org.hiberna
- te.transform,org.hibernate.type",org.hibernate.id;version="3.3.1.GA";
- uses:="org.hibernate,org.hibernate.dialect,org.hibernate.engine,org.h
- ibernate.id.insert,org.hibernate.persister.entity,org.hibernate.sql,o
- rg.hibernate.type,org.slf4j",org.hibernate.id.enhanced;version="3.3.1
- .GA";uses:="org.hibernate,org.hibernate.dialect,org.hibernate.engine,
- org.hibernate.id,org.hibernate.type,org.slf4j",org.hibernate.id.inser
- t;version="3.3.1.GA";uses:="org.hibernate.dialect,org.hibernate.engin
- e,org.hibernate.id,org.hibernate.sql",org.hibernate.impl;version="3.3
- .1.GA";uses:="javax.naming,javax.naming.event,javax.naming.spi,javax.
- transaction,org.hibernate,org.hibernate.cache,org.hibernate.cfg,org.h
- ibernate.classic,org.hibernate.collection,org.hibernate.connection,or
- g.hibernate.criterion,org.hibernate.dialect,org.hibernate.dialect.fun
- ction,org.hibernate.engine,org.hibernate.engine.query,org.hibernate.e
- ngine.query.sql,org.hibernate.event,org.hibernate.exception,org.hiber
- nate.hql,org.hibernate.id,org.hibernate.jdbc,org.hibernate.loader,org
- .hibernate.loader.custom,org.hibernate.metadata,org.hibernate.persist
- er.collection,org.hibernate.persister.entity,org.hibernate.proxy,org.
- hibernate.stat,org.hibernate.transaction,org.hibernate.transform,org.
- hibernate.type,org.hibernate.util,org.slf4j",org.hibernate.intercept;
- version="3.3.1.GA";uses:="org.hibernate,org.hibernate.engine",org.hib
- ernate.intercept.cglib;version="3.3.1.GA";uses:="org.hibernate.engine
- ,org.hibernate.intercept,org.hibernate.repackage.cglib.transform.impl
- ",org.hibernate.intercept.javassist;version="3.3.1.GA";uses:="org.hib
- ernate.bytecode.javassist,org.hibernate.engine,org.hibernate.intercep
- t",org.hibernate.jdbc;version="3.3.1.GA";uses:="org.hibernate,org.hib
- ernate.dialect,org.hibernate.engine,org.hibernate.transaction,org.slf
- 4j",org.hibernate.jdbc.util;version="3.3.1.GA",org.hibernate.jmx;vers
- ion="3.3.1.GA";uses:="javax.naming,org.hibernate,org.hibernate.classi
- c,org.hibernate.engine,org.hibernate.metadata,org.hibernate.stat,org.
- hibernate.util",org.hibernate.loader;version="3.3.1.GA";uses:="org.hi
- bernate,org.hibernate.dialect,org.hibernate.engine,org.hibernate.hql,
- org.hibernate.persister.collection,org.hibernate.persister.entity,org
- .hibernate.sql,org.hibernate.transform,org.hibernate.type",org.hibern
- ate.loader.collection;version="3.3.1.GA";uses:="org.hibernate,org.hib
- ernate.engine,org.hibernate.loader,org.hibernate.persister.collection
- ,org.hibernate.type",org.hibernate.loader.criteria;version="3.3.1.GA"
- ;uses:="org.hibernate,org.hibernate.criterion,org.hibernate.dialect,o
- rg.hibernate.engine,org.hibernate.impl,org.hibernate.loader,org.hiber
- nate.persister.entity,org.hibernate.transform,org.hibernate.type",org
- .hibernate.loader.custom;version="3.3.1.GA";uses:="org.hibernate,org.
- hibernate.engine,org.hibernate.hql,org.hibernate.loader,org.hibernate
- .persister.collection,org.hibernate.persister.entity,org.hibernate.tr
- ansform,org.hibernate.type",org.hibernate.loader.custom.sql;version="
- 3.3.1.GA";uses:="org.hibernate,org.hibernate.engine,org.hibernate.eng
- ine.query,org.hibernate.engine.query.sql,org.hibernate.loader.custom,
- org.hibernate.persister.collection,org.hibernate.persister.entity",or
- g.hibernate.loader.entity;version="3.3.1.GA";uses:="org.hibernate,org
- .hibernate.engine,org.hibernate.loader,org.hibernate.persister.collec
- tion,org.hibernate.persister.entity,org.hibernate.transform,org.hiber
- nate.type",org.hibernate.loader.hql;version="3.3.1.GA";uses:="org.hib
- ernate,org.hibernate.dialect,org.hibernate.engine,org.hibernate.event
- ,org.hibernate.hql.ast,org.hibernate.hql.ast.tree,org.hibernate.loade
- r,org.hibernate.persister.collection,org.hibernate.persister.entity,o
- rg.hibernate.transform,org.hibernate.type",org.hibernate.lob;version=
- "3.3.1.GA",org.hibernate.mapping;version="3.3.1.GA";uses:="org.hibern
- ate,org.hibernate.dialect,org.hibernate.dialect.function,org.hibernat
- e.engine,org.hibernate.id,org.hibernate.property,org.hibernate.tool.h
- bm2ddl,org.hibernate.type",org.hibernate.metadata;version="3.3.1.GA";
- uses:="org.hibernate,org.hibernate.engine,org.hibernate.type",org.hib
- ernate.param;version="3.3.1.GA";uses:="org.hibernate.engine,org.hiber
- nate.type",org.hibernate.persister;version="3.3.1.GA";uses:="org.hibe
- rnate,org.hibernate.cache.access,org.hibernate.cfg,org.hibernate.engi
- ne,org.hibernate.mapping,org.hibernate.persister.collection,org.hiber
- nate.persister.entity",org.hibernate.persister.collection;version="3.
- 3.1.GA";uses:="org.hibernate,org.hibernate.cache,org.hibernate.cache.
- access,org.hibernate.cache.entry,org.hibernate.cfg,org.hibernate.coll
- ection,org.hibernate.dialect,org.hibernate.engine,org.hibernate.excep
- tion,org.hibernate.id,org.hibernate.loader.collection,org.hibernate.m
- apping,org.hibernate.metadata,org.hibernate.persister.entity,org.hibe
- rnate.sql,org.hibernate.type",org.hibernate.persister.entity;version=
- "3.3.1.GA";uses:="org.hibernate,org.hibernate.cache,org.hibernate.cac
- he.access,org.hibernate.cache.entry,org.hibernate.dialect.lock,org.hi
- bernate.engine,org.hibernate.id,org.hibernate.id.insert,org.hibernate
- .intercept,org.hibernate.jdbc,org.hibernate.loader.entity,org.hiberna
- te.mapping,org.hibernate.metadata,org.hibernate.sql,org.hibernate.tup
- le.entity,org.hibernate.type",org.hibernate.pretty;version="3.3.1.GA"
- ;uses:="org.hibernate,org.hibernate.engine,org.hibernate.persister.co
- llection,org.hibernate.persister.entity,org.hibernate.type",org.hiber
- nate.property;version="3.3.1.GA";uses:="org.hibernate,org.hibernate.e
- ngine,org.hibernate.mapping,org.hibernate.type,org.slf4j",org.hiberna
- te.proxy;version="3.3.1.GA";uses:="org.hibernate,org.hibernate.engine
- ,org.hibernate.type",org.hibernate.proxy.dom4j;version="3.3.1.GA";use
- s:="org.dom4j,org.hibernate,org.hibernate.engine,org.hibernate.proxy,
- org.hibernate.type",org.hibernate.proxy.map;version="3.3.1.GA";uses:=
- "org.hibernate,org.hibernate.engine,org.hibernate.proxy,org.hibernate
- .type",org.hibernate.proxy.pojo;version="3.3.1.GA";uses:="org.hiberna
- te.engine,org.hibernate.proxy,org.hibernate.type",org.hibernate.proxy
- .pojo.cglib;version="3.3.1.GA";uses:="org.hibernate,org.hibernate.eng
- ine,org.hibernate.proxy,org.hibernate.proxy.pojo,org.hibernate.repack
- age.cglib.proxy,org.hibernate.type",org.hibernate.proxy.pojo.javassis
- t;version="3.3.1.GA";uses:="javassist.util.proxy,org.hibernate,org.hi
- bernate.engine,org.hibernate.proxy,org.hibernate.proxy.pojo,org.hiber
- nate.type",org.hibernate.repackage.cglib.asm;version="3.3.1.GA",org.h
- ibernate.repackage.cglib.asm.attrs;version="3.3.1.GA";uses:="org.hibe
- rnate.repackage.cglib.asm",org.hibernate.repackage.cglib.beans;versio
- n="3.3.1.GA";uses:="org.hibernate.repackage.cglib.asm,org.hibernate.r
- epackage.cglib.core",org.hibernate.repackage.cglib.core;version="3.3.
- 1.GA";uses:="org.hibernate.repackage.cglib.asm",org.hibernate.repacka
- ge.cglib.proxy;version="3.3.1.GA";uses:="org.hibernate.repackage.cgli
- b.asm,org.hibernate.repackage.cglib.core,org.hibernate.repackage.cgli
- b.reflect",org.hibernate.repackage.cglib.reflect;version="3.3.1.GA";u
- ses:="org.hibernate.repackage.cglib.asm,org.hibernate.repackage.cglib
- .core",org.hibernate.repackage.cglib.transform;version="3.3.1.GA";use
- s:="org.apache.tools.ant,org.apache.tools.ant.types,org.hibernate.rep
- ackage.cglib.asm,org.hibernate.repackage.cglib.core",org.hibernate.re
- package.cglib.transform.hook;version="3.3.1.GA";uses:="org.codehaus.a
- spectwerkz.hook,org.hibernate.repackage.cglib.asm,org.hibernate.repac
- kage.cglib.core,org.hibernate.repackage.cglib.transform",org.hibernat
- e.repackage.cglib.transform.impl;version="3.3.1.GA";uses:="org.hibern
- ate.repackage.cglib.asm,org.hibernate.repackage.cglib.core,org.hibern
- ate.repackage.cglib.transform",org.hibernate.repackage.cglib.util;ver
- sion="3.3.1.GA";uses:="org.hibernate.repackage.cglib.asm,org.hibernat
- e.repackage.cglib.core",org.hibernate.secure;version="3.3.1.GA";uses:
- ="javax.security.auth,javax.security.jacc,org.hibernate,org.hibernate
- .cfg,org.hibernate.event",org.hibernate.sql;version="3.3.1.GA";uses:=
- "org.hibernate,org.hibernate.dialect,org.hibernate.dialect.function,o
- rg.hibernate.type",org.hibernate.stat;version="3.3.1.GA";uses:="org.h
- ibernate.cache,org.hibernate.engine",org.hibernate.tool.hbm2ddl;versi
- on="3.3.1.GA";uses:="org.apache.tools.ant,org.apache.tools.ant.taskde
- fs,org.apache.tools.ant.types,org.hibernate,org.hibernate.cfg,org.hib
- ernate.connection,org.hibernate.dialect",org.hibernate.tool.instrumen
- t;version="3.3.1.GA";uses:="org.apache.tools.ant,org.apache.tools.ant
- .types,org.hibernate.bytecode,org.hibernate.bytecode.util",org.hibern
- ate.tool.instrument.cglib;version="3.3.1.GA";uses:="org.hibernate.byt
- ecode,org.hibernate.bytecode.util,org.hibernate.tool.instrument",org.
- hibernate.tool.instrument.javassist;version="3.3.1.GA";uses:="org.hib
- ernate.bytecode,org.hibernate.bytecode.util,org.hibernate.tool.instru
- ment",org.hibernate.transaction;version="3.3.1.GA";uses:="javax.namin
- g,javax.transaction,javax.transaction.xa,org.hibernate,org.hibernate.
- engine,org.hibernate.jdbc",org.hibernate.transform;version="3.3.1.GA"
- ,org.hibernate.tuple;version="3.3.1.GA";uses:="org.dom4j,org.hibernat
- e,org.hibernate.bytecode,org.hibernate.engine,org.hibernate.id,org.hi
- bernate.mapping,org.hibernate.property,org.hibernate.type",org.hibern
- ate.tuple.component;version="3.3.1.GA";uses:="org.hibernate,org.hiber
- nate.engine,org.hibernate.mapping,org.hibernate.property,org.hibernat
- e.tuple",org.hibernate.tuple.entity;version="3.3.1.GA";uses:="org.hib
- ernate,org.hibernate.engine,org.hibernate.mapping,org.hibernate.prope
- rty,org.hibernate.proxy,org.hibernate.tuple,org.hibernate.type",org.h
- ibernate.type;version="3.3.1.GA";uses:="org.dom4j,org.hibernate,org.h
- ibernate.collection,org.hibernate.dialect,org.hibernate.engine,org.hi
- bernate.persister.collection,org.hibernate.persister.entity,org.hiber
- nate.tuple,org.hibernate.tuple.component,org.hibernate.usertype",org.
- hibernate.usertype;version="3.3.1.GA";uses:="org.hibernate,org.hibern
- ate.collection,org.hibernate.engine,org.hibernate.persister.collectio
- n,org.hibernate.type",org.hibernate.util;version="3.3.1.GA";uses:="ja
- vax.naming,javax.transaction,org.dom4j,org.dom4j.io,org.hibernate,org
- .hibernate.cfg,org.hibernate.dialect,org.hibernate.dialect.function,o
- rg.hibernate.engine,org.hibernate.property,org.hibernate.type,org.slf
- 4j,org.xml.sax"
-Bundle-Vendor: SpringSource
-Bundle-Version: 3.3.1.GA
-Tool: Bundlor 1.0.0.CI-B166
-Bundle-Name: JBoss Hibernate Object-Relational Mapper
-Bundle-ManifestVersion: 2
-Created-By: 1.5.0_15-b04 (Sun Microsystems Inc.)
-Bundle-SymbolicName: com.springsource.org.hibernate
-Import-Package: antlr;version="[2.7.6, 3.0.0)",antlr.collections;versi
- on="[2.7.6, 3.0.0)",antlr.collections.impl;version="[2.7.6, 3.0.0)",c
- om.mchange.v2.c3p0;version="[0.9.1, 0.9.2)";resolution:="optional",co
- m.opensymphony.oscache.base;version="[2.1.0, 3.0.0)";resolution:="opt
- ional",com.opensymphony.oscache.general;version="[2.1.0, 3.0.0)";reso
- lution:="optional",javassist;version="[3.3.0.ga,3.4.0)",javassist.byt
- ecode;version="[3.3.0.ga,3.4.0)",javassist.util.proxy;version="[3.3.0
- .ga,3.4.0)",javax.naming;version="0",javax.naming.event;version="0",j
- avax.naming.spi;version="0",javax.security.auth;version="0",javax.sec
- urity.jacc;version="0";resolution:="optional",javax.sql;version="0",j
- avax.transaction;version="[1.0.1, 2.0.0)";resolution:="optional",java
- x.transaction.xa;version="[1.0.1, 2.0.0)";resolution:="optional",net.
- sf.cglib.beans;version="[2.1.3, 2.2.0)",net.sf.cglib.core;version="[2
- .1.3, 2.2.0)",net.sf.cglib.proxy;version="[2.1.3, 2.2.0)",net.sf.cgli
- b.reflect;version="[2.1.3, 2.2.0)",net.sf.cglib.transform;version="[2
- .1.3, 2.2.0)",net.sf.cglib.util;version="[2.1.3, 2.2.0)",net.sf.ehcac
- he;version="[1.2.3, 2.0.0)";resolution:="optional",net.sf.swarmcache;
- version="[1.0.0.RC2a, 1.1.0)";resolution:="optional",org.apache.commo
- ns.collections.map;version="[3.2.0, 4.0.0)",org.apache.tools.ant;vers
- ion="[1.7.0, 2.0.0)";resolution:="optional",org.apache.tools.ant.task
- defs;version="[1.7.0, 2.0.0)";resolution:="optional",org.apache.tools
- .ant.types;version="[1.7.0, 2.0.0)";resolution:="optional",org.codeha
- us.aspectwerkz.hook;version="[0.8.1, 0.9.0)";resolution:="optional",o
- rg.dom4j;version="[1.6.1, 1.7.0)",org.dom4j.io;version="[1.6.1, 1.7.0
- )",org.jboss.cache;version="[1.2.2, 2.0.0)";resolution:="optional",or
- g.jboss.cache.config;version="[1.2.2, 2.0.0)";resolution:="optional",
- org.jboss.cache.lock;version="[1.2.2, 2.0.0)";resolution:="optional",
- org.jboss.cache.notifications.annotation;version="[1.2.2, 2.0.0)";res
- olution:="optional",org.jboss.cache.notifications.event;version="[1.2
- .2, 2.0.0)";resolution:="optional",org.jboss.cache.optimistic;version
- ="[1.2.2, 2.0.0)";resolution:="optional",org.jgroups;version="[2.2.7,
-  3.0.0)",org.logicalcobwebs.proxool;version="[0.8.3, 0.9.0)";resoluti
- on:="optional",org.logicalcobwebs.proxool.configuration;version="[0.8
- .3, 0.9.0)";resolution:="optional",org.slf4j;version="[1.5.2, 1.6.0)"
- ,org.w3c.dom;version="0",org.xml.sax;version="0"
-Archiver-Version: Plexus Archiver
index 90f7efa3e034de8a83dfdc9fe6104b7c178a207e..d272adeee54aa0f96bdfc0cdf407325825b858bc 100644 (file)
                <module>org.argeo.slc.core</module>
                <module>org.argeo.slc.unit</module>
                <module>org.argeo.slc.support.simple</module>
-               <module>org.argeo.slc.support.castor</module>
-               <module>org.argeo.slc.support.activemq</module>
                <module>org.argeo.slc.support.osgi</module>
                <module>org.argeo.slc.support.equinox</module>
-               <module>org.argeo.slc.support.hibernate</module>
                <module>org.argeo.slc.support.ant</module>
                <module>org.argeo.slc.support.aether</module>
                <module>org.argeo.slc.support.maven</module>
                <module>org.argeo.slc.support.jemmy</module>
                <module>org.argeo.slc.support.jcr</module>
-               <module>org.argeo.slc.server</module>
                <module>org.argeo.slc.detached</module>
                <module>org.argeo.slc.detached.launcher</module>
                <module>org.argeo.slc.launcher</module>
                <module>org.argeo.slc.lib.detached</module>
-               <module>org.argeo.slc.support.ws.client</module>
                <module>org.argeo.slc.repo</module>
        </modules>
        <build>