From 58b35f147f3c1c1a12a07c303105618f679c7161 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Wed, 15 Jul 2020 10:58:18 +0200 Subject: [PATCH] Remove old license headers --- .../ui/workbench/rap/AnonymousEntryPoint.java | 15 - .../ui/workbench/rap/RapActionBarAdvisor.java | 15 - .../ui/workbench/rap/RapWindowAdvisor.java | 15 - .../ui/workbench/rap/RapWorkbenchAdvisor.java | 15 - .../ui/workbench/rap/SecureRapActivator.java | 15 - .../ui/workbench/rap/commands/OpenHome.java | 15 - .../ui/workbench/rap/commands/UserMenu.java | 15 - .../cms/spring/AbstractSystemExecution.java | 15 - ...catedApplicationContextInitialization.java | 15 - .../ui/workbench/JcrBrowserPerspective.java | 15 - .../ui/workbench/MaintenancePerspective.java | 15 - .../ui/workbench/OsgiExplorerPerspective.java | 15 - .../workbench/SecurityAdminPerspective.java | 15 - .../cms/ui/workbench/UserHomePerspective.java | 15 - .../cms/ui/workbench/WorkbenchUiPlugin.java | 15 - .../commands/OpenChangePasswordDialog.java | 15 - .../cms/ui/workbench/commands/OpenEditor.java | 15 - .../commands/OpenHomePerspective.java | 15 - .../internal/WorkbenchConstants.java | 15 - .../internal/jcr/commands/AddFolderNode.java | 15 - .../internal/jcr/commands/AddPrivileges.java | 15 - .../jcr/commands/AddRemoteRepository.java | 15 - .../jcr/commands/ConfigurableNodeDump.java | 15 - .../jcr/commands/CreateWorkspace.java | 15 - .../internal/jcr/commands/DeleteNodes.java | 15 - .../internal/jcr/commands/DumpNode.java | 15 - .../internal/jcr/commands/EditNode.java | 15 - .../internal/jcr/commands/GetNodeSize.java | 15 - .../internal/jcr/commands/Refresh.java | 15 - .../jcr/commands/RemovePrivileges.java | 15 - .../jcr/commands/RemoveRemoteRepository.java | 15 - .../internal/jcr/commands/RenameNode.java | 15 - .../internal/jcr/commands/SortChildNodes.java | 15 - .../internal/jcr/commands/UploadFiles.java | 15 - .../jcr/parts/AbstractJcrQueryEditor.java | 15 - .../jcr/parts/AddPrivilegeWizard.java | 15 - .../internal/jcr/parts/ChildNodesPage.java | 15 - .../internal/jcr/parts/ChooseNameDialog.java | 15 - .../jcr/parts/GenericNodeEditorInput.java | 15 - .../internal/jcr/parts/GenericNodePage.java | 15 - .../jcr/parts/GenericPropertyPage.java | 15 - .../jcr/parts/JcrQueryEditorInput.java | 15 - .../internal/jcr/parts/NodeEditorInput.java | 15 - .../jcr/parts/NodePrivilegesPage.java | 15 - .../jcr/parts/NodeVersionHistoryPage.java | 15 - .../jcr/parts/StringNodeEditorInput.java | 15 - .../useradmin/SecurityAdminImages.java | 26 - .../useradmin/commands/DeleteGroups.java | 15 - .../useradmin/commands/DeleteUsers.java | 15 - .../useradmin/commands/ForceRefresh.java | 15 - .../internal/useradmin/commands/NewGroup.java | 15 - .../internal/useradmin/commands/NewUser.java | 15 - .../useradmin/commands/SaveArgeoUser.java | 15 - .../useradmin/commands/UserBatchUpdate.java | 15 - .../commands/UserTransactionHandler.java | 15 - .../useradmin/parts/ArgeoUserEditorInput.java | 15 - .../useradmin/parts/GroupMainPage.java | 15 - .../internal/useradmin/parts/GroupsView.java | 15 - .../internal/useradmin/parts/UserEditor.java | 15 - .../useradmin/parts/UserEditorInput.java | 15 - .../useradmin/parts/UserMainPage.java | 15 - .../internal/useradmin/parts/UsersView.java | 15 - .../ui/workbench/jcr/DefaultNodeEditor.java | 15 - .../workbench/jcr/GenericJcrQueryEditor.java | 15 - .../cms/ui/workbench/jcr/JcrBrowserView.java | 15 - .../ui/workbench/jcr/NodeFsBrowserView.java | 15 - .../cms/ui/workbench/osgi/BundlesView.java | 15 - .../ui/workbench/osgi/CmsSessionsView.java | 15 - .../cms/ui/workbench/osgi/ModulesView.java | 15 - .../workbench/osgi/MultiplePackagesView.java | 15 - .../ui/workbench/osgi/OsgiExplorerImages.java | 15 - .../ui/workbench/useradmin/AdminLogView.java | 15 - .../useradmin/LogContentProvider.java | 15 - .../cms/ui/workbench/useradmin/LogView.java | 15 - .../ui/workbench/useradmin/UserProfile.java | 15 - .../cms/ui/workbench/util/CommandUtils.java | 15 - .../workbench/util/RolesSourceProvider.java | 15 - .../spring/ApplicationContextTracker.java | 22 +- .../eclipse/spring/SpringCommandHandler.java | 15 - .../spring/SpringExtensionFactory.java | 18 - .../src/org/argeo/slc/BasicNameVersion.java | 15 - .../src/org/argeo/slc/Condition.java | 15 - .../src/org/argeo/slc/DefaultNameVersion.java | 15 - .../src/org/argeo/slc/NameVersion.java | 15 - .../src/org/argeo/slc/SlcException.java | 49 +- .../src/org/argeo/slc/SlcNames.java | 15 - .../src/org/argeo/slc/SlcTypes.java | 15 - .../src/org/argeo/slc/StreamReadable.java | 15 - .../org/argeo/slc/UnsupportedException.java | 123 +- .../org/argeo/slc/attachment/Attachment.java | 15 - .../slc/attachment/AttachmentsEnabled.java | 15 - .../slc/attachment/AttachmentsStorage.java | 15 - .../src/org/argeo/slc/build/Distribution.java | 15 - .../argeo/slc/build/ModularDistribution.java | 15 - .../argeo/slc/deploy/DeployEnvironment.java | 15 - .../org/argeo/slc/deploy/DeployedSystem.java | 15 - .../slc/deploy/DeployedSystemManager.java | 15 - .../src/org/argeo/slc/deploy/Deployment.java | 15 - .../org/argeo/slc/deploy/DeploymentData.java | 15 - .../org/argeo/slc/deploy/DynamicRuntime.java | 15 - .../slc/deploy/InstalledExecutables.java | 15 - .../slc/deploy/ModularDeployedSystem.java | 15 - .../src/org/argeo/slc/deploy/Module.java | 15 - .../argeo/slc/deploy/ModuleDescriptor.java | 15 - .../org/argeo/slc/deploy/ModulesManager.java | 15 - .../src/org/argeo/slc/deploy/TargetData.java | 15 - .../argeo/slc/deploy/VersioningDriver.java | 15 - .../slc/execution/AbstractExecutionValue.java | 15 - .../slc/execution/AbstractSpecAttribute.java | 15 - .../argeo/slc/execution/ExecutionContext.java | 15 - .../argeo/slc/execution/ExecutionFlow.java | 15 - .../execution/ExecutionFlowDescriptor.java | 15 - .../ExecutionFlowDescriptorConverter.java | 15 - .../argeo/slc/execution/ExecutionModule.java | 15 - .../execution/ExecutionModuleDescriptor.java | 15 - .../execution/ExecutionModulesListener.java | 15 - .../execution/ExecutionModulesManager.java | 15 - .../argeo/slc/execution/ExecutionProcess.java | 15 - .../slc/execution/ExecutionResources.java | 15 - .../argeo/slc/execution/ExecutionSpec.java | 15 - .../slc/execution/ExecutionSpecAttribute.java | 15 - .../argeo/slc/execution/ExecutionStack.java | 15 - .../slc/execution/ExecutionStackLevel.java | 15 - .../argeo/slc/execution/ExecutionStep.java | 15 - .../org/argeo/slc/execution/RealizedFlow.java | 15 - .../argeo/slc/execution/RefSpecAttribute.java | 15 - .../src/org/argeo/slc/execution/RefValue.java | 15 - .../argeo/slc/execution/RefValueChoice.java | 15 - .../src/org/argeo/slc/execution/SlcAgent.java | 15 - .../slc/primitive/PrimitiveAccessor.java | 15 - .../slc/primitive/PrimitiveSpecAttribute.java | 15 - .../argeo/slc/primitive/PrimitiveUtils.java | 15 - .../argeo/slc/primitive/PrimitiveValue.java | 15 - .../org/argeo/slc/test/ExecutableTestRun.java | 15 - .../test/IncompatibleTestDataException.java | 15 - .../src/org/argeo/slc/test/TestData.java | 15 - .../org/argeo/slc/test/TestDataProvider.java | 15 - .../org/argeo/slc/test/TestDefinition.java | 15 - .../src/org/argeo/slc/test/TestResult.java | 69 +- .../argeo/slc/test/TestResultListener.java | 35 +- .../org/argeo/slc/test/TestResultPart.java | 49 +- .../src/org/argeo/slc/test/TestRun.java | 57 +- .../src/org/argeo/slc/test/TestRunAware.java | 31 +- .../src/org/argeo/slc/test/TestStatus.java | 77 +- .../org/argeo/slc/test/WritableTestRun.java | 43 +- .../argeo/slc/test/context/ContextAware.java | 15 - .../slc/test/context/ParentContextAware.java | 15 - .../argeo/slc/client/rap/SlcSecureRap.java | 15 - .../slc/client/ui/specific/OpenJcrFile.java | 15 - .../argeo/slc/client/rcp/SlcRcpPlugin.java | 15 - .../rcp/SlcSecureClientApplication.java | 15 - .../client/rcp/SlcSecureWorkbenchAdvisor.java | 15 - .../rcp/SlcSecureWorkbenchWindowAdvisor.java | 15 - .../slc/client/ui/specific/OpenJcrFile.java | 15 - .../AnonymousDistributionPerspective.java | 15 - .../slc/client/ui/dist/DistConstants.java | 15 - .../argeo/slc/client/ui/dist/DistImages.java | 15 - .../argeo/slc/client/ui/dist/DistPlugin.java | 15 - .../ui/dist/DistributionPerspective.java | 15 - .../client/ui/dist/commands/BndProcess.java | 15 - .../dist/commands/CopyLocalJavaWorkspace.java | 15 - .../ui/dist/commands/CopyWorkspace.java | 15 - .../commands/CreateLocalJavaWorkspace.java | 15 - .../ui/dist/commands/CreateWorkspace.java | 15 - .../ui/dist/commands/DeleteArtifacts.java | 15 - .../ui/dist/commands/DeleteWorkspace.java | 15 - .../dist/commands/DisplayRepoInformation.java | 15 - .../ui/dist/commands/ManageWorkspaceAuth.java | 15 - .../ui/dist/commands/MergeWorkspaces.java | 15 - .../dist/commands/NormalizeDistribution.java | 15 - .../ui/dist/commands/NormalizeWorkspace.java | 15 - .../commands/OpenGenerateBinariesWizard.java | 15 - .../ui/dist/commands/OpenModuleEditor.java | 15 - .../ui/dist/commands/OpenWorkspaceEditor.java | 15 - .../ui/dist/commands/PublishWorkspace.java | 15 - .../dist/commands/RefreshArtifactBrowser.java | 15 - .../commands/RefreshDistributionsView.java | 15 - .../ui/dist/commands/RegisterRepository.java | 15 - .../client/ui/dist/commands/RunInOsgi.java | 15 - .../ui/dist/commands/ShowSizeColumn.java | 15 - .../dist/commands/UnregisterRemoteRepo.java | 15 - .../controllers/ArtifactLabelProvider.java | 15 - .../ArtifactsTreeContentProvider.java | 15 - .../dist/editors/ArtifactVersionEditor.java | 15 - .../ui/dist/editors/BundleDependencyPage.java | 15 - .../ui/dist/editors/BundleDetailPage.java | 15 - .../client/ui/dist/editors/BundleRawPage.java | 15 - .../ui/dist/editors/DistWkspBrowserPage.java | 15 - .../ui/dist/editors/DistWkspEditorInput.java | 15 - .../ui/dist/editors/DistWkspSearchPage.java | 15 - .../ui/dist/editors/DistWorkspaceEditor.java | 15 - .../editors/ModularDistVersionDetailPage.java | 15 - .../editors/ModularDistVersionEditor.java | 15 - .../ModularDistVersionOverviewPage.java | 15 - .../ui/dist/editors/ModuleEditorInput.java | 15 - .../client/ui/dist/editors/RunInOsgiPage.java | 15 - .../editors/WkspCategoryBaseListPage.java | 15 - .../dist/utils/ArtifactsTableConfigurer.java | 15 - .../client/ui/dist/utils/CommandHelpers.java | 15 - .../dist/utils/DistNodeViewerComparator.java | 15 - .../client/ui/dist/utils/DistUiHelpers.java | 15 - .../ui/dist/utils/HyperlinkAdapter.java | 28 +- .../views/AbstractQueryArtifactsView.java | 15 - .../views/AnonymousDistributionsView.java | 15 - .../ui/dist/views/ArtifactsBrowser.java | 15 - .../ui/dist/views/DistributionsView.java | 15 - .../slc/client/ui/dist/views/HelpView.java | 15 - .../ui/dist/views/QueryArtifactsForm.java | 15 - .../ui/dist/views/QueryArtifactsText.java | 15 - .../ui/dist/views/QueryBundlesForm.java | 15 - .../ui/dist/wizards/ChangeRightsWizard.java | 15 - .../ui/dist/wizards/ChooseRightsPage.java | 15 - .../client/ui/dist/wizards/FetchWizard.java | 15 - .../dist/wizards/GenerateBinariesWizard.java | 15 - .../ui/dist/wizards/RegisterRepoWizard.java | 15 - .../argeo/slc/client/ui/ClientUiPlugin.java | 15 - .../client/ui/SlcExecutionPerspective.java | 15 - .../org/argeo/slc/client/ui/SlcImages.java | 15 - .../argeo/slc/client/ui/SlcUiConstants.java | 15 - .../client/ui/commands/AddResultFolder.java | 15 - .../slc/client/ui/commands/DeleteItems.java | 253 +-- .../ui/commands/RefreshJcrResultTreeView.java | 123 +- .../ui/commands/RenameResultFolder.java | 15 - .../client/ui/commands/RenameResultNode.java | 15 - .../slc/client/ui/commands/RunSlcFlow.java | 15 - .../slc/client/ui/commands/UpdateModule.java | 239 +- .../ui/controllers/ProcessController.java | 15 - .../ui/decorators/ResultFailedDecorator.java | 15 - .../client/ui/editors/ProcessBuilderPage.java | 15 - .../slc/client/ui/editors/ProcessEditor.java | 15 - .../client/ui/editors/ProcessEditorInput.java | 15 - .../ui/editors/ProcessEditorInputFactory.java | 15 - .../slc/client/ui/editors/ProcessLogPage.java | 15 - .../slc/client/ui/model/ParentNodeFolder.java | 15 - .../slc/client/ui/model/ResultFolder.java | 15 - .../slc/client/ui/model/ResultParent.java | 15 - .../client/ui/model/ResultParentUtils.java | 15 - .../slc/client/ui/model/SingleResultNode.java | 15 - .../slc/client/ui/model/VirtualFolder.java | 15 - .../providers/ResultTreeContentProvider.java | 15 - .../ui/providers/ResultTreeLabelProvider.java | 15 - .../ui/views/JcrExecutionModulesView.java | 15 - .../client/ui/views/JcrProcessListView.java | 15 - .../client/ui/views/JcrResultListView.java | 15 - .../client/ui/views/JcrResultTreeView.java | 1921 ++++++++--------- .../ui/wizards/ConfirmOverwriteWizard.java | 15 - .../src/org/argeo/slc/e4/SlcImages.java | 15 - .../slc/e4/parts/JcrExecutionModulesView.java | 15 - .../org/argeo/slc/rpmfactory/RpmFactory.java | 15 - .../argeo/slc/rpmfactory/RpmProxyService.java | 15 - .../slc/rpmfactory/core/BuildInMock.java | 15 - .../slc/rpmfactory/core/RpmFactoryImpl.java | 15 - .../rpmfactory/core/RpmProxyServiceImpl.java | 15 - .../slc/rpmfactory/core/RpmSpecFile.java | 15 - .../org/argeo/slc/jcr/JcrMetadataWriter.java | 15 - .../src/org/argeo/slc/jcr/JcrTestResult.java | 15 - .../org/argeo/slc/jcr/SlcJcrConstants.java | 15 - .../org/argeo/slc/jcr/SlcJcrResultUtils.java | 15 - .../src/org/argeo/slc/jcr/SlcJcrUtils.java | 15 - .../org/argeo/slc/jcr/execution/JcrAgent.java | 15 - .../JcrExecutionModulesListener.java | 15 - .../jcr/execution/JcrExecutionProcess.java | 15 - .../src/org/argeo/slc/cli/SlcMain.java | 15 - .../slc/repo/internal/AetherUtilsTest.java | 15 - .../org/argeo/slc/repo/ArtifactIndexer.java | 15 - .../org/argeo/slc/repo/JarFileIndexer.java | 15 - .../org/argeo/slc/repo/MavenProxyService.java | 15 - .../src/org/argeo/slc/repo/NodeIndexer.java | 15 - .../org/argeo/slc/repo/PdeSourcesIndexer.java | 15 - .../src/org/argeo/slc/repo/RepoConstants.java | 15 - .../src/org/argeo/slc/repo/RepoSync.java | 15 - .../src/org/argeo/slc/repo/RepoUtils.java | 15 - .../argeo/slc/repo/core/WorkspaceIndexer.java | 15 - .../org/argeo/slc/repo/maven/AetherUtils.java | 15 - .../slc/repo/maven/ArtifactIdComparator.java | 15 - .../slc/repo/maven/ConvertPoms_01_03.java | 15 - .../slc/repo/maven/GenerateBinaries.java | 15 - .../slc/repo/maven/IndexDistribution.java | 15 - .../slc/repo/maven/MavenConventionsUtils.java | 15 - .../slc/repo/maven/MavenProxyServiceImpl.java | 15 - .../argeo/slc/repo/maven/Migration_01_03.java | 15 - .../argeo/slc/repo/osgi/ImportBundlesZip.java | 15 - .../argeo/slc/repo/osgi/NormalizeGroup.java | 15 - .../org/argeo/slc/repo/osgi/ObrWrapper.java | 15 - .../org/argeo/slc/repo/osgi/OsgiProfile.java | 15 - .../AbstractExecutionModulesManager.java | 15 - .../org/argeo/slc/runtime/DefaultAgent.java | 15 - .../slc/runtime/DefaultExecutionFlow.java | 15 - .../slc/runtime/DefaultExecutionSpec.java | 15 - .../slc/runtime/DefaultExecutionStack.java | 15 - .../argeo/slc/runtime/ExecutionThread.java | 15 - .../slc/runtime/InstantiationManager.java | 231 +- .../org/argeo/slc/runtime/ProcessThread.java | 15 - .../argeo/slc/runtime/ProcessThreadGroup.java | 15 - .../slc/runtime/tasks/CloseTestResult.java | 15 - .../src/org/argeo/slc/runtime/tasks/Echo.java | 15 - .../src/org/argeo/slc/runtime/tasks/If.java | 15 - .../argeo/slc/runtime/tasks/JvmProcess.java | 15 - .../argeo/slc/runtime/tasks/SystemCall.java | 15 - .../tasks/SystemCallOutputListener.java | 15 - .../argeo/slc/runtime/test/BasicTestData.java | 65 +- .../slc/runtime/test/BasicTestDefinition.java | 105 +- .../argeo/slc/runtime/test/ContextUtils.java | 263 ++- .../slc/runtime/test/SimpleResultPart.java | 285 ++- .../slc/runtime/test/SimpleTestResult.java | 191 +- .../argeo/slc/runtime/test/SimpleTestRun.java | 205 +- .../argeo/slc/runtime/test/SlcTestUtils.java | 15 - .../argeo/slc/runtime/test/TestDataUtils.java | 111 +- .../core/deploy/DefaultResourceSetTest.java | 15 - .../AbstractExecutionFlowTestCase.java | 151 +- .../execution/BasicExecutionFlowTest.java | 355 ++- .../execution/ExceptionIfInitCalledTwice.java | 15 - .../FileExecutionResourcesSpringTest.java | 15 - .../execution/FileExecutionResourcesTest.java | 15 - .../slc/core/execution/ParameterRefTest.java | 15 - .../core/execution/tasks/SystemCallTest.java | 15 - .../core/execution/xml/FlowNamespaceTest.java | 15 - .../AbstractInternalSpringTestCase.java | 187 +- .../slc/core/test/context/ContextTest.java | 77 +- .../org/argeo/slc/ant/AntFlowGenerator.java | 15 - .../src/org/argeo/slc/ant/AntRun.java | 15 - .../core/attachment/AttachmentUploader.java | 15 - .../attachment/FileAttachmentsStorage.java | 15 - .../slc/core/attachment/SimpleAttachment.java | 15 - .../slc/core/build/ResourceDistribution.java | 15 - .../slc/core/build/VersionDistributionId.java | 179 +- .../build/VersionedResourceDistribution.java | 15 - .../slc/core/deploy/DefaultResourceSet.java | 15 - .../argeo/slc/core/deploy/DigestCheck.java | 15 - .../slc/core/deploy/LocalFilesDeployment.java | 15 - .../slc/core/deploy/MultiResourceSet.java | 15 - .../argeo/slc/core/deploy/ResourceSet.java | 15 - .../slc/core/deploy/SimpleExecutables.java | 15 - .../slc/core/deploy/VersionedDirSync.java | 15 - .../AbstractExecutionFlowGenerator.java | 15 - .../AbstractSpringExecutionModule.java | 15 - .../slc/core/execution/DefaultAgent.java | 15 - .../core/execution/DefaultExecutionFlow.java | 15 - ...faultExecutionFlowDescriptorConverter.java | 15 - .../core/execution/DefaultExecutionSpec.java | 15 - .../slc/core/execution/ExecutionAspect.java | 15 - .../ExecutionParameterPostProcessor.java | 601 +++--- .../core/execution/ExecutionResources.java | 15 - .../ExecutionResourcesFactoryBean.java | 15 - .../slc/core/execution/ExecutionScope.java | 15 - .../execution/FileExecutionResources.java | 15 - .../core/execution/MapExecutionContext.java | 15 - .../slc/core/execution/OsFileFactoryBean.java | 15 - .../slc/core/execution/ParameterRef.java | 15 - .../core/execution/SedFilteredResource.java | 15 - .../doc/ConsoleContextDescriber.java | 15 - .../core/execution/doc/ContextDescriber.java | 15 - .../generator/CompositeRunnableFactory.java | 139 +- .../generator/DefaultRunnableDataNode.java | 193 +- .../generator/ExecutionFlowGenerator.java | 347 ++- .../ExecutionFlowGeneratorSource.java | 63 +- .../execution/generator/RunnableCall.java | 125 +- .../execution/generator/RunnableCallFlow.java | 471 ++-- .../generator/RunnableCallFlowDescriptor.java | 125 +- .../execution/generator/RunnableDataNode.java | 133 +- .../execution/generator/RunnableFactory.java | 43 +- .../core/execution/tasks/CloseTestResult.java | 15 - .../argeo/slc/core/execution/tasks/Echo.java | 15 - .../argeo/slc/core/execution/tasks/If.java | 15 - .../slc/core/execution/tasks/JvmProcess.java | 15 - .../slc/core/execution/tasks/MergedLists.java | 15 - .../slc/core/execution/tasks/MethodCall.java | 15 - .../execution/tasks/OverrideContextAware.java | 129 +- .../slc/core/execution/tasks/SystemCall.java | 15 - .../tasks/SystemCallOutputListener.java | 15 - .../execution/tasks/UploadAttachments.java | 15 - .../core/execution/xml/AsFlowDecorator.java | 15 - .../xml/ExecutionScopeDecorator.java | 89 +- .../xml/FlowBeanDefinitionParser.java | 15 - .../execution/xml/FlowNamespaceHandler.java | 15 - .../core/execution/xml/NamespaceUtils.java | 15 - .../core/execution/xml/ParamDecorator.java | 15 - .../xml/SpecBeanDefinitionParser.java | 15 - .../test/context/DefaultContextTestData.java | 43 +- .../core/test/context/SimpleContextAware.java | 157 +- .../context/SimpleParentContextAware.java | 87 +- .../org/argeo/slc/osgi/BundleRegister.java | 15 - .../org/argeo/slc/osgi/BundlesManager.java | 15 - .../slc/osgi/FileSystemBundleRegister.java | 15 - .../MultipleServiceExporterPostProcessor.java | 15 - .../src/org/argeo/slc/osgi/OsgiBundle.java | 15 - .../argeo/slc/osgi/OsgiExecutionModule.java | 15 - .../slc/osgi/OsgiExecutionModulesManager.java | 15 - .../slc/osgi/OsgiExecutionResources.java | 15 - .../src/org/argeo/slc/osgi/OsgiRuntime.java | 15 - .../AbstractOsgiModularDistribution.java | 15 - .../osgi/build/BundleModularDistribution.java | 15 - .../slc/osgi/build/EclipseUpdateSite.java | 15 - .../osgi/build/EclipseUpdateSiteCategory.java | 15 - .../osgi/build/EclipseUpdateSiteFeature.java | 15 - .../build/OsgiRuntimeModularDistribution.java | 15 - .../slc/osgi/deploy/OsgiResourceSet.java | 15 - .../slc/spring/AbstractSystemExecution.java | 15 - ...catedApplicationContextInitialization.java | 15 - .../spring/auth/AbstractSystemExecution.java | 15 - ...catedApplicationContextInitialization.java | 15 - .../unit/AbstractExecutionFlowTestcase.java | 15 - .../unit/AbstractOsgiRuntimeTestCase.java | 15 - .../spring/unit/AbstractSpringTestCase.java | 215 +- .../ExecutionFlowDescriptorTestUtils.java | 15 - .../org/argeo/slc/spring/unit/UnitUtils.java | 99 +- .../src/org/argeo/slc/maven/CustomCli.java | 15 - .../argeo/slc/maven/DependencyFileLoader.java | 15 - .../argeo/slc/maven/ManualWagonProvider.java | 15 - .../src/org/argeo/slc/maven/MavenCall.java | 15 - .../slc/maven/MavenDeployEnvironment.java | 15 - .../src/org/argeo/slc/maven/MavenFile.java | 159 +- .../src/org/argeo/slc/maven/MavenManager.java | 337 ++- .../src/org/argeo/slc/maven/MavenToUrl.java | 15 - .../src/org/argeo/slc/maven/RemoteRepo.java | 15 - .../org/argeo/slc/diff/LineTokenizerTest.java | 15 - .../org/argeo/slc/diff/DataInterpreter.java | 55 +- .../src/org/argeo/slc/diff/Diff.java | 35 +- .../src/org/argeo/slc/diff/DiffIssue.java | 101 +- .../src/org/argeo/slc/diff/DiffIssueKey.java | 89 +- .../src/org/argeo/slc/diff/DiffKey.java | 33 +- .../src/org/argeo/slc/diff/DiffMissing.java | 67 +- .../org/argeo/slc/diff/DiffMissingXml.java | 101 +- .../org/argeo/slc/diff/DiffNotMatched.java | 165 +- .../src/org/argeo/slc/diff/DiffPosition.java | 79 +- .../src/org/argeo/slc/diff/DiffResult.java | 15 - .../org/argeo/slc/diff/KeyColumnsDiff.java | 15 - .../src/org/argeo/slc/diff/LineTokenizer.java | 15 - .../src/org/argeo/slc/diff/RelatedFile.java | 33 +- .../org/argeo/slc/diff/TableDiffPosition.java | 187 +- .../src/org/argeo/slc/diff/Tolerance.java | 51 +- .../src/org/argeo/slc/diff/ToleranceDiff.java | 15 - .../org/argeo/slc/diff/XPathDiffPosition.java | 85 +- .../org/argeo/slc/jsch/AbstractJschTask.java | 15 - .../slc/jsch/CallbackHandlerUserInfo.java | 15 - .../argeo/slc/jsch/JschContextSession.java | 15 - .../src/org/argeo/slc/jsch/JschExecutor.java | 15 - .../org/argeo/slc/jsch/JschMultiTasks.java | 15 - .../src/org/argeo/slc/jsch/RemoteExec.java | 15 - .../src/org/argeo/slc/jsch/ScpFrom.java | 15 - .../src/org/argeo/slc/jsch/ScpTo.java | 15 - .../org/argeo/slc/jsch/SimpleUserInfo.java | 15 - .../argeo/slc/jsch/SshFilesDeployment.java | 15 - .../src/org/argeo/slc/jsch/SshShell.java | 15 - .../src/org/argeo/slc/jsch/SshTarget.java | 15 - .../src/org/argeo/slc/jsch/SwingUserInfo.java | 15 - .../slc/lib/jcr/JcrRepositoryBackup.java | 15 - .../linux/DefaultRedhatDeploymentData.java | 15 - .../slc/lib/linux/DefaultRpmDistribution.java | 15 - .../slc/lib/linux/RedhatDeploymentData.java | 15 - .../slc/lib/linux/RedhatHostManager.java | 15 - .../argeo/slc/lib/linux/RpmDistribution.java | 15 - .../org/argeo/slc/lib/linux/ScriptCall.java | 15 - .../argeo/slc/lib/linux/SimpleLinuxHost.java | 15 - .../slc/lib/linux/rpmfactory/BuildInMock.java | 15 - .../slc/lib/linux/rpmfactory/CreateSrpm.java | 15 - .../slc/lib/linux/rpmfactory/ImportSrpm.java | 15 - .../linux/rpmfactory/RpmBuildEnvironment.java | 15 - .../slc/lib/linux/rpmfactory/RpmSpecFile.java | 15 - .../org/argeo/slc/lib/vbox/VBoxMachine.java | 15 - .../org/argeo/slc/lib/vbox/VBoxManager.java | 15 - .../src/org/argeo/slc/lib/vbox/VBoxNat.java | 15 - .../argeo/slc/lib/vbox/VBoxPortMapping.java | 15 - .../argeo/slc/log4j/SlcExecutionAppender.java | 15 - .../src/org/argeo/slc/mail/SendMail.java | 15 - .../deploy/HttpdApplicationDeployment.java | 151 +- .../deploy/HttpdApplicationTargetData.java | 145 +- .../argeo/slc/support/deploy/HttpdServer.java | 115 +- .../support/deploy/HttpdServerDeployment.java | 15 - .../deploy/HttpdServerDeploymentData.java | 15 - .../support/deploy/HttpdServerManager.java | 15 - .../support/deploy/HttpdServerTargetData.java | 15 - .../deploy/SimpleHttpdApplication.java | 109 +- .../slc/support/deploy/WebApplication.java | 39 +- .../argeo/slc/support/deploy/WebServer.java | 33 +- .../argeo/slc/support/deploy/db/DbModel.java | 15 - .../slc/support/deploy/db/JdbcAware.java | 15 - .../support/deploy/db/SimpleJdbcDatabase.java | 15 - .../src/org/argeo/slc/vfs/VfsResource.java | 15 - .../org/argeo/slc/vfs/VfsResourceFactory.java | 15 - .../src/org/argeo/slc/vfs/VfsResourceSet.java | 15 - pom.xml | 3 + .../argeo/eclipse/ui/specific/DefaultNLS.java | 15 - .../ui/specific/EclipseUiSpecificUtils.java | 15 - .../argeo/eclipse/ui/specific/OpenFile.java | 15 - 485 files changed, 4876 insertions(+), 12163 deletions(-) diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/AnonymousEntryPoint.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/AnonymousEntryPoint.java index 7c2d57221..586c1ee18 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/AnonymousEntryPoint.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/AnonymousEntryPoint.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.rap; import java.security.PrivilegedAction; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/RapActionBarAdvisor.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/RapActionBarAdvisor.java index c18a9a78e..a5acfe528 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/RapActionBarAdvisor.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/RapActionBarAdvisor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.rap; import org.argeo.cms.auth.CurrentUser; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/RapWindowAdvisor.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/RapWindowAdvisor.java index 60bad090c..58f274312 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/RapWindowAdvisor.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/RapWindowAdvisor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.rap; import org.eclipse.swt.SWT; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/RapWorkbenchAdvisor.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/RapWorkbenchAdvisor.java index b650dbbf5..6abaaffb7 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/RapWorkbenchAdvisor.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/RapWorkbenchAdvisor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.rap; import org.eclipse.ui.IPerspectiveDescriptor; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/SecureRapActivator.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/SecureRapActivator.java index 74068c241..309b7affc 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/SecureRapActivator.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/SecureRapActivator.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.rap; import org.osgi.framework.BundleActivator; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/OpenHome.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/OpenHome.java index 86e01036d..d5a36ede5 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/OpenHome.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/OpenHome.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.rap.commands; import org.argeo.cms.ui.workbench.UserHomePerspective; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/UserMenu.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/UserMenu.java index 4934e5620..038eea3e7 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/UserMenu.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench.rap/src/org/argeo/cms/ui/workbench/rap/commands/UserMenu.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.rap.commands; import org.eclipse.core.commands.AbstractHandler; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/spring/AbstractSystemExecution.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/spring/AbstractSystemExecution.java index 082a28793..3c3220099 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/spring/AbstractSystemExecution.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/spring/AbstractSystemExecution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.spring; import javax.security.auth.Subject; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/spring/AuthenticatedApplicationContextInitialization.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/spring/AuthenticatedApplicationContextInitialization.java index e1af58274..510732cfc 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/spring/AuthenticatedApplicationContextInitialization.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/spring/AuthenticatedApplicationContextInitialization.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.spring; import java.security.AccessController; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/JcrBrowserPerspective.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/JcrBrowserPerspective.java index 53a916a15..fcd4c5238 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/JcrBrowserPerspective.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/JcrBrowserPerspective.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench; import org.argeo.cms.ui.workbench.jcr.JcrBrowserView; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/MaintenancePerspective.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/MaintenancePerspective.java index 9bfcbad18..b5cf76b15 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/MaintenancePerspective.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/MaintenancePerspective.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench; import org.argeo.cms.ui.workbench.useradmin.AdminLogView; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/OsgiExplorerPerspective.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/OsgiExplorerPerspective.java index 5534a6126..28838e3a6 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/OsgiExplorerPerspective.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/OsgiExplorerPerspective.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench; import org.eclipse.ui.IPageLayout; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/SecurityAdminPerspective.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/SecurityAdminPerspective.java index 04b54ee80..b2e04261b 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/SecurityAdminPerspective.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/SecurityAdminPerspective.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench; import org.argeo.cms.ui.workbench.internal.useradmin.parts.GroupsView; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/UserHomePerspective.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/UserHomePerspective.java index e5e98170a..26f0dfe21 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/UserHomePerspective.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/UserHomePerspective.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench; import org.argeo.cms.ui.workbench.jcr.NodeFsBrowserView; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/WorkbenchUiPlugin.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/WorkbenchUiPlugin.java index 9d5275ac8..614a44e07 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/WorkbenchUiPlugin.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/WorkbenchUiPlugin.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench; import java.io.IOException; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/commands/OpenChangePasswordDialog.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/commands/OpenChangePasswordDialog.java index 6913a9aa1..31e7f469d 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/commands/OpenChangePasswordDialog.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/commands/OpenChangePasswordDialog.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.commands; import static org.argeo.cms.CmsMsg.changePassword; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/commands/OpenEditor.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/commands/OpenEditor.java index ecf84c351..a8be3af39 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/commands/OpenEditor.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/commands/OpenEditor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.commands; import javax.jcr.Node; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/commands/OpenHomePerspective.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/commands/OpenHomePerspective.java index 0e1983234..0a84d3c6c 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/commands/OpenHomePerspective.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/commands/OpenHomePerspective.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.commands; import org.argeo.cms.ui.workbench.UserHomePerspective; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/WorkbenchConstants.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/WorkbenchConstants.java index 8cfb0e8f7..02cd7244b 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/WorkbenchConstants.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/WorkbenchConstants.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal; /** Constants used across the application. */ diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/AddFolderNode.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/AddFolderNode.java index f17fde91d..60a268446 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/AddFolderNode.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/AddFolderNode.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import javax.jcr.Node; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/AddPrivileges.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/AddPrivileges.java index fafd76b72..103fefd34 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/AddPrivileges.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/AddPrivileges.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import javax.jcr.Node; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/AddRemoteRepository.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/AddRemoteRepository.java index 1446369ed..d309a7778 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/AddRemoteRepository.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/AddRemoteRepository.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import java.net.URI; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/ConfigurableNodeDump.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/ConfigurableNodeDump.java index 60f424433..d89aa5047 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/ConfigurableNodeDump.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/ConfigurableNodeDump.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import java.io.File; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/CreateWorkspace.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/CreateWorkspace.java index 2d6949cd5..f12b85e88 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/CreateWorkspace.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/CreateWorkspace.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import java.util.Arrays; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/DeleteNodes.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/DeleteNodes.java index a0c677091..fa0f528c1 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/DeleteNodes.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/DeleteNodes.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import java.util.Iterator; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/DumpNode.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/DumpNode.java index 2dbb25932..636fdd270 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/DumpNode.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/DumpNode.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import static org.argeo.eclipse.ui.util.SingleSourcingConstants.FILE_SCHEME; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/EditNode.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/EditNode.java index 67f82380b..560b6befa 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/EditNode.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/EditNode.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import java.util.HashMap; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/GetNodeSize.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/GetNodeSize.java index 38d68136f..d31674afa 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/GetNodeSize.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/GetNodeSize.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/Refresh.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/Refresh.java index 1924b63a7..157e39a46 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/Refresh.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/Refresh.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import java.util.Iterator; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/RemovePrivileges.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/RemovePrivileges.java index cd2618d5f..bd845fc81 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/RemovePrivileges.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/RemovePrivileges.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import java.security.Principal; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/RemoveRemoteRepository.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/RemoveRemoteRepository.java index c1be6ceea..156878b43 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/RemoveRemoteRepository.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/RemoveRemoteRepository.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import org.argeo.cms.ui.jcr.model.RemoteRepositoryElem; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/RenameNode.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/RenameNode.java index 7f4b55418..5bae6546c 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/RenameNode.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/RenameNode.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import java.util.Iterator; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/SortChildNodes.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/SortChildNodes.java index 4b3d6f308..ad9314729 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/SortChildNodes.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/SortChildNodes.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import org.argeo.cms.ui.workbench.WorkbenchUiPlugin; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/UploadFiles.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/UploadFiles.java index 42d4b301b..dcc0d0ebc 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/UploadFiles.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/commands/UploadFiles.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.commands; import java.io.InputStream; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/AbstractJcrQueryEditor.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/AbstractJcrQueryEditor.java index 3839a81c6..7f97d5806 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/AbstractJcrQueryEditor.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/AbstractJcrQueryEditor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.parts; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/AddPrivilegeWizard.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/AddPrivilegeWizard.java index 25d9ad787..110f816eb 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/AddPrivilegeWizard.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/AddPrivilegeWizard.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.parts; import java.util.Collections; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/ChildNodesPage.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/ChildNodesPage.java index eb8629278..b11554c00 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/ChildNodesPage.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/ChildNodesPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.parts; import javax.jcr.Node; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/ChooseNameDialog.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/ChooseNameDialog.java index 080ea9485..229aa56ba 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/ChooseNameDialog.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/ChooseNameDialog.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.parts; import org.eclipse.jface.dialogs.IMessageProvider; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/GenericNodeEditorInput.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/GenericNodeEditorInput.java index 43866945c..37c36110b 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/GenericNodeEditorInput.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/GenericNodeEditorInput.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.parts; import javax.jcr.Node; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/GenericNodePage.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/GenericNodePage.java index 2f2ec899a..367655951 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/GenericNodePage.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/GenericNodePage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.parts; import java.text.DateFormat; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/GenericPropertyPage.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/GenericPropertyPage.java index 50f89625a..4cfef6cb1 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/GenericPropertyPage.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/GenericPropertyPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.parts; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/JcrQueryEditorInput.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/JcrQueryEditorInput.java index 11256fe75..2cd5bccea 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/JcrQueryEditorInput.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/JcrQueryEditorInput.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.parts; import javax.jcr.query.Query; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/NodeEditorInput.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/NodeEditorInput.java index d51aeb3f2..a0a5cbb1f 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/NodeEditorInput.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/NodeEditorInput.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.parts; import org.eclipse.jface.resource.ImageDescriptor; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/NodePrivilegesPage.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/NodePrivilegesPage.java index 5aee1f351..db0d7e99f 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/NodePrivilegesPage.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/NodePrivilegesPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.parts; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/NodeVersionHistoryPage.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/NodeVersionHistoryPage.java index 166ece9d8..fa90a424f 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/NodeVersionHistoryPage.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/NodeVersionHistoryPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.parts; import java.text.DateFormat; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/StringNodeEditorInput.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/StringNodeEditorInput.java index 6aae94c28..af084346e 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/StringNodeEditorInput.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/jcr/parts/StringNodeEditorInput.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.jcr.parts; import org.eclipse.jface.resource.ImageDescriptor; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/SecurityAdminImages.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/SecurityAdminImages.java index 816dead6e..f9b1797e0 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/SecurityAdminImages.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/SecurityAdminImages.java @@ -1,29 +1,3 @@ -/* - * Argeo Connect - Data management and communications - * Copyright (C) 2012 Argeo GmbH - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * - * Additional permission under GNU GPL version 3 section 7 - * - * If you modify this Program, or any covered work, by linking or combining it - * with software covered by the terms of the Eclipse Public License, the - * licensors of this Program grant you additional permission to convey the - * resulting work. Corresponding Source for a non-source form of such a - * combination shall include the source code for the parts of such software - * which are used as well as that of the covered work. - */ package org.argeo.cms.ui.workbench.internal.useradmin; import static org.argeo.cms.ui.workbench.WorkbenchUiPlugin.getImageDescriptor; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/DeleteGroups.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/DeleteGroups.java index c3018829d..486a82d57 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/DeleteGroups.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/DeleteGroups.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.commands; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/DeleteUsers.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/DeleteUsers.java index 0b7462061..5b7c80c66 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/DeleteUsers.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/DeleteUsers.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.commands; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/ForceRefresh.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/ForceRefresh.java index 86a2eedef..234cb0b72 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/ForceRefresh.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/ForceRefresh.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.commands; import org.argeo.cms.ui.workbench.internal.useradmin.parts.GroupsView; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/NewGroup.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/NewGroup.java index 51a14fcbd..a7782b765 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/NewGroup.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/NewGroup.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.commands; import java.util.Dictionary; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/NewUser.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/NewUser.java index 5bb9676e3..bccfff139 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/NewUser.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/NewUser.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.commands; import java.util.Dictionary; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/SaveArgeoUser.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/SaveArgeoUser.java index ef1ddbdbd..168dc6ade 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/SaveArgeoUser.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/SaveArgeoUser.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.commands; import org.argeo.cms.ui.workbench.WorkbenchUiPlugin; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/UserBatchUpdate.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/UserBatchUpdate.java index 7d29e8f5a..c23b386ae 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/UserBatchUpdate.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/UserBatchUpdate.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.commands; import org.argeo.cms.ui.workbench.internal.useradmin.UserAdminWrapper; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/UserTransactionHandler.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/UserTransactionHandler.java index 69fd0711a..6e72912b3 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/UserTransactionHandler.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/commands/UserTransactionHandler.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.commands; import javax.transaction.Status; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/ArgeoUserEditorInput.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/ArgeoUserEditorInput.java index 71089f690..c70ef9c68 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/ArgeoUserEditorInput.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/ArgeoUserEditorInput.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.parts; import org.eclipse.jface.resource.ImageDescriptor; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/GroupMainPage.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/GroupMainPage.java index 8976956ff..f98697536 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/GroupMainPage.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/GroupMainPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.parts; import static org.argeo.api.NodeInstance.WORKGROUP; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/GroupsView.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/GroupsView.java index aec02b4f8..46c891f52 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/GroupsView.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/GroupsView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.parts; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UserEditor.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UserEditor.java index 02da6258e..3acd1850a 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UserEditor.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UserEditor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.parts; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UserEditorInput.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UserEditorInput.java index 1e7ee4b10..840a6eb77 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UserEditorInput.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UserEditorInput.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.parts; import org.eclipse.jface.resource.ImageDescriptor; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UserMainPage.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UserMainPage.java index c37896539..772a55408 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UserMainPage.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UserMainPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.parts; import static org.argeo.cms.auth.UserAdminUtils.getProperty; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UsersView.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UsersView.java index 73c8e8563..b09d59eed 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UsersView.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/internal/useradmin/parts/UsersView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.internal.useradmin.parts; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/DefaultNodeEditor.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/DefaultNodeEditor.java index e502dd462..2b856ed62 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/DefaultNodeEditor.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/DefaultNodeEditor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.jcr; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/GenericJcrQueryEditor.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/GenericJcrQueryEditor.java index 7c7f2b97b..cfbc1f8cc 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/GenericJcrQueryEditor.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/GenericJcrQueryEditor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.jcr; import org.argeo.cms.ui.workbench.WorkbenchUiPlugin; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/JcrBrowserView.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/JcrBrowserView.java index f58d62afd..c7c221d91 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/JcrBrowserView.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/JcrBrowserView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.jcr; import java.util.List; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/NodeFsBrowserView.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/NodeFsBrowserView.java index cba228f2d..eec7b5152 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/NodeFsBrowserView.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/jcr/NodeFsBrowserView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.jcr; import java.net.URI; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/BundlesView.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/BundlesView.java index 4032e785c..ade7ca49d 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/BundlesView.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/BundlesView.java @@ -1,21 +1,6 @@ //package org.argeo.eclipse.ui.workbench.osgi; //public class BundlesView {} -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.osgi; import org.argeo.cms.ui.workbench.WorkbenchUiPlugin; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/CmsSessionsView.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/CmsSessionsView.java index 44b554ed1..e5cd8414e 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/CmsSessionsView.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/CmsSessionsView.java @@ -1,21 +1,6 @@ //package org.argeo.eclipse.ui.workbench.osgi; //public class BundlesView {} -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.osgi; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/ModulesView.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/ModulesView.java index 235261a58..6d97f1dfa 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/ModulesView.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/ModulesView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.osgi; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/MultiplePackagesView.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/MultiplePackagesView.java index a7f9a5335..97ed5352a 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/MultiplePackagesView.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/MultiplePackagesView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.osgi; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/OsgiExplorerImages.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/OsgiExplorerImages.java index 1233e11e6..c822471e7 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/OsgiExplorerImages.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/osgi/OsgiExplorerImages.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.osgi; import org.argeo.cms.ui.workbench.WorkbenchUiPlugin; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/AdminLogView.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/AdminLogView.java index 742066a9a..cdc0e8b58 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/AdminLogView.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/AdminLogView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.useradmin; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/LogContentProvider.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/LogContentProvider.java index 5e4c30451..b65313cc7 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/LogContentProvider.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/LogContentProvider.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.useradmin; import java.text.DateFormat; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/LogView.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/LogView.java index 3639520f5..b95de6a2a 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/LogView.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/LogView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.useradmin; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/UserProfile.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/UserProfile.java index c86e9a08e..7fb451d27 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/UserProfile.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/useradmin/UserProfile.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.useradmin; import java.util.TreeSet; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/util/CommandUtils.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/util/CommandUtils.java index b05ba0746..8b8443928 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/util/CommandUtils.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/util/CommandUtils.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.util; import java.util.ArrayList; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/util/RolesSourceProvider.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/util/RolesSourceProvider.java index f71c13d6c..c286eb7ee 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/util/RolesSourceProvider.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/cms/ui/workbench/util/RolesSourceProvider.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.util; import java.util.HashMap; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/eclipse/spring/ApplicationContextTracker.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/eclipse/spring/ApplicationContextTracker.java index 1d3df4304..81e8d9edf 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/eclipse/spring/ApplicationContextTracker.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/eclipse/spring/ApplicationContextTracker.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.eclipse.spring; import static java.text.MessageFormat.format; @@ -28,12 +13,7 @@ import org.osgi.framework.InvalidSyntaxException; import org.osgi.util.tracker.ServiceTracker; import org.springframework.context.ApplicationContext; -/** - * Tracks Spring application context published as services. - * - * @author Heiko Seeberger - * @author Mathieu Baudier - */ +/** Tracks Spring application context published as services. */ class ApplicationContextTracker { private final static Log log = LogFactory .getLog(ApplicationContextTracker.class); diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/eclipse/spring/SpringCommandHandler.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/eclipse/spring/SpringCommandHandler.java index 698b93741..0fb40b0cf 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/eclipse/spring/SpringCommandHandler.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/eclipse/spring/SpringCommandHandler.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.eclipse.spring; import org.apache.commons.logging.Log; diff --git a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/eclipse/spring/SpringExtensionFactory.java b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/eclipse/spring/SpringExtensionFactory.java index ab1e8caf6..6b9c7857d 100644 --- a/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/eclipse/spring/SpringExtensionFactory.java +++ b/legacy/argeo-commons/org.argeo.cms.ui.workbench/src/org/argeo/eclipse/spring/SpringExtensionFactory.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.eclipse.spring; import org.argeo.eclipse.ui.EclipseUiException; @@ -44,9 +29,6 @@ import org.springframework.context.ApplicationContext; * original code from: Blog entry - * - * @author Martin Lippert - * @author mbaudier */ public class SpringExtensionFactory implements IExecutableExtensionFactory, IExecutableExtension { diff --git a/org.argeo.slc.api/src/org/argeo/slc/BasicNameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/BasicNameVersion.java index 9d8e71af0..61ed5eb12 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/BasicNameVersion.java +++ b/org.argeo.slc.api/src/org/argeo/slc/BasicNameVersion.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; import java.io.Serializable; diff --git a/org.argeo.slc.api/src/org/argeo/slc/Condition.java b/org.argeo.slc.api/src/org/argeo/slc/Condition.java index f5199ce4f..f476961f0 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/Condition.java +++ b/org.argeo.slc.api/src/org/argeo/slc/Condition.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; /** Binary check on an arbitrary object. */ diff --git a/org.argeo.slc.api/src/org/argeo/slc/DefaultNameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/DefaultNameVersion.java index bd64198f0..61cc66e2a 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/DefaultNameVersion.java +++ b/org.argeo.slc.api/src/org/argeo/slc/DefaultNameVersion.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.api/src/org/argeo/slc/NameVersion.java b/org.argeo.slc.api/src/org/argeo/slc/NameVersion.java index 0086cbb16..19060490a 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/NameVersion.java +++ b/org.argeo.slc.api/src/org/argeo/slc/NameVersion.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; /** diff --git a/org.argeo.slc.api/src/org/argeo/slc/SlcException.java b/org.argeo.slc.api/src/org/argeo/slc/SlcException.java index 408bd06df..d2e5e2b0b 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/SlcException.java +++ b/org.argeo.slc.api/src/org/argeo/slc/SlcException.java @@ -1,32 +1,17 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; - -/** Basis for all SLC exceptions. This is an unchecked exception. */ -public class SlcException extends RuntimeException { - private static final long serialVersionUID = 6373738619304106445L; - - /** Constructor. */ - public SlcException(String message) { - super(message); - } - - /** Constructor. */ - public SlcException(String message, Throwable e) { - super(message, e); - } - -} +package org.argeo.slc; + +/** Basis for all SLC exceptions. This is an unchecked exception. */ +public class SlcException extends RuntimeException { + private static final long serialVersionUID = 6373738619304106445L; + + /** Constructor. */ + public SlcException(String message) { + super(message); + } + + /** Constructor. */ + public SlcException(String message, Throwable e) { + super(message, e); + } + +} diff --git a/org.argeo.slc.api/src/org/argeo/slc/SlcNames.java b/org.argeo.slc.api/src/org/argeo/slc/SlcNames.java index 7e3205919..557d4792d 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/SlcNames.java +++ b/org.argeo.slc.api/src/org/argeo/slc/SlcNames.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; /** JCR names used by SLC */ diff --git a/org.argeo.slc.api/src/org/argeo/slc/SlcTypes.java b/org.argeo.slc.api/src/org/argeo/slc/SlcTypes.java index d807aad8f..e0b86e6a6 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/SlcTypes.java +++ b/org.argeo.slc.api/src/org/argeo/slc/SlcTypes.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; /** JCR node types used by SLC */ diff --git a/org.argeo.slc.api/src/org/argeo/slc/StreamReadable.java b/org.argeo.slc.api/src/org/argeo/slc/StreamReadable.java index 302a226e9..f1bef22fd 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/StreamReadable.java +++ b/org.argeo.slc.api/src/org/argeo/slc/StreamReadable.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; import java.io.InputStream; diff --git a/org.argeo.slc.api/src/org/argeo/slc/UnsupportedException.java b/org.argeo.slc.api/src/org/argeo/slc/UnsupportedException.java index fe6332209..aa050e30d 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/UnsupportedException.java +++ b/org.argeo.slc.api/src/org/argeo/slc/UnsupportedException.java @@ -1,69 +1,54 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; - -/** Exception for unsupported features or actions. */ -public class UnsupportedException extends SlcException { - static final long serialVersionUID = 1l; - - /** Action not supported. */ - public UnsupportedException() { - this("Action not supported"); - } - - /** Constructor with a message. */ - public UnsupportedException(String message) { - super(message); - } - - /** - * Constructor generating a message. - * - * @param nature - * the nature of the unsupported object - * @param obj - * the object itself (its class name will be used in message) - */ - public UnsupportedException(String nature, Object obj) { - super("Unsupported " + nature + ": " - + (obj != null ? obj.getClass() : "[object is null]")); - } - - /** - * Constructor generating a message. - * - * @param nature - * the nature of the unsupported object - * @param clss - * the class itself (will be used in message) - */ - public UnsupportedException(String nature, Class clss) { - super("Unsupported " + nature + ": " + clss); - } - - /** - * Constructor generating a message. - * - * @param nature - * the nature of the unsupported object - * @param value - * the problematic value itself - */ - public UnsupportedException(String nature, String value) { - super("Unsupported " + nature + ": " + value); - } - -} +package org.argeo.slc; + +/** Exception for unsupported features or actions. */ +public class UnsupportedException extends SlcException { + static final long serialVersionUID = 1l; + + /** Action not supported. */ + public UnsupportedException() { + this("Action not supported"); + } + + /** Constructor with a message. */ + public UnsupportedException(String message) { + super(message); + } + + /** + * Constructor generating a message. + * + * @param nature + * the nature of the unsupported object + * @param obj + * the object itself (its class name will be used in message) + */ + public UnsupportedException(String nature, Object obj) { + super("Unsupported " + nature + ": " + + (obj != null ? obj.getClass() : "[object is null]")); + } + + /** + * Constructor generating a message. + * + * @param nature + * the nature of the unsupported object + * @param clss + * the class itself (will be used in message) + */ + public UnsupportedException(String nature, Class clss) { + super("Unsupported " + nature + ": " + clss); + } + + /** + * Constructor generating a message. + * + * @param nature + * the nature of the unsupported object + * @param value + * the problematic value itself + */ + public UnsupportedException(String nature, String value) { + super("Unsupported " + nature + ": " + value); + } + +} diff --git a/org.argeo.slc.api/src/org/argeo/slc/attachment/Attachment.java b/org.argeo.slc.api/src/org/argeo/slc/attachment/Attachment.java index 9ad961355..65732511e 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/attachment/Attachment.java +++ b/org.argeo.slc.api/src/org/argeo/slc/attachment/Attachment.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.attachment; public interface Attachment { diff --git a/org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsEnabled.java b/org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsEnabled.java index 53c8cdf4b..0b44e5b9e 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsEnabled.java +++ b/org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsEnabled.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.attachment; public interface AttachmentsEnabled { diff --git a/org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsStorage.java b/org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsStorage.java index 94a845c7b..48cd0e650 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsStorage.java +++ b/org.argeo.slc.api/src/org/argeo/slc/attachment/AttachmentsStorage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.attachment; import java.io.InputStream; diff --git a/org.argeo.slc.api/src/org/argeo/slc/build/Distribution.java b/org.argeo.slc.api/src/org/argeo/slc/build/Distribution.java index 9e233e223..b438a8f9a 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/build/Distribution.java +++ b/org.argeo.slc.api/src/org/argeo/slc/build/Distribution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.build; /** A packaged software component */ diff --git a/org.argeo.slc.api/src/org/argeo/slc/build/ModularDistribution.java b/org.argeo.slc.api/src/org/argeo/slc/build/ModularDistribution.java index 0b917aa49..3c7f625c1 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/build/ModularDistribution.java +++ b/org.argeo.slc.api/src/org/argeo/slc/build/ModularDistribution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.build; import org.argeo.slc.ModuleSet; diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployEnvironment.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployEnvironment.java index 2dce868d1..dd4736929 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployEnvironment.java +++ b/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployEnvironment.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.deploy; import java.io.File; diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystem.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystem.java index 89c1708c5..be28154fe 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystem.java +++ b/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystem.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.deploy; import org.argeo.slc.build.Distribution; diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystemManager.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystemManager.java index 092ac5548..411bcb6b9 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystemManager.java +++ b/org.argeo.slc.api/src/org/argeo/slc/deploy/DeployedSystemManager.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.deploy; public interface DeployedSystemManager { diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/Deployment.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/Deployment.java index 99f4e1037..74be42ab0 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/deploy/Deployment.java +++ b/org.argeo.slc.api/src/org/argeo/slc/deploy/Deployment.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.deploy; import org.argeo.slc.build.Distribution; diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/DeploymentData.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/DeploymentData.java index e5b0f4044..18e63f829 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/deploy/DeploymentData.java +++ b/org.argeo.slc.api/src/org/argeo/slc/deploy/DeploymentData.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.deploy; public interface DeploymentData { diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/DynamicRuntime.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/DynamicRuntime.java index 231d52af9..ed29ce280 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/deploy/DynamicRuntime.java +++ b/org.argeo.slc.api/src/org/argeo/slc/deploy/DynamicRuntime.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.deploy; import org.argeo.slc.NameVersion; diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/InstalledExecutables.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/InstalledExecutables.java index 0f9601c19..2d65a716c 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/deploy/InstalledExecutables.java +++ b/org.argeo.slc.api/src/org/argeo/slc/deploy/InstalledExecutables.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.deploy; public interface InstalledExecutables extends DeployedSystem { diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/ModularDeployedSystem.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/ModularDeployedSystem.java index 6805eec00..18fd4fe6d 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/deploy/ModularDeployedSystem.java +++ b/org.argeo.slc.api/src/org/argeo/slc/deploy/ModularDeployedSystem.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.deploy; import java.util.List; diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/Module.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/Module.java index 2a0bd4d23..10973c999 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/deploy/Module.java +++ b/org.argeo.slc.api/src/org/argeo/slc/deploy/Module.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.deploy; import org.argeo.slc.NameVersion; diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/ModuleDescriptor.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/ModuleDescriptor.java index d6f878399..f1d664283 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/deploy/ModuleDescriptor.java +++ b/org.argeo.slc.api/src/org/argeo/slc/deploy/ModuleDescriptor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.deploy; import java.io.Serializable; diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/ModulesManager.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/ModulesManager.java index d7ec9453f..1288592d6 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/deploy/ModulesManager.java +++ b/org.argeo.slc.api/src/org/argeo/slc/deploy/ModulesManager.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.deploy; import java.util.List; diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/TargetData.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/TargetData.java index 8472e7e3b..f1c7e7d13 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/deploy/TargetData.java +++ b/org.argeo.slc.api/src/org/argeo/slc/deploy/TargetData.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.deploy; public interface TargetData { diff --git a/org.argeo.slc.api/src/org/argeo/slc/deploy/VersioningDriver.java b/org.argeo.slc.api/src/org/argeo/slc/deploy/VersioningDriver.java index 52659b7d5..dba57970c 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/deploy/VersioningDriver.java +++ b/org.argeo.slc.api/src/org/argeo/slc/deploy/VersioningDriver.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.deploy; import java.io.File; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/AbstractExecutionValue.java b/org.argeo.slc.api/src/org/argeo/slc/execution/AbstractExecutionValue.java index 23ab55ebe..7f6362601 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/AbstractExecutionValue.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/AbstractExecutionValue.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.io.Serializable; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/AbstractSpecAttribute.java b/org.argeo.slc.api/src/org/argeo/slc/execution/AbstractSpecAttribute.java index 5b1438ad2..d720db61e 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/AbstractSpecAttribute.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/AbstractSpecAttribute.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.io.Serializable; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionContext.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionContext.java index 9a88f52cd..46c448f41 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionContext.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionContext.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; /** Variables or references attached to an execution (typically thread bounded).*/ diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlow.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlow.java index 5ebcdf07d..7dd3a74af 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlow.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlow.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.util.Iterator; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptor.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptor.java index e3eea046f..d38bb8524 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptor.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.io.Serializable; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptorConverter.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptorConverter.java index f43e14de3..13ff63876 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptorConverter.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionFlowDescriptorConverter.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.util.Map; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModule.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModule.java index 79d788b34..11021f60e 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModule.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModule.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; @Deprecated diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModuleDescriptor.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModuleDescriptor.java index 4de026822..cad6efb81 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModuleDescriptor.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModuleDescriptor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.util.ArrayList; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesListener.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesListener.java index 52b52a649..aa0b16df4 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesListener.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesListener.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import org.argeo.slc.deploy.ModuleDescriptor; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesManager.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesManager.java index 06681747a..1cedd12a2 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesManager.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionModulesManager.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.util.List; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionProcess.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionProcess.java index 550c16484..d894e1c23 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionProcess.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionProcess.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.util.List; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionResources.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionResources.java index ea93d0589..9ddbca988 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionResources.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionResources.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.io.File; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpec.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpec.java index 49d7c795f..0037b6d67 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpec.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpec.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.util.Map; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpecAttribute.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpecAttribute.java index a430e5bb0..39f87d9a1 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpecAttribute.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpecAttribute.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; /** diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStack.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStack.java index 64cc3a8c5..0a15e33b5 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStack.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStack.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; /** Deal with nested level of executions using different variables. */ diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStackLevel.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStackLevel.java index 7729d591a..790404b58 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStackLevel.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStackLevel.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.util.Map; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStep.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStep.java index 628a3b69d..47c69180d 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStep.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStep.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.io.Serializable; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/RealizedFlow.java b/org.argeo.slc.api/src/org/argeo/slc/execution/RealizedFlow.java index ebd72c7e7..c1290a958 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/RealizedFlow.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/RealizedFlow.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.io.Serializable; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/RefSpecAttribute.java b/org.argeo.slc.api/src/org/argeo/slc/execution/RefSpecAttribute.java index ccfebaf03..b9bded031 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/RefSpecAttribute.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/RefSpecAttribute.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.util.List; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/RefValue.java b/org.argeo.slc.api/src/org/argeo/slc/execution/RefValue.java index b66f2c474..02be2a6ba 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/RefValue.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/RefValue.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; /** Reference value to be used by an execution */ diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/RefValueChoice.java b/org.argeo.slc.api/src/org/argeo/slc/execution/RefValueChoice.java index 83c880a8e..c4c403e6e 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/RefValueChoice.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/RefValueChoice.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.io.Serializable; diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/SlcAgent.java b/org.argeo.slc.api/src/org/argeo/slc/execution/SlcAgent.java index c96d4a884..039724f50 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/SlcAgent.java +++ b/org.argeo.slc.api/src/org/argeo/slc/execution/SlcAgent.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.execution; import java.net.URI; diff --git a/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveAccessor.java b/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveAccessor.java index ce71429d7..b3f87ba1a 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveAccessor.java +++ b/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveAccessor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.primitive; /** Abstraction of access to primitive values */ diff --git a/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveSpecAttribute.java b/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveSpecAttribute.java index eb9ff2ad8..cc3ee6722 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveSpecAttribute.java +++ b/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveSpecAttribute.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.primitive; import org.argeo.slc.SlcException; diff --git a/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveUtils.java b/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveUtils.java index d7284cf8d..679e808e9 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveUtils.java +++ b/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveUtils.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.primitive; /** Converts to and from primitive types. */ diff --git a/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveValue.java b/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveValue.java index b3ade50d9..0c2bf23fe 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveValue.java +++ b/org.argeo.slc.api/src/org/argeo/slc/primitive/PrimitiveValue.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.primitive; import org.argeo.slc.execution.AbstractExecutionValue; diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/ExecutableTestRun.java b/org.argeo.slc.api/src/org/argeo/slc/test/ExecutableTestRun.java index a70b592d9..f18196a49 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/ExecutableTestRun.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/ExecutableTestRun.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test; diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/IncompatibleTestDataException.java b/org.argeo.slc.api/src/org/argeo/slc/test/IncompatibleTestDataException.java index 4cc6ddde1..de5d900af 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/IncompatibleTestDataException.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/IncompatibleTestDataException.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test; import org.argeo.slc.SlcException; diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestData.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestData.java index 1b3f46687..47973adee 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/TestData.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/TestData.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test; /** diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestDataProvider.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestDataProvider.java index 711c17730..754a3df00 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/TestDataProvider.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/TestDataProvider.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test; public interface TestDataProvider { diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestDefinition.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestDefinition.java index 5fea1dc98..c7bfeac71 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/TestDefinition.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/TestDefinition.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test; /** diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestResult.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestResult.java index d3ef62bb8..767b28613 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/TestResult.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/TestResult.java @@ -1,42 +1,27 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test; - -import java.util.Date; -import java.util.Map; - -/** The result of a test */ -public interface TestResult extends TestStatus, TestRunAware { - public String getUuid(); - - /** Adds a part of the result. */ - public void addResultPart(TestResultPart part); - - /** - * Marks that the collection of test results is completed and free the - * related resources (also closing listeners). - */ - public void close(); - - /** - * The date when this test result was closed. Can be null, which means the - * result is not closed. - */ - public Date getCloseDate(); - - /** Additional arbitrary meta data */ - public Map getAttributes(); -} +package org.argeo.slc.test; + +import java.util.Date; +import java.util.Map; + +/** The result of a test */ +public interface TestResult extends TestStatus, TestRunAware { + public String getUuid(); + + /** Adds a part of the result. */ + public void addResultPart(TestResultPart part); + + /** + * Marks that the collection of test results is completed and free the + * related resources (also closing listeners). + */ + public void close(); + + /** + * The date when this test result was closed. Can be null, which means the + * result is not closed. + */ + public Date getCloseDate(); + + /** Additional arbitrary meta data */ + public Map getAttributes(); +} diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestResultListener.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestResultListener.java index 788e1b8ad..c2ad8ed66 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/TestResultListener.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/TestResultListener.java @@ -1,25 +1,10 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test; - -/** Listener to the operations on a test result. */ -public interface TestResultListener { - /** Notified when a part was added to a test result. */ - public void resultPartAdded(T testResult, TestResultPart testResultPart); - - /** Stops listening and release the related resources. */ - public void close(T testResult); -} +package org.argeo.slc.test; + +/** Listener to the operations on a test result. */ +public interface TestResultListener { + /** Notified when a part was added to a test result. */ + public void resultPartAdded(T testResult, TestResultPart testResultPart); + + /** Stops listening and release the related resources. */ + public void close(T testResult); +} diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestResultPart.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestResultPart.java index aeac4ad63..ec984f9cc 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/TestResultPart.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/TestResultPart.java @@ -1,32 +1,17 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test; - -/** - * Part of a test result. - * - * @see TestResult - */ -public interface TestResultPart { - /** The status, as defined in {@link TestStatus}. */ - public Integer getStatus(); - - /** The related message. */ - public String getMessage(); - - /** The underlying Exception. Can be null. */ - public String getExceptionMessage(); -} +package org.argeo.slc.test; + +/** + * Part of a test result. + * + * @see TestResult + */ +public interface TestResultPart { + /** The status, as defined in {@link TestStatus}. */ + public Integer getStatus(); + + /** The related message. */ + public String getMessage(); + + /** The underlying Exception. Can be null. */ + public String getExceptionMessage(); +} diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestRun.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestRun.java index 0935a5511..a3e8aeb5a 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/TestRun.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/TestRun.java @@ -1,36 +1,21 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test; - -import org.argeo.slc.deploy.DeployedSystem; - -/** The actual run of a test */ -public interface TestRun { - /** Gets UUID */ - public String getUuid(); - - /** Gets the related test definition. */ - public T getTestDefinition(); - - /** Gets the related test data */ - public T getTestData(); - - /** Gets the related deployed system. */ - public T getDeployedSystem(); - - /** Gets the related result where to record results. */ - public T getTestResult(); -} +package org.argeo.slc.test; + +import org.argeo.slc.deploy.DeployedSystem; + +/** The actual run of a test */ +public interface TestRun { + /** Gets UUID */ + public String getUuid(); + + /** Gets the related test definition. */ + public T getTestDefinition(); + + /** Gets the related test data */ + public T getTestData(); + + /** Gets the related deployed system. */ + public T getDeployedSystem(); + + /** Gets the related result where to record results. */ + public T getTestResult(); +} diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestRunAware.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestRunAware.java index 3330cc847..54585597b 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/TestRunAware.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/TestRunAware.java @@ -1,23 +1,8 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test; - -/** Allows a test run to notify other objects. */ -public interface TestRunAware { - /** Notifies the current test run. */ - public void notifyTestRun(TestRun testRun); - -} +package org.argeo.slc.test; + +/** Allows a test run to notify other objects. */ +public interface TestRunAware { + /** Notifies the current test run. */ + public void notifyTestRun(TestRun testRun); + +} diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/TestStatus.java b/org.argeo.slc.api/src/org/argeo/slc/test/TestStatus.java index e7ebecfa8..a5e10d365 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/TestStatus.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/TestStatus.java @@ -1,46 +1,31 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test; - -/** - * Simple statuses. Ordering of the flags can be relied upon in aggregation: if - * one element is failed, the aggregation is failed. Is one element is in ERROR, - * the aggregation is in ERROR. - *

- *

    - *
  • {@link #PASSED}: the test succeeded
  • - *
  • {@link #FAILED}: the test could run, but did not reach the expected - * result
  • - *
  • {@link #ERROR}: an error during the test run prevented to get a - * significant information on the tested system.
  • - *
- *

- */ -public interface TestStatus { - /** The flag for a passed test: 0 */ - public final static Integer PASSED = 0; - /** The flag for a failed test: 1 */ - public final static Integer FAILED = 1; - /** - * The flag for a test which could not properly run because of an error - * (there is no feedback on the behavior of the tested component): 2 - */ - public final static Integer ERROR = 2; - public final static String STATUSSTR_PASSED = "PASSED"; - public final static String STATUSSTR_FAILED = "FAILED"; - public final static String STATUSSTR_ERROR = "ERROR"; - -} +package org.argeo.slc.test; + +/** + * Simple statuses. Ordering of the flags can be relied upon in aggregation: if + * one element is failed, the aggregation is failed. Is one element is in ERROR, + * the aggregation is in ERROR. + *

+ *

    + *
  • {@link #PASSED}: the test succeeded
  • + *
  • {@link #FAILED}: the test could run, but did not reach the expected + * result
  • + *
  • {@link #ERROR}: an error during the test run prevented to get a + * significant information on the tested system.
  • + *
+ *

+ */ +public interface TestStatus { + /** The flag for a passed test: 0 */ + public final static Integer PASSED = 0; + /** The flag for a failed test: 1 */ + public final static Integer FAILED = 1; + /** + * The flag for a test which could not properly run because of an error + * (there is no feedback on the behavior of the tested component): 2 + */ + public final static Integer ERROR = 2; + public final static String STATUSSTR_PASSED = "PASSED"; + public final static String STATUSSTR_FAILED = "FAILED"; + public final static String STATUSSTR_ERROR = "ERROR"; + +} diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/WritableTestRun.java b/org.argeo.slc.api/src/org/argeo/slc/test/WritableTestRun.java index e11395025..1a2ab237a 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/WritableTestRun.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/WritableTestRun.java @@ -1,29 +1,14 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test; - -import org.argeo.slc.deploy.DeployedSystem; - -/** Test run whose various components can be externally set. */ -public interface WritableTestRun extends ExecutableTestRun { - public void setDeployedSystem(DeployedSystem deployedSystem); - - public void setTestData(TestData testData); - - public void setTestDefinition(TestDefinition testDefinition); - - public void setTestResult(TestResult testResult); -} +package org.argeo.slc.test; + +import org.argeo.slc.deploy.DeployedSystem; + +/** Test run whose various components can be externally set. */ +public interface WritableTestRun extends ExecutableTestRun { + public void setDeployedSystem(DeployedSystem deployedSystem); + + public void setTestData(TestData testData); + + public void setTestDefinition(TestDefinition testDefinition); + + public void setTestResult(TestResult testResult); +} diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/context/ContextAware.java b/org.argeo.slc.api/src/org/argeo/slc/test/context/ContextAware.java index cd9897e11..d2cd86f74 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/context/ContextAware.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/context/ContextAware.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test.context; import java.util.Map; diff --git a/org.argeo.slc.api/src/org/argeo/slc/test/context/ParentContextAware.java b/org.argeo.slc.api/src/org/argeo/slc/test/context/ParentContextAware.java index 0da990d31..b4044f7ca 100644 --- a/org.argeo.slc.api/src/org/argeo/slc/test/context/ParentContextAware.java +++ b/org.argeo.slc.api/src/org/argeo/slc/test/context/ParentContextAware.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.test.context; import java.util.Collection; diff --git a/org.argeo.slc.client.rap/src/org/argeo/slc/client/rap/SlcSecureRap.java b/org.argeo.slc.client.rap/src/org/argeo/slc/client/rap/SlcSecureRap.java index b9f12d665..ddd775306 100644 --- a/org.argeo.slc.client.rap/src/org/argeo/slc/client/rap/SlcSecureRap.java +++ b/org.argeo.slc.client.rap/src/org/argeo/slc/client/rap/SlcSecureRap.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.rap.RapWindowAdvisor; diff --git a/org.argeo.slc.client.rap/src/org/argeo/slc/client/ui/specific/OpenJcrFile.java b/org.argeo.slc.client.rap/src/org/argeo/slc/client/ui/specific/OpenJcrFile.java index 79450b042..8876a15eb 100644 --- a/org.argeo.slc.client.rap/src/org/argeo/slc/client/ui/specific/OpenJcrFile.java +++ b/org.argeo.slc.client.rap/src/org/argeo/slc/client/ui/specific/OpenJcrFile.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.specific; import java.net.URL; diff --git a/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcRcpPlugin.java b/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcRcpPlugin.java index 816e7c020..d61b315ca 100644 --- a/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcRcpPlugin.java +++ b/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcRcpPlugin.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcSecureClientApplication.java b/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcSecureClientApplication.java index 22466fbf6..ddd310e58 100644 --- a/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcSecureClientApplication.java +++ b/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcSecureClientApplication.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.rcp.SecureRcp; diff --git a/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java b/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java index e24188054..04d142764 100644 --- a/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java +++ b/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.rcp.SecureWorkbenchAdvisor; diff --git a/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcSecureWorkbenchWindowAdvisor.java b/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcSecureWorkbenchWindowAdvisor.java index f3506de35..44e8a8a71 100644 --- a/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcSecureWorkbenchWindowAdvisor.java +++ b/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcSecureWorkbenchWindowAdvisor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cms.ui.workbench.rcp.SecureWorkbenchWindowAdvisor; diff --git a/org.argeo.slc.client.rcp/src/org/argeo/slc/client/ui/specific/OpenJcrFile.java b/org.argeo.slc.client.rcp/src/org/argeo/slc/client/ui/specific/OpenJcrFile.java index 5c73a60bd..495fed522 100644 --- a/org.argeo.slc.client.rcp/src/org/argeo/slc/client/ui/specific/OpenJcrFile.java +++ b/org.argeo.slc.client.rcp/src/org/argeo/slc/client/ui/specific/OpenJcrFile.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.specific; import java.awt.Desktop; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/AnonymousDistributionPerspective.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/AnonymousDistributionPerspective.java index b12a55120..e2418a84c 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/AnonymousDistributionPerspective.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/AnonymousDistributionPerspective.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.AnonymousDistributionsView; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistConstants.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistConstants.java index bcbceddbf..10e5f6adf 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistConstants.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistConstants.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.SlcNames; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistImages.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistImages.java index 097f7350b..9f5cba127 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistImages.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistImages.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistPlugin.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistPlugin.java index b1e5b3b6c..b85fcba09 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistPlugin.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistPlugin.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistributionPerspective.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistributionPerspective.java index 78e0a8e72..cedc2eb20 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistributionPerspective.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/DistributionPerspective.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.DistributionsView; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/BndProcess.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/BndProcess.java index 99936dcb3..2573496c8 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/BndProcess.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/BndProcess.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CopyLocalJavaWorkspace.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CopyLocalJavaWorkspace.java index 7d37c1fdd..7d26f9055 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CopyLocalJavaWorkspace.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CopyLocalJavaWorkspace.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CopyWorkspace.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CopyWorkspace.java index 01e3c9856..4abdfab2d 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CopyWorkspace.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CopyWorkspace.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.Credentials; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CreateLocalJavaWorkspace.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CreateLocalJavaWorkspace.java index 955691f8d..dd15ecf10 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CreateLocalJavaWorkspace.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CreateLocalJavaWorkspace.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.apache.commons.logging.Log; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CreateWorkspace.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CreateWorkspace.java index 3f70f6d28..9934c8689 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CreateWorkspace.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/CreateWorkspace.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.Credentials; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DeleteArtifacts.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DeleteArtifacts.java index 18c0473ec..4caf2b526 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DeleteArtifacts.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DeleteArtifacts.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.util.Iterator; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DeleteWorkspace.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DeleteWorkspace.java index 9f09a37a9..4707fc0e6 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DeleteWorkspace.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DeleteWorkspace.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.Credentials; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DisplayRepoInformation.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DisplayRepoInformation.java index aa496c81f..38e43671b 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DisplayRepoInformation.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/DisplayRepoInformation.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.Repository; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/ManageWorkspaceAuth.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/ManageWorkspaceAuth.java index 9e499b53f..24e43cbed 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/ManageWorkspaceAuth.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/ManageWorkspaceAuth.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.Repository; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/MergeWorkspaces.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/MergeWorkspaces.java index 1eb03f16c..70c3d7a12 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/MergeWorkspaces.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/MergeWorkspaces.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.Credentials; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/NormalizeDistribution.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/NormalizeDistribution.java index de46d58a2..e35b9bc23 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/NormalizeDistribution.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/NormalizeDistribution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.Binary; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/NormalizeWorkspace.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/NormalizeWorkspace.java index 37e5b7a3d..e5ed4d4e1 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/NormalizeWorkspace.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/NormalizeWorkspace.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.Credentials; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenGenerateBinariesWizard.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenGenerateBinariesWizard.java index 00ed51ff0..c1b6c12db 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenGenerateBinariesWizard.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenGenerateBinariesWizard.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenModuleEditor.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenModuleEditor.java index 6abbb32fd..bf07e4952 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenModuleEditor.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenModuleEditor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenWorkspaceEditor.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenWorkspaceEditor.java index 1c7c4baee..cf25b83da 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenWorkspaceEditor.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/OpenWorkspaceEditor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/PublishWorkspace.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/PublishWorkspace.java index 91aaf9a6b..9c868cde6 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/PublishWorkspace.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/PublishWorkspace.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.Credentials; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RefreshArtifactBrowser.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RefreshArtifactBrowser.java index 0b4c06226..f9d9f186e 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RefreshArtifactBrowser.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RefreshArtifactBrowser.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RefreshDistributionsView.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RefreshDistributionsView.java index 82028992b..e03ab485c 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RefreshDistributionsView.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RefreshDistributionsView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RegisterRepository.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RegisterRepository.java index 0c734b68f..f09fd1763 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RegisterRepository.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RegisterRepository.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.Repository; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RunInOsgi.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RunInOsgi.java index 1b9022fd7..fc336f6fb 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RunInOsgi.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/RunInOsgi.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/ShowSizeColumn.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/ShowSizeColumn.java index 61504de8f..3486dbfc1 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/ShowSizeColumn.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/ShowSizeColumn.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/UnregisterRemoteRepo.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/UnregisterRemoteRepo.java index 6cf34c138..460c0aa00 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/UnregisterRemoteRepo.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/UnregisterRemoteRepo.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/ArtifactLabelProvider.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/ArtifactLabelProvider.java index 7e0b49115..197921e89 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/ArtifactLabelProvider.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/ArtifactLabelProvider.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.controllers; import java.text.DateFormat; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/ArtifactsTreeContentProvider.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/ArtifactsTreeContentProvider.java index 00274c003..5559b4468 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/ArtifactsTreeContentProvider.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/ArtifactsTreeContentProvider.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.controllers; import java.util.ArrayList; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ArtifactVersionEditor.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ArtifactVersionEditor.java index 4ae23b1ed..4853fe2e1 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ArtifactVersionEditor.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ArtifactVersionEditor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleDependencyPage.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleDependencyPage.java index 3fd0fecdf..938710d97 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleDependencyPage.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleDependencyPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.List; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleDetailPage.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleDetailPage.java index 466358bc0..c300af1ba 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleDetailPage.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleDetailPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.net.URL; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleRawPage.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleRawPage.java index c201f4e3b..0ac7e4e27 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleRawPage.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/BundleRawPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspBrowserPage.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspBrowserPage.java index 2919841bb..e377b53c8 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspBrowserPage.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspBrowserPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspEditorInput.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspEditorInput.java index d4b322d45..5929706e9 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspEditorInput.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspEditorInput.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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 org.argeo.slc.SlcException; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspSearchPage.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspSearchPage.java index caba3c941..1a959a511 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspSearchPage.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWkspSearchPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWorkspaceEditor.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWorkspaceEditor.java index f2efbde8a..3f8f98d9b 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWorkspaceEditor.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/DistWorkspaceEditor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionDetailPage.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionDetailPage.java index e2b8e7940..0b9f9a3c4 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionDetailPage.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionDetailPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionEditor.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionEditor.java index 5a298622c..cdb15ea75 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionEditor.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionEditor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionOverviewPage.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionOverviewPage.java index 0bd922fa2..d3ab885ac 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionOverviewPage.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModularDistVersionOverviewPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.net.URL; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModuleEditorInput.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModuleEditorInput.java index eddfdd02c..52d7a200a 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModuleEditorInput.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/ModuleEditorInput.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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 org.argeo.jcr.JcrUtils; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/RunInOsgiPage.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/RunInOsgiPage.java index 04f706e98..5e11e77b6 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/RunInOsgiPage.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/RunInOsgiPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/WkspCategoryBaseListPage.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/WkspCategoryBaseListPage.java index e92db49dc..a482e9d3f 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/WkspCategoryBaseListPage.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/editors/WkspCategoryBaseListPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java index a35794222..dcdfc930d 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/CommandHelpers.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/CommandHelpers.java index fcc0f5e9f..e1134c633 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/CommandHelpers.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/CommandHelpers.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.util.ArrayList; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/DistNodeViewerComparator.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/DistNodeViewerComparator.java index 2f0e3a03b..14119969f 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/DistNodeViewerComparator.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/DistNodeViewerComparator.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.math.BigDecimal; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/DistUiHelpers.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/DistUiHelpers.java index 5a5e4b331..b53fe0196 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/DistUiHelpers.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/DistUiHelpers.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/HyperlinkAdapter.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/HyperlinkAdapter.java index 1dd2be19a..13d71f86f 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/HyperlinkAdapter.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/HyperlinkAdapter.java @@ -1,29 +1,3 @@ -/* - * Argeo Connect - Data management and communications - * Copyright (C) 2012 Argeo GmbH - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * - * Additional permission under GNU GPL version 3 section 7 - * - * If you modify this Program, or any covered work, by linking or combining it - * with software covered by the terms of the Eclipse Public License, the - * licensors of this Program grant you additional permission to convey the - * resulting work. Corresponding Source for a non-source form of such a - * combination shall include the source code for the parts of such software - * which are used as well as that of the covered work. - */ package org.argeo.slc.client.ui.dist.utils; import org.eclipse.ui.forms.events.HyperlinkEvent; @@ -40,4 +14,4 @@ public abstract class HyperlinkAdapter implements IHyperlinkListener { /** Must be overriden **/ public abstract void linkActivated(HyperlinkEvent e); -} \ No newline at end of file +} diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/AbstractQueryArtifactsView.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/AbstractQueryArtifactsView.java index 2a8ff798e..e6552ebc1 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/AbstractQueryArtifactsView.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/AbstractQueryArtifactsView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/AnonymousDistributionsView.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/AnonymousDistributionsView.java index b4100cdd7..b511c4e93 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/AnonymousDistributionsView.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/AnonymousDistributionsView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.argeo.cms.ArgeoNames; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/ArtifactsBrowser.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/ArtifactsBrowser.java index 323159d43..9eef47710 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/ArtifactsBrowser.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/ArtifactsBrowser.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/DistributionsView.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/DistributionsView.java index 1c52cf775..ffebf6a7f 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/DistributionsView.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/DistributionsView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/HelpView.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/HelpView.java index 5ec066cc8..105f36dd8 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/HelpView.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/HelpView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.argeo.slc.client.ui.dist.DistPlugin; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryArtifactsForm.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryArtifactsForm.java index 791fbc70a..9ce41d477 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryArtifactsForm.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryArtifactsForm.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.argeo.slc.SlcException; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryArtifactsText.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryArtifactsText.java index 35333e4d2..3b0be1064 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryArtifactsText.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryArtifactsText.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.argeo.slc.SlcNames; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryBundlesForm.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryBundlesForm.java index baeeddc2c..c4980d53f 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryBundlesForm.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/views/QueryBundlesForm.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.argeo.slc.SlcException; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/ChangeRightsWizard.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/ChangeRightsWizard.java index a3e70b9c3..9dce9a002 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/ChangeRightsWizard.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/ChangeRightsWizard.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.wizards; import javax.jcr.RepositoryException; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/ChooseRightsPage.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/ChooseRightsPage.java index 1a66e8faf..fcd409753 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/ChooseRightsPage.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/ChooseRightsPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.wizards; import javax.jcr.security.Privilege; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/FetchWizard.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/FetchWizard.java index de7d65c06..888478dd2 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/FetchWizard.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/FetchWizard.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.wizards; import java.util.ArrayList; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/GenerateBinariesWizard.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/GenerateBinariesWizard.java index 5b4ea21c2..1f353e00e 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/GenerateBinariesWizard.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/GenerateBinariesWizard.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.wizards; import java.util.ArrayList; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/RegisterRepoWizard.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/RegisterRepoWizard.java index a0f289a13..3cebd6862 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/RegisterRepoWizard.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/RegisterRepoWizard.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.wizards; import java.net.URI; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/ClientUiPlugin.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/ClientUiPlugin.java index 05e57e9f1..abf62a0cf 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/ClientUiPlugin.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/ClientUiPlugin.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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 javax.jcr.Node; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/SlcExecutionPerspective.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/SlcExecutionPerspective.java index 47a352131..7e9cc5220 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/SlcExecutionPerspective.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/SlcExecutionPerspective.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/SlcImages.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/SlcImages.java index d881f0ec8..c93ec9b7e 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/SlcImages.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/SlcImages.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.getImageDescriptor; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/SlcUiConstants.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/SlcUiConstants.java index 6aa176bfe..27d05d626 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/SlcUiConstants.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/SlcUiConstants.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; /** SLC UI common constants */ diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/AddResultFolder.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/AddResultFolder.java index 749836da2..5cc8b6520 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/AddResultFolder.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/AddResultFolder.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.commands; import javax.jcr.Node; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/DeleteItems.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/DeleteItems.java index 688652825..74016671d 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/DeleteItems.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/DeleteItems.java @@ -1,134 +1,119 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.commands; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Session; - -import org.argeo.slc.SlcException; -import org.argeo.slc.client.ui.ClientUiPlugin; -import org.argeo.slc.client.ui.model.ResultFolder; -import org.argeo.slc.client.ui.model.ResultParent; -import org.argeo.slc.client.ui.model.ResultParentUtils; -import org.argeo.slc.client.ui.model.SingleResultNode; -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; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.handlers.HandlerUtil; - -/** Deletes one or many results */ -public class DeleteItems extends AbstractHandler { - public final static String ID = ClientUiPlugin.ID + ".deleteItems"; - public final static ImageDescriptor DEFAULT_IMG_DESCRIPTOR = ClientUiPlugin - .getImageDescriptor("icons/removeAll.png"); - public final static String DEFAULT_LABEL = "Delete selected item(s)"; - - public Object execute(final ExecutionEvent event) throws ExecutionException { - final ISelection selection = HandlerUtil - .getActiveWorkbenchWindow(event).getActivePage().getSelection(); - - // confirmation - StringBuilder buf = new StringBuilder(""); - Iterator lst = ((IStructuredSelection) selection).iterator(); - while (lst.hasNext()) { - Object obj = lst.next(); - if (obj instanceof ResultParent) { - ResultParent rp = ((ResultParent) obj); - buf.append(rp.getName()).append(", "); - } - } - - String msg = "Nothing to delete"; - // remove last separator - if (buf.lastIndexOf(", ") > -1) { - msg = "Do you want to delete following objects (and their children): " - + buf.substring(0, buf.lastIndexOf(", ")) + "?"; - } - Boolean ok = MessageDialog.openConfirm( - HandlerUtil.getActiveShell(event), "Confirm deletion", msg); - - if (!ok) - return null; - - Job job = new Job("Delete results") { - @Override - protected IStatus run(IProgressMonitor monitor) { - if (selection != null - && selection instanceof IStructuredSelection) { - Map nodes = new HashMap(); - Iterator it = ((IStructuredSelection) selection) - .iterator(); - Object obj = null; - try { - - while (it.hasNext()) { - obj = it.next(); - if (obj instanceof ResultFolder) { - Node node = ((ResultFolder) obj).getNode(); - nodes.put(node.getPath(), node); - } else if (obj instanceof SingleResultNode) { - Node node = ((SingleResultNode) obj).getNode(); - nodes.put(node.getPath(), node); - } - } - if (!nodes.isEmpty()) { - Session session = null; - monitor.beginTask("Delete results", nodes.size()); - for (String path : nodes.keySet()) { - if (session == null) - session = nodes.get(path).getSession(); - - // check if the item has not already been - // deleted while deleting one of its ancestor - if (session.itemExists(path)) { - Node parent = nodes.get(path).getParent(); - nodes.get(path).remove(); - ResultParentUtils.updatePassedStatus( - parent, true); - } - monitor.worked(1); - } - session.save(); - } - - } catch (RepositoryException e) { - throw new SlcException( - "Unexpected error while deleteting node(s)", e); - } - monitor.done(); - } - return Status.OK_STATUS; - } - - }; - job.setUser(true); - job.schedule(); - return null; - } -} \ No newline at end of file +package org.argeo.slc.client.ui.commands; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import javax.jcr.Node; +import javax.jcr.RepositoryException; +import javax.jcr.Session; + +import org.argeo.slc.SlcException; +import org.argeo.slc.client.ui.ClientUiPlugin; +import org.argeo.slc.client.ui.model.ResultFolder; +import org.argeo.slc.client.ui.model.ResultParent; +import org.argeo.slc.client.ui.model.ResultParentUtils; +import org.argeo.slc.client.ui.model.SingleResultNode; +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; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.ui.handlers.HandlerUtil; + +/** Deletes one or many results */ +public class DeleteItems extends AbstractHandler { + public final static String ID = ClientUiPlugin.ID + ".deleteItems"; + public final static ImageDescriptor DEFAULT_IMG_DESCRIPTOR = ClientUiPlugin + .getImageDescriptor("icons/removeAll.png"); + public final static String DEFAULT_LABEL = "Delete selected item(s)"; + + public Object execute(final ExecutionEvent event) throws ExecutionException { + final ISelection selection = HandlerUtil + .getActiveWorkbenchWindow(event).getActivePage().getSelection(); + + // confirmation + StringBuilder buf = new StringBuilder(""); + Iterator lst = ((IStructuredSelection) selection).iterator(); + while (lst.hasNext()) { + Object obj = lst.next(); + if (obj instanceof ResultParent) { + ResultParent rp = ((ResultParent) obj); + buf.append(rp.getName()).append(", "); + } + } + + String msg = "Nothing to delete"; + // remove last separator + if (buf.lastIndexOf(", ") > -1) { + msg = "Do you want to delete following objects (and their children): " + + buf.substring(0, buf.lastIndexOf(", ")) + "?"; + } + Boolean ok = MessageDialog.openConfirm( + HandlerUtil.getActiveShell(event), "Confirm deletion", msg); + + if (!ok) + return null; + + Job job = new Job("Delete results") { + @Override + protected IStatus run(IProgressMonitor monitor) { + if (selection != null + && selection instanceof IStructuredSelection) { + Map nodes = new HashMap(); + Iterator it = ((IStructuredSelection) selection) + .iterator(); + Object obj = null; + try { + + while (it.hasNext()) { + obj = it.next(); + if (obj instanceof ResultFolder) { + Node node = ((ResultFolder) obj).getNode(); + nodes.put(node.getPath(), node); + } else if (obj instanceof SingleResultNode) { + Node node = ((SingleResultNode) obj).getNode(); + nodes.put(node.getPath(), node); + } + } + if (!nodes.isEmpty()) { + Session session = null; + monitor.beginTask("Delete results", nodes.size()); + for (String path : nodes.keySet()) { + if (session == null) + session = nodes.get(path).getSession(); + + // check if the item has not already been + // deleted while deleting one of its ancestor + if (session.itemExists(path)) { + Node parent = nodes.get(path).getParent(); + nodes.get(path).remove(); + ResultParentUtils.updatePassedStatus( + parent, true); + } + monitor.worked(1); + } + session.save(); + } + + } catch (RepositoryException e) { + throw new SlcException( + "Unexpected error while deleteting node(s)", e); + } + monitor.done(); + } + return Status.OK_STATUS; + } + + }; + job.setUser(true); + job.schedule(); + return null; + } +} diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RefreshJcrResultTreeView.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RefreshJcrResultTreeView.java index b7600b9e1..fdfa85290 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RefreshJcrResultTreeView.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RefreshJcrResultTreeView.java @@ -1,69 +1,54 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.commands; - -import java.util.Iterator; - -import org.argeo.slc.client.ui.ClientUiPlugin; -import org.argeo.slc.client.ui.model.ResultParent; -import org.argeo.slc.client.ui.views.JcrResultTreeView; -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.handlers.HandlerUtil; - -/** - * Force refresh the ResultTreeView. This command is only intended to be called - * by either the toolbar menu of the view or by the popup menu. Refresh due to - * data changes must be triggered by Observers - */ -public class RefreshJcrResultTreeView extends AbstractHandler { - public final static String ID = ClientUiPlugin.ID - + ".refreshJcrResultTreeView"; - public final static String PARAM_REFRESH_TYPE = ClientUiPlugin.ID - + ".param.refreshType"; - public final static String PARAM_REFRESH_TYPE_FULL = "fullRefresh"; - public final static ImageDescriptor DEFAULT_IMG_DESCRIPTOR = ClientUiPlugin - .getImageDescriptor("icons/refresh.png"); - public final static String DEFAULT_LABEL = "Refresh selected"; - - public Object execute(final ExecutionEvent event) throws ExecutionException { - String refreshType = event.getParameter(PARAM_REFRESH_TYPE); - JcrResultTreeView view = (JcrResultTreeView) HandlerUtil - .getActiveWorkbenchWindow(event).getActivePage() - .getActivePart(); - - // force full refresh without preserving selection from the tool bar - if (PARAM_REFRESH_TYPE_FULL.equals(refreshType)) - view.refresh(null); - else { - IStructuredSelection selection = (IStructuredSelection) HandlerUtil - .getActiveWorkbenchWindow(event).getActivePage() - .getSelection(); - @SuppressWarnings("rawtypes") - Iterator it = selection.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof ResultParent) { - view.refresh((ResultParent) obj); - } - } - } - return null; - } -} +package org.argeo.slc.client.ui.commands; + +import java.util.Iterator; + +import org.argeo.slc.client.ui.ClientUiPlugin; +import org.argeo.slc.client.ui.model.ResultParent; +import org.argeo.slc.client.ui.views.JcrResultTreeView; +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.ui.handlers.HandlerUtil; + +/** + * Force refresh the ResultTreeView. This command is only intended to be called + * by either the toolbar menu of the view or by the popup menu. Refresh due to + * data changes must be triggered by Observers + */ +public class RefreshJcrResultTreeView extends AbstractHandler { + public final static String ID = ClientUiPlugin.ID + + ".refreshJcrResultTreeView"; + public final static String PARAM_REFRESH_TYPE = ClientUiPlugin.ID + + ".param.refreshType"; + public final static String PARAM_REFRESH_TYPE_FULL = "fullRefresh"; + public final static ImageDescriptor DEFAULT_IMG_DESCRIPTOR = ClientUiPlugin + .getImageDescriptor("icons/refresh.png"); + public final static String DEFAULT_LABEL = "Refresh selected"; + + public Object execute(final ExecutionEvent event) throws ExecutionException { + String refreshType = event.getParameter(PARAM_REFRESH_TYPE); + JcrResultTreeView view = (JcrResultTreeView) HandlerUtil + .getActiveWorkbenchWindow(event).getActivePage() + .getActivePart(); + + // force full refresh without preserving selection from the tool bar + if (PARAM_REFRESH_TYPE_FULL.equals(refreshType)) + view.refresh(null); + else { + IStructuredSelection selection = (IStructuredSelection) HandlerUtil + .getActiveWorkbenchWindow(event).getActivePage() + .getSelection(); + @SuppressWarnings("rawtypes") + Iterator it = selection.iterator(); + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof ResultParent) { + view.refresh((ResultParent) obj); + } + } + } + return null; + } +} diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RenameResultFolder.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RenameResultFolder.java index 2bdb20db4..bbab7d712 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RenameResultFolder.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RenameResultFolder.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.commands; import javax.jcr.Node; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RenameResultNode.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RenameResultNode.java index bdc7871f7..d9717cc7c 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RenameResultNode.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RenameResultNode.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.commands; import javax.jcr.Node; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RunSlcFlow.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RunSlcFlow.java index 18ac39b1c..5e70dfb11 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RunSlcFlow.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RunSlcFlow.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.commands; import java.util.HashMap; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/UpdateModule.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/UpdateModule.java index 4def5f4e0..7cf8509b7 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/UpdateModule.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/UpdateModule.java @@ -1,127 +1,112 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.commands; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import javax.jcr.Node; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.slc.BasicNameVersion; -import org.argeo.slc.NameVersion; -import org.argeo.slc.SlcException; -import org.argeo.slc.SlcNames; -import org.argeo.slc.SlcTypes; -import org.argeo.slc.deploy.ModulesManager; -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; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.handlers.HandlerUtil; - -/** Deletes one or many results */ -public class UpdateModule extends AbstractHandler { - private final static Log log = LogFactory.getLog(UpdateModule.class); - - private ModulesManager modulesManager; - - public Object execute(ExecutionEvent event) throws ExecutionException { - final ISelection selection = HandlerUtil - .getActiveWorkbenchWindow(event).getActivePage().getSelection(); - if (selection != null && selection instanceof IStructuredSelection) { - UpdateJob job = new UpdateJob(selection); - job.setUser(true); - job.schedule(); - } - return null; - } - - private class UpdateJob extends Job { - private final IStructuredSelection selection; - - public UpdateJob(ISelection selection) { - super("Update modules"); - this.selection = ((IStructuredSelection) selection); - } - - @Override - protected IStatus run(IProgressMonitor monitor) { - Iterator it = selection.iterator(); - Object obj = null; - try { - Map nodes = new HashMap(); - nodes: while (it.hasNext()) { - obj = it.next(); - if (obj instanceof Node) { - Node node = (Node) obj; - Node executionModuleNode = null; - while (executionModuleNode == null) { - if (node.isNodeType(SlcTypes.SLC_EXECUTION_MODULE)) { - executionModuleNode = node; - } - node = node.getParent(); - if (node.getPath().equals("/"))// root - continue nodes; - } - - if (!nodes.containsKey(executionModuleNode.getPath())) - nodes.put(executionModuleNode.getPath(), - executionModuleNode); - } - } - - monitor.beginTask("Update modules", nodes.size()); - for (Node executionModuleNode : nodes.values()) { - monitor.subTask("Update " + executionModuleNode.getName()); - NameVersion nameVersion = new BasicNameVersion( - executionModuleNode.getProperty(SlcNames.SLC_NAME) - .getString(), executionModuleNode - .getProperty(SlcNames.SLC_VERSION) - .getString()); - modulesManager.upgrade(nameVersion); - monitor.worked(1); - log.info("Module " + nameVersion + " updated"); - if (monitor.isCanceled()) - return Status.CANCEL_STATUS; - } - return Status.OK_STATUS; - } catch (Exception e) { - throw new SlcException("Cannot update module " + obj, e); - // return Status.CANCEL_STATUS; - } - } - - @Override - protected void canceling() { - getThread().interrupt(); - super.canceling(); - } - - } - - public void setModulesManager(ModulesManager modulesManager) { - this.modulesManager = modulesManager; - } - -} +package org.argeo.slc.client.ui.commands; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import javax.jcr.Node; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.argeo.slc.BasicNameVersion; +import org.argeo.slc.NameVersion; +import org.argeo.slc.SlcException; +import org.argeo.slc.SlcNames; +import org.argeo.slc.SlcTypes; +import org.argeo.slc.deploy.ModulesManager; +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; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.ui.handlers.HandlerUtil; + +/** Deletes one or many results */ +public class UpdateModule extends AbstractHandler { + private final static Log log = LogFactory.getLog(UpdateModule.class); + + private ModulesManager modulesManager; + + public Object execute(ExecutionEvent event) throws ExecutionException { + final ISelection selection = HandlerUtil + .getActiveWorkbenchWindow(event).getActivePage().getSelection(); + if (selection != null && selection instanceof IStructuredSelection) { + UpdateJob job = new UpdateJob(selection); + job.setUser(true); + job.schedule(); + } + return null; + } + + private class UpdateJob extends Job { + private final IStructuredSelection selection; + + public UpdateJob(ISelection selection) { + super("Update modules"); + this.selection = ((IStructuredSelection) selection); + } + + @Override + protected IStatus run(IProgressMonitor monitor) { + Iterator it = selection.iterator(); + Object obj = null; + try { + Map nodes = new HashMap(); + nodes: while (it.hasNext()) { + obj = it.next(); + if (obj instanceof Node) { + Node node = (Node) obj; + Node executionModuleNode = null; + while (executionModuleNode == null) { + if (node.isNodeType(SlcTypes.SLC_EXECUTION_MODULE)) { + executionModuleNode = node; + } + node = node.getParent(); + if (node.getPath().equals("/"))// root + continue nodes; + } + + if (!nodes.containsKey(executionModuleNode.getPath())) + nodes.put(executionModuleNode.getPath(), + executionModuleNode); + } + } + + monitor.beginTask("Update modules", nodes.size()); + for (Node executionModuleNode : nodes.values()) { + monitor.subTask("Update " + executionModuleNode.getName()); + NameVersion nameVersion = new BasicNameVersion( + executionModuleNode.getProperty(SlcNames.SLC_NAME) + .getString(), executionModuleNode + .getProperty(SlcNames.SLC_VERSION) + .getString()); + modulesManager.upgrade(nameVersion); + monitor.worked(1); + log.info("Module " + nameVersion + " updated"); + if (monitor.isCanceled()) + return Status.CANCEL_STATUS; + } + return Status.OK_STATUS; + } catch (Exception e) { + throw new SlcException("Cannot update module " + obj, e); + // return Status.CANCEL_STATUS; + } + } + + @Override + protected void canceling() { + getThread().interrupt(); + super.canceling(); + } + + } + + public void setModulesManager(ModulesManager modulesManager) { + this.modulesManager = modulesManager; + } + +} diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/controllers/ProcessController.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/controllers/ProcessController.java index 8b66bd89a..4a660adb0 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/controllers/ProcessController.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/controllers/ProcessController.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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 javax.jcr.Node; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/decorators/ResultFailedDecorator.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/decorators/ResultFailedDecorator.java index 95e728e82..9d91cc544 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/decorators/ResultFailedDecorator.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/decorators/ResultFailedDecorator.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.decorators; import java.text.DateFormat; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessBuilderPage.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessBuilderPage.java index b83b8d820..7c3d53228 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessBuilderPage.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessBuilderPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessEditor.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessEditor.java index d2bb45a5d..38db84a3c 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessEditor.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessEditor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessEditorInput.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessEditorInput.java index ed702c13d..f93af3fed 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessEditorInput.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessEditorInput.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessEditorInputFactory.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessEditorInputFactory.java index 2e2bd28de..b5a5d7081 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessEditorInputFactory.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessEditorInputFactory.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessLogPage.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessLogPage.java index bca80f54a..57eff2e95 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessLogPage.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/editors/ProcessLogPage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ParentNodeFolder.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ParentNodeFolder.java index b3f6d7dc7..c6ffcd8d9 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ParentNodeFolder.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ParentNodeFolder.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.model; import javax.jcr.Node; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ResultFolder.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ResultFolder.java index 57fc627ac..25d0259e6 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ResultFolder.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ResultFolder.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.model; import javax.jcr.Node; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ResultParent.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ResultParent.java index a616cc4ff..8ea91f2a7 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ResultParent.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ResultParent.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.model; import org.argeo.eclipse.ui.TreeParent; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ResultParentUtils.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ResultParentUtils.java index 268d746c1..98fd19443 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ResultParentUtils.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/ResultParentUtils.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.model; import java.util.ArrayList; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/SingleResultNode.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/SingleResultNode.java index d95e0f46a..ff14fcfb2 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/SingleResultNode.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/SingleResultNode.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.model; import javax.jcr.Node; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/VirtualFolder.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/VirtualFolder.java index d6b7a3b5d..558fe0d73 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/VirtualFolder.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/model/VirtualFolder.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.model; import java.util.List; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/providers/ResultTreeContentProvider.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/providers/ResultTreeContentProvider.java index f0d2f1483..c2594ec13 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/providers/ResultTreeContentProvider.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/providers/ResultTreeContentProvider.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.providers; import org.argeo.eclipse.ui.TreeParent; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/providers/ResultTreeLabelProvider.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/providers/ResultTreeLabelProvider.java index e3570c2a9..3c418d63c 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/providers/ResultTreeLabelProvider.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/providers/ResultTreeLabelProvider.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.providers; import javax.jcr.Node; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrExecutionModulesView.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrExecutionModulesView.java index 2e0a5cf42..6ddc1974c 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrExecutionModulesView.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrExecutionModulesView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrProcessListView.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrProcessListView.java index 06b99aed6..7a921441f 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrProcessListView.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrProcessListView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrResultListView.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrResultListView.java index 2843c26cd..41a1d52d0 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrResultListView.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrResultListView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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; diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrResultTreeView.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrResultTreeView.java index 7db05ee11..824dcfd72 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrResultTreeView.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/JcrResultTreeView.java @@ -1,968 +1,953 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.Calendar; -import java.util.Iterator; -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.nodetype.NodeType; -import javax.jcr.observation.Event; -import javax.jcr.observation.EventListener; -import javax.jcr.observation.ObservationManager; - -import org.argeo.api.NodeConstants; -import org.argeo.cms.ui.workbench.util.CommandUtils; -import org.argeo.eclipse.ui.jcr.AsyncUiEventListener; -import org.argeo.jcr.JcrUtils; -import org.argeo.slc.SlcException; -import org.argeo.slc.SlcNames; -import org.argeo.slc.SlcTypes; -import org.argeo.slc.client.ui.ClientUiPlugin; -import org.argeo.slc.client.ui.SlcUiConstants; -import org.argeo.slc.client.ui.commands.AddResultFolder; -import org.argeo.slc.client.ui.commands.DeleteItems; -import org.argeo.slc.client.ui.commands.RefreshJcrResultTreeView; -import org.argeo.slc.client.ui.commands.RenameResultFolder; -import org.argeo.slc.client.ui.commands.RenameResultNode; -import org.argeo.slc.client.ui.editors.ProcessEditor; -import org.argeo.slc.client.ui.editors.ProcessEditorInput; -import org.argeo.slc.client.ui.model.ParentNodeFolder; -import org.argeo.slc.client.ui.model.ResultFolder; -import org.argeo.slc.client.ui.model.ResultItemsComparator; -import org.argeo.slc.client.ui.model.ResultItemsComparer; -import org.argeo.slc.client.ui.model.ResultParent; -import org.argeo.slc.client.ui.model.ResultParentUtils; -import org.argeo.slc.client.ui.model.SingleResultNode; -import org.argeo.slc.client.ui.model.VirtualFolder; -import org.argeo.slc.client.ui.providers.ResultTreeContentProvider; -import org.argeo.slc.client.ui.providers.ResultTreeLabelProvider; -import org.argeo.slc.jcr.SlcJcrResultUtils; -import org.eclipse.jface.action.IMenuListener; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.MenuManager; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ColumnLabelProvider; -import org.eclipse.jface.viewers.DecoratingLabelProvider; -import org.eclipse.jface.viewers.DoubleClickEvent; -import org.eclipse.jface.viewers.IDoubleClickListener; -import org.eclipse.jface.viewers.ILabelDecorator; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.IStructuredContentProvider; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.jface.viewers.TableViewerColumn; -import org.eclipse.jface.viewers.TreePath; -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.DragSourceEvent; -import org.eclipse.swt.dnd.DragSourceListener; -import org.eclipse.swt.dnd.TextTransfer; -import org.eclipse.swt.dnd.Transfer; -import org.eclipse.swt.dnd.TransferData; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Menu; -import org.eclipse.ui.ISharedImages; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.part.ViewPart; - -/** SLC generic JCR Result tree view. */ -public class JcrResultTreeView extends ViewPart { - public final static String ID = ClientUiPlugin.ID + ".jcrResultTreeView"; - - private final static DateFormat dateFormat = new SimpleDateFormat( - SlcUiConstants.DEFAULT_DISPLAY_DATE_TIME_FORMAT); - - // private final static Log log = - // LogFactory.getLog(JcrResultTreeView.class); - - /* DEPENDENCY INJECTION */ - private Repository repository; - private Session session; - - // This page widgets - private TreeViewer resultTreeViewer; - private TableViewer propertiesViewer; - - private EventListener myResultsObserver = null; - private EventListener allResultsObserver = null; - - // under My Results - private final static String[] observedNodeTypesUnderMyResult = { - SlcTypes.SLC_TEST_RESULT, SlcTypes.SLC_RESULT_FOLDER, - SlcTypes.SLC_MY_RESULT_ROOT_FOLDER }; - - private final static String[] observedNodeTypesUnderAllResults = { - SlcTypes.SLC_TEST_RESULT, NodeType.NT_UNSTRUCTURED }; - - private boolean isResultFolder = false; - - /** - * To be overridden to adapt size of form and result frames. - */ - protected int[] getWeights() { - return new int[] { 70, 30 }; - } - - @Override - public void createPartControl(Composite parent) { - try { - session = repository.login(NodeConstants.HOME_WORKSPACE); - } catch (RepositoryException e1) { - throw new SlcException("Cannot log in to repository"); - } - - parent.setLayout(new FillLayout()); - // Main layout - SashForm sashForm = new SashForm(parent, SWT.VERTICAL); - sashForm.setSashWidth(4); - sashForm.setLayout(new FillLayout()); - - // Create the tree on top of the view - Composite top = new Composite(sashForm, SWT.NONE); - GridLayout gl = new GridLayout(1, false); - top.setLayout(gl); - resultTreeViewer = createResultsTreeViewer(top); - - // Create the property viewer on the bottom - Composite bottom = new Composite(sashForm, SWT.NONE); - bottom.setLayout(new GridLayout(1, false)); - propertiesViewer = createPropertiesViewer(bottom); - - sashForm.setWeights(getWeights()); - - setOrderedInput(resultTreeViewer); - - // Initialize observer - try { - ObservationManager observationManager = session.getWorkspace() - .getObservationManager(); - myResultsObserver = new MyResultsObserver(resultTreeViewer - .getTree().getDisplay()); - allResultsObserver = new AllResultsObserver(resultTreeViewer - .getTree().getDisplay()); - - // observe tree changes under MyResults - observationManager.addEventListener(myResultsObserver, - Event.NODE_ADDED | Event.NODE_REMOVED, - SlcJcrResultUtils.getMyResultsBasePath(session), true, - null, observedNodeTypesUnderMyResult, false); - // observe tree changes under All results - observationManager.addEventListener(allResultsObserver, - Event.NODE_ADDED | Event.NODE_REMOVED, - SlcJcrResultUtils.getSlcResultsBasePath(session), true, - null, observedNodeTypesUnderAllResults, false); - } catch (RepositoryException e) { - throw new SlcException("Cannot register listeners", e); - } - } - - /** - * Override default behaviour so that default defined order remains - * unchanged on first level of the tree - */ - private void setOrderedInput(TreeViewer viewer) { - // Add specific ordering - viewer.setInput(null); - viewer.setComparator(null); - viewer.setInput(initializeResultTree()); - viewer.setComparator(new ResultItemsComparator()); - } - - // The main tree viewer - protected TreeViewer createResultsTreeViewer(Composite parent) { - int style = SWT.BORDER | SWT.MULTI; - - TreeViewer viewer = new TreeViewer(parent, style); - viewer.getTree().setLayoutData( - new GridData(SWT.FILL, SWT.FILL, true, true)); - - viewer.setContentProvider(new ResultTreeContentProvider()); - - // Add label provider with label decorator - ResultTreeLabelProvider rtLblProvider = new ResultTreeLabelProvider(); - ILabelDecorator decorator = ClientUiPlugin.getDefault().getWorkbench() - .getDecoratorManager().getLabelDecorator(); - viewer.setLabelProvider(new DecoratingLabelProvider(rtLblProvider, - decorator)); - viewer.addDoubleClickListener(new ViewDoubleClickListener()); - - // Override default behaviour to insure that 2 distincts results that - // have the same name will be correctly and distincly returned by - // corresponding TreeViewer.getSelection() method. - viewer.setComparer(new ResultItemsComparer()); - - // viewer.setLabelProvider(rtLblProvider); - getSite().setSelectionProvider(viewer); - - // add drag & drop support - int operations = DND.DROP_COPY | DND.DROP_MOVE; - Transfer[] tt = new Transfer[] { TextTransfer.getInstance() }; - viewer.addDragSupport(operations, tt, new ViewDragListener()); - viewer.addDropSupport(operations, tt, new ViewDropListener(viewer)); - - // add context menu - 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); - menuManager.setRemoveAllWhenShown(true); - - getSite().registerContextMenu(menuManager, viewer); - - // add change listener to display TestResult information in the property - // viewer - viewer.addSelectionChangedListener(new MySelectionChangedListener()); - return viewer; - } - - // Detailed property viewer - protected TableViewer createPropertiesViewer(Composite parent) { - propertiesViewer = new TableViewer(parent); - propertiesViewer.getTable().setLayoutData( - new GridData(SWT.FILL, SWT.FILL, true, true)); - propertiesViewer.getTable().setHeaderVisible(true); - propertiesViewer.setContentProvider(new PropertiesContentProvider()); - TableViewerColumn col = new TableViewerColumn(propertiesViewer, - SWT.NONE); - col.getColumn().setText("Name"); - col.getColumn().setWidth(100); - col.setLabelProvider(new ColumnLabelProvider() { - public String getText(Object element) { - try { - String name = ((Property) element).getName(); - String value = null; - if (SlcNames.SLC_TEST_CASE.equals(name)) - value = "Test case"; - else if (SlcNames.SLC_COMPLETED.equals(name)) - value = "Completed on"; - else if (SlcNames.SLC_SUCCESS.equals(name)) - value = "Status"; - else if (SlcNames.SLC_MESSAGE.equals(name)) - value = "Message"; - else if (SlcNames.SLC_ERROR_MESSAGE.equals(name)) - value = "Error"; - return value; - } catch (RepositoryException e) { - throw new SlcException( - "Unexpected exception in label provider", e); - } - } - }); - col = new TableViewerColumn(propertiesViewer, SWT.NONE); - col.getColumn().setText("Value"); - col.getColumn().setWidth(200); - col.setLabelProvider(new ColumnLabelProvider() { - public String getText(Object element) { - try { - Property property = (Property) element; - String name = property.getName(); - String value = null; - - if (SlcNames.SLC_TEST_CASE.equals(name) - || SlcNames.SLC_ERROR_MESSAGE.equals(name) - || SlcNames.SLC_MESSAGE.equals(name)) - value = property.getValue().getString(); - else if (SlcNames.SLC_COMPLETED.equals(name)) { - Calendar date = property.getValue().getDate(); - value = dateFormat.format(date.getTime()); - } else if (SlcNames.SLC_SUCCESS.equals(name)) { - if (property.getValue().getBoolean()) - value = "PASSED"; - else { - if (property.getParent().hasProperty( - SlcNames.SLC_ERROR_MESSAGE)) - value = "ERROR"; - else - value = "FAILED"; - } - } - return value; - } catch (RepositoryException e) { - throw new SlcException( - "Unexpected exception in label provider", e); - } - } - }); - propertiesViewer.setInput(getViewSite()); - return propertiesViewer; - } - - /** - * Override to provide specific behaviour. Typically to enable the display - * of a result file. - * - * @param evt - */ - protected void processDoubleClick(DoubleClickEvent evt) { - Object obj = ((IStructuredSelection) evt.getSelection()) - .getFirstElement(); - try { - if (obj instanceof SingleResultNode) { - SingleResultNode srNode = (SingleResultNode) obj; - Node node = srNode.getNode(); - // 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); - } - } - - @Override - public void setFocus() { - } - - /** - * refreshes the passed resultParent and its corresponding subtree. It - * refreshes the whole viewer if null is passed. - * - * @param ResultParent - * - */ - public void refresh(ResultParent resultParent) { - if (resultParent == null) { - if (!resultTreeViewer.getTree().isDisposed()) { - TreePath[] tps = resultTreeViewer.getExpandedTreePaths(); - setOrderedInput(resultTreeViewer); - resultTreeViewer.setExpandedTreePaths(tps); - } else - setOrderedInput(resultTreeViewer); - } else { - if (resultParent instanceof ParentNodeFolder) { - ParentNodeFolder currFolder = (ParentNodeFolder) resultParent; - jcrRefresh(currFolder.getNode()); - currFolder.forceFullRefresh(); - } - // FIXME: specific refresh does not work - // resultTreeViewer.refresh(resultParent, true); - refresh(null); - } - } - - /** - * refreshes the passed node and its corresponding subtree. - * - * @param node - * cannot be null - * - */ - public boolean jcrRefresh(Node node) { - // if (log.isDebugEnabled()) - // log.debug(" JCR refreshing " + node + "..."); - // Thread.dumpStack(); - boolean isPassed = true; - try { - if (node.isNodeType(SlcTypes.SLC_TEST_RESULT)) { - isPassed = node.getNode(SlcNames.SLC_AGGREGATED_STATUS) - .getProperty(SlcNames.SLC_SUCCESS).getBoolean(); - } else if (node.isNodeType(SlcTypes.SLC_RESULT_FOLDER)) { - NodeIterator ni = node.getNodes(); - while (ni.hasNext()) { - Node currChild = ni.nextNode(); - isPassed = isPassed & jcrRefresh(currChild); - } - if (isPassed != node.getNode(SlcNames.SLC_AGGREGATED_STATUS) - .getProperty(SlcNames.SLC_SUCCESS).getBoolean()) { - node.getNode(SlcNames.SLC_AGGREGATED_STATUS).setProperty( - SlcNames.SLC_SUCCESS, isPassed); - node.getSession().save(); - return isPassed; - } - } else - ; // do nothing - } catch (RepositoryException e) { - throw new SlcException("Cannot register listeners", e); - } - return isPassed; - } - - private ResultParent[] initializeResultTree() { - try { - // Force initialization of the tree structure if needed - SlcJcrResultUtils.getSlcResultsParentNode(session); - SlcJcrResultUtils.getMyResultParentNode(session); - // Remove yesterday and last 7 days virtual folders - // ResultParent[] roots = new ResultParent[5]; - ResultParent[] roots = new ResultParent[3]; - - // My results - roots[0] = new ParentNodeFolder(null, - SlcJcrResultUtils.getMyResultParentNode(session), - SlcUiConstants.DEFAULT_MY_RESULTS_FOLDER_LABEL); - - // today - Calendar cal = Calendar.getInstance(); - String relPath = JcrUtils.dateAsPath(cal); - List datePathes = new ArrayList(); - datePathes.add(relPath); - roots[1] = new VirtualFolder(null, - ResultParentUtils.getResultsForDates(session, datePathes), - "Today"); - - // // Yesterday - // cal = Calendar.getInstance(); - // cal.add(Calendar.DAY_OF_YEAR, -1); - // relPath = JcrUtils.dateAsPath(cal); - // datePathes = new ArrayList(); - // datePathes.add(relPath); - // roots[2] = new VirtualFolder(null, - // ResultParentUtils.getResultsForDates(session, datePathes), - // "Yesterday"); - // // Last 7 days - // - // cal = Calendar.getInstance(); - // datePathes = new ArrayList(); - // - // for (int i = 0; i < 7; i++) { - // cal.add(Calendar.DAY_OF_YEAR, -i); - // relPath = JcrUtils.dateAsPath(cal); - // datePathes.add(relPath); - // } - // roots[3] = new VirtualFolder(null, - // ResultParentUtils.getResultsForDates(session, datePathes), - // "Last 7 days"); - - // All results - Node otherResultsPar = session.getNode(SlcJcrResultUtils - .getSlcResultsBasePath(session)); - // roots[4] = new ParentNodeFolder(null, otherResultsPar, - // "All results"); - roots[2] = new ParentNodeFolder(null, otherResultsPar, - "All results"); - return roots; - } catch (RepositoryException re) { - throw new SlcException( - "Unexpected error while initializing ResultTree.", re); - } - } - - // Manage context menu - /** - * Defines the commands that will pop up in the context menu. - **/ - protected void contextMenuAboutToShow(IMenuManager menuManager) { - IWorkbenchWindow window = ClientUiPlugin.getDefault().getWorkbench() - .getActiveWorkbenchWindow(); - - IStructuredSelection selection = (IStructuredSelection) resultTreeViewer - .getSelection(); - boolean canAddSubfolder = false; - boolean canRenamefolder = false; - boolean isSingleResultNode = false; - boolean isUnderMyResult = false; - boolean validMultipleDelete = false; - try { - - // Building conditions - if (selection.size() == 1) { - Object obj = selection.getFirstElement(); - if (obj instanceof SingleResultNode) - isSingleResultNode = true; - else if (obj instanceof ParentNodeFolder) { - Node cNode = ((ParentNodeFolder) obj).getNode(); - if (cNode.isNodeType(SlcTypes.SLC_RESULT_FOLDER)) { - canAddSubfolder = true; - canRenamefolder = true; - isUnderMyResult = true; - } else if (cNode - .isNodeType(SlcTypes.SLC_MY_RESULT_ROOT_FOLDER)) { - canAddSubfolder = true; - } - } - } else { - @SuppressWarnings("rawtypes") - Iterator it = selection.iterator(); - multicheck: while (it.hasNext()) { - validMultipleDelete = true; - Object obj = it.next(); - if (obj instanceof SingleResultNode) - continue multicheck; - else if (obj instanceof ParentNodeFolder) { - Node cNode = ((ParentNodeFolder) obj).getNode(); - if (cNode.isNodeType(SlcTypes.SLC_RESULT_FOLDER)) - continue multicheck; - else { - validMultipleDelete = false; - break multicheck; - } - } else { - validMultipleDelete = false; - break multicheck; - } - } - } - } catch (RepositoryException re) { - throw new SlcException( - "unexpected error while building condition for context menu", - re); - } - - // Effective Refresh - CommandUtils.refreshCommand(menuManager, window, - RefreshJcrResultTreeView.ID, - RefreshJcrResultTreeView.DEFAULT_LABEL, - RefreshJcrResultTreeView.DEFAULT_IMG_DESCRIPTOR, true); - - CommandUtils.refreshCommand(menuManager, window, DeleteItems.ID, - DeleteItems.DEFAULT_LABEL, DeleteItems.DEFAULT_IMG_DESCRIPTOR, - isUnderMyResult || isSingleResultNode || validMultipleDelete); - - CommandUtils.refreshCommand(menuManager, window, AddResultFolder.ID, - AddResultFolder.DEFAULT_LABEL, - ClientUiPlugin.getDefault().getWorkbench().getSharedImages() - .getImageDescriptor(ISharedImages.IMG_OBJ_ADD), - canAddSubfolder); - - CommandUtils.refreshCommand(menuManager, window, RenameResultFolder.ID, - RenameResultFolder.DEFAULT_LABEL, - RenameResultFolder.DEFAULT_IMG_DESCRIPTOR, canRenamefolder); - - // Command removed for the time being. - CommandUtils.refreshCommand(menuManager, window, RenameResultNode.ID, - RenameResultNode.DEFAULT_LABEL, - RenameResultNode.DEFAULT_IMG_DESCRIPTOR, false); - - // Test to be removed - // If you use this pattern, do not forget to call - // menuManager.setRemoveAllWhenShown(true); - // when creating the menuManager - - // menuManager.add(new Action("Test") { - // public void run() { - // log.debug("do something"); - // } - // }); - } - - /* INNER CLASSES */ - class ViewDragListener implements DragSourceListener { - - public void dragStart(DragSourceEvent event) { - // Check if the drag action should start. - IStructuredSelection selection = (IStructuredSelection) resultTreeViewer - .getSelection(); - boolean doIt = false; - - // FIXME clean this code. - try { - if (selection.size() == 1) { - Object obj = selection.getFirstElement(); - if (obj instanceof ResultFolder) { - Node tNode = ((ResultFolder) obj).getNode(); - if (tNode.getPrimaryNodeType().isNodeType( - SlcTypes.SLC_RESULT_FOLDER)) { - doIt = true; - isResultFolder = true; - } - } else - isResultFolder = false; - } else - isResultFolder = false; - - if (!isResultFolder) { - @SuppressWarnings("rawtypes") - Iterator it = selection.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof SingleResultNode) { - Node tNode = ((SingleResultNode) obj).getNode(); - if (tNode.getPrimaryNodeType().isNodeType( - SlcTypes.SLC_TEST_RESULT)) { - doIt = true; - } - } - } - } - - } catch (RepositoryException re) { - throw new SlcException( - "unexpected error while validating drag source", re); - } - event.doit = doIt; - } - - public void dragSetData(DragSourceEvent event) { - IStructuredSelection selection = (IStructuredSelection) resultTreeViewer - .getSelection(); - - try { - // specific case of a result folder - if (isResultFolder) { - Object obj = selection.getFirstElement(); - event.data = ((ResultFolder) obj).getNode().getIdentifier(); - } else { - @SuppressWarnings("rawtypes") - Iterator it = selection.iterator(); - StringBuilder nodes = new StringBuilder(); - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof SingleResultNode) { - Node tNode = ((SingleResultNode) obj).getNode(); - if (tNode.getPrimaryNodeType().isNodeType( - SlcTypes.SLC_TEST_RESULT)) { - nodes.append(tNode.getIdentifier()).append(";"); - } - } - } - event.data = nodes.toString(); - } - } catch (RepositoryException re) { - throw new SlcException("unexpected error while setting data", - re); - } - } - - public void dragFinished(DragSourceEvent event) { - // refresh is done via observer - } - } - - // Implementation of the Drop Listener - protected class ViewDropListener extends ViewerDropAdapter { - private Node targetParentNode = null; - - public ViewDropListener(Viewer viewer) { - super(viewer); - } - - @Override - public boolean validateDrop(Object target, int operation, - TransferData transferType) { - boolean validDrop = false; - try { - // We can only drop under myResults - Node tpNode = null; - if (target instanceof SingleResultNode) { - Node currNode = ((SingleResultNode) target).getNode(); - String pPath = currNode.getParent().getPath(); - if (pPath.startsWith(SlcJcrResultUtils - .getMyResultsBasePath(session))) - tpNode = currNode.getParent(); - } else if (target instanceof ResultFolder) { - tpNode = ((ResultFolder) target).getNode(); - } else if (target instanceof ParentNodeFolder) { - Node node = ((ParentNodeFolder) target).getNode(); - if (node.isNodeType(SlcTypes.SLC_MY_RESULT_ROOT_FOLDER)) - tpNode = ((ParentNodeFolder) target).getNode(); - } - - if (tpNode != null) { - targetParentNode = tpNode; - validDrop = true; - } - } catch (RepositoryException re) { - throw new SlcException( - "unexpected error while validating drop target", re); - } - return validDrop; - } - - @Override - public boolean performDrop(Object data) { - // clear selection to prevent unwanted scrolling of the UI - resultTreeViewer.setSelection(null); - try { - if (isResultFolder) { - // Sanity check : we cannot move a folder to one of its sub - // folder or neither move an object in the same parent - // folder - Node source = session.getNodeByIdentifier((String) data); - if (targetParentNode.getPath().startsWith(source.getPath()) - || source.getParent().getPath() - .equals(targetParentNode.getPath())) - return false; - - // Move - String sourcePath = source.getPath(); - String destPath = targetParentNode.getPath() + "/" - + source.getName(); - session.move(sourcePath, destPath); - // Update passed status of the parent source Node - ResultParentUtils.updatePassedStatus( - session.getNode(JcrUtils.parentPath(sourcePath)), - true); - // Node target = session.getNode(destPath); - session.save(); - return true; - } - - String[] datas = ((String) data).split(";"); - nodesToCopy: for (String id : datas) { - - Node source = session.getNodeByIdentifier(id); - String name; - if (source.hasProperty(Property.JCR_TITLE)) - name = source.getProperty(Property.JCR_TITLE) - .getString(); - else if (source.hasProperty(SlcNames.SLC_TEST_CASE)) - name = source.getProperty(SlcNames.SLC_TEST_CASE) - .getString(); - else - name = source.getName(); - - // Check if another copy of the same test instance already - // exists at target - NodeIterator ni = targetParentNode.getNodes(); - String slcUid = source.getProperty(SlcNames.SLC_UUID) - .getString(); - while (ni.hasNext()) { - Node curr = ni.nextNode(); - if (curr.hasProperty(SlcNames.SLC_UUID) - && slcUid.equals(curr.getProperty( - SlcNames.SLC_UUID).getString())) { - MessageDialog - .openWarning( - PlatformUI.getWorkbench() - .getDisplay() - .getActiveShell(), - "Duplicated instance.", - "An instance of the same test case (" - + name - + ") exists at destination.\n " - + "This item will not be neither copied nor moved."); - continue nodesToCopy; - - } - } - - Node target; - boolean passedStatus = false; - if (source.hasNode(SlcNames.SLC_AGGREGATED_STATUS)) - passedStatus = source - .getNode(SlcNames.SLC_AGGREGATED_STATUS) - .getProperty(SlcNames.SLC_SUCCESS).getBoolean(); - - boolean isActionUnderMyResult = source.getPath() - .startsWith( - SlcJcrResultUtils - .getMyResultsBasePath(session)); - - if (!isActionUnderMyResult) {// Copy - target = targetParentNode.addNode(source.getName(), - source.getPrimaryNodeType().getName()); - JcrUtils.copy(source, target); - } else {// move - String sourcePath = source.getPath(); - String destPath = targetParentNode.getPath() + "/" - + name; - session.move(sourcePath, destPath); - // Update passed status of the parent source Node - ResultParentUtils - .updatePassedStatus(session.getNode(JcrUtils - .parentPath(sourcePath)), true); - target = session.getNode(destPath); - - } - if (!target.isNodeType(NodeType.MIX_TITLE)) - target.addMixin(NodeType.MIX_TITLE); - target.setProperty(Property.JCR_TITLE, name); - ResultParentUtils.updatePassedStatus(target.getParent(), - passedStatus); - session.save(); - } - } catch (RepositoryException re) { - throw new SlcException( - "unexpected error while copying dropped node", re); - - } - return true; - } - } - - class MyResultsObserver extends AsyncUiEventListener { - - public MyResultsObserver(Display display) { - super(display); - } - - @Override - protected Boolean willProcessInUiThread(List events) - throws RepositoryException { - // unfiltered for the time being - return true; - } - - protected void onEventInUiThread(List events) - throws RepositoryException { - List nodesToRefresh = new ArrayList(); - - for (Event event : events) { - String parPath = JcrUtils.parentPath(event.getPath()); - if (session.nodeExists(parPath)) { - Node node = session.getNode(parPath); - if (!nodesToRefresh.contains(node)) { - nodesToRefresh.add(node); - } - } - } - - // Update check nodes - for (Node node : nodesToRefresh) - jcrRefresh(node); - refresh(null); - } - } - - class AllResultsObserver extends AsyncUiEventListener { - - public AllResultsObserver(Display display) { - super(display); - } - - @Override - protected Boolean willProcessInUiThread(List events) - throws RepositoryException { - // unfiltered for the time being - return true; - } - - protected void onEventInUiThread(List events) - throws RepositoryException { - refresh(null); - // if (lastSelectedSourceElementParent != null) - // refresh(lastSelectedSourceElementParent); - } - } - - class PropertiesContentProvider implements IStructuredContentProvider { - - public void dispose() { - } - - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - } - - public Object[] getElements(Object inputElement) { - try { - if (inputElement instanceof Node) { - Node node = (Node) inputElement; - if (node.isNodeType(SlcTypes.SLC_TEST_RESULT)) { - List props = new ArrayList(); - if (node.hasProperty(SlcNames.SLC_TEST_CASE)) - props.add(node.getProperty(SlcNames.SLC_TEST_CASE)); - if (node.hasProperty(SlcNames.SLC_COMPLETED)) - props.add(node.getProperty(SlcNames.SLC_COMPLETED)); - if (node.hasNode(SlcNames.SLC_AGGREGATED_STATUS)) { - Node status = node - .getNode(SlcNames.SLC_AGGREGATED_STATUS); - props.add(status.getProperty(SlcNames.SLC_SUCCESS)); - if (status.hasProperty(SlcNames.SLC_MESSAGE)) - props.add(status - .getProperty(SlcNames.SLC_MESSAGE)); - if (status.hasProperty(SlcNames.SLC_ERROR_MESSAGE)) - props.add(status - .getProperty(SlcNames.SLC_ERROR_MESSAGE)); - } - return props.toArray(); - } - } - return new Object[] {}; - - } catch (RepositoryException e) { - throw new SlcException("Cannot get element for " - + inputElement, e); - } - } - } - - class MySelectionChangedListener implements ISelectionChangedListener { - - public void selectionChanged(SelectionChangedEvent event) { - if (!event.getSelection().isEmpty()) { - IStructuredSelection sel = (IStructuredSelection) event - .getSelection(); - ResultParent firstItem = (ResultParent) sel.getFirstElement(); - if (firstItem instanceof SingleResultNode) - propertiesViewer.setInput(((SingleResultNode) firstItem) - .getNode()); - else - propertiesViewer.setInput(null); - // update cache for Drag & drop - // lastSelectedTargetElement = firstItem; - // lastSelectedSourceElement = firstItem; - // lastSelectedSourceElementParent = (ResultParent) firstItem - // .getParent(); - // String pPath = ""; - // try { - // - // if (firstItem instanceof ParentNodeFolder) - // pPath = ((ParentNodeFolder) firstItem).getNode() - // .getPath(); - // else if (firstItem instanceof SingleResultNode) - // pPath = ((SingleResultNode) firstItem).getNode() - // .getPath(); - // } catch (RepositoryException e) { - // throw new SlcException( - // "Unexpected error while checking parent UI tree", e); - // } - // if ((pPath.startsWith(SlcJcrResultUtils - // .getMyResultsBasePath(session)))) - // isActionUnderMyResult = true; - // else - // isActionUnderMyResult = false; - } - } - } - - class ViewDoubleClickListener implements IDoubleClickListener { - public void doubleClick(DoubleClickEvent evt) { - processDoubleClick(evt); - } - - } - - /* DEPENDENCY INJECTION */ - public void dispose() { - // JcrUtils.unregisterQuietly(session.getWorkspace(), resultsObserver); - JcrUtils.logoutQuietly(session); - super.dispose(); - } - - public void setRepository(Repository repository) { - this.repository = repository; - } -} \ No newline at end of file +package org.argeo.slc.client.ui.views; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Iterator; +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.nodetype.NodeType; +import javax.jcr.observation.Event; +import javax.jcr.observation.EventListener; +import javax.jcr.observation.ObservationManager; + +import org.argeo.api.NodeConstants; +import org.argeo.cms.ui.workbench.util.CommandUtils; +import org.argeo.eclipse.ui.jcr.AsyncUiEventListener; +import org.argeo.jcr.JcrUtils; +import org.argeo.slc.SlcException; +import org.argeo.slc.SlcNames; +import org.argeo.slc.SlcTypes; +import org.argeo.slc.client.ui.ClientUiPlugin; +import org.argeo.slc.client.ui.SlcUiConstants; +import org.argeo.slc.client.ui.commands.AddResultFolder; +import org.argeo.slc.client.ui.commands.DeleteItems; +import org.argeo.slc.client.ui.commands.RefreshJcrResultTreeView; +import org.argeo.slc.client.ui.commands.RenameResultFolder; +import org.argeo.slc.client.ui.commands.RenameResultNode; +import org.argeo.slc.client.ui.editors.ProcessEditor; +import org.argeo.slc.client.ui.editors.ProcessEditorInput; +import org.argeo.slc.client.ui.model.ParentNodeFolder; +import org.argeo.slc.client.ui.model.ResultFolder; +import org.argeo.slc.client.ui.model.ResultItemsComparator; +import org.argeo.slc.client.ui.model.ResultItemsComparer; +import org.argeo.slc.client.ui.model.ResultParent; +import org.argeo.slc.client.ui.model.ResultParentUtils; +import org.argeo.slc.client.ui.model.SingleResultNode; +import org.argeo.slc.client.ui.model.VirtualFolder; +import org.argeo.slc.client.ui.providers.ResultTreeContentProvider; +import org.argeo.slc.client.ui.providers.ResultTreeLabelProvider; +import org.argeo.slc.jcr.SlcJcrResultUtils; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.ColumnLabelProvider; +import org.eclipse.jface.viewers.DecoratingLabelProvider; +import org.eclipse.jface.viewers.DoubleClickEvent; +import org.eclipse.jface.viewers.IDoubleClickListener; +import org.eclipse.jface.viewers.ILabelDecorator; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.TableViewerColumn; +import org.eclipse.jface.viewers.TreePath; +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.DragSourceEvent; +import org.eclipse.swt.dnd.DragSourceListener; +import org.eclipse.swt.dnd.TextTransfer; +import org.eclipse.swt.dnd.Transfer; +import org.eclipse.swt.dnd.TransferData; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.ui.ISharedImages; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.part.ViewPart; + +/** SLC generic JCR Result tree view. */ +public class JcrResultTreeView extends ViewPart { + public final static String ID = ClientUiPlugin.ID + ".jcrResultTreeView"; + + private final static DateFormat dateFormat = new SimpleDateFormat( + SlcUiConstants.DEFAULT_DISPLAY_DATE_TIME_FORMAT); + + // private final static Log log = + // LogFactory.getLog(JcrResultTreeView.class); + + /* DEPENDENCY INJECTION */ + private Repository repository; + private Session session; + + // This page widgets + private TreeViewer resultTreeViewer; + private TableViewer propertiesViewer; + + private EventListener myResultsObserver = null; + private EventListener allResultsObserver = null; + + // under My Results + private final static String[] observedNodeTypesUnderMyResult = { + SlcTypes.SLC_TEST_RESULT, SlcTypes.SLC_RESULT_FOLDER, + SlcTypes.SLC_MY_RESULT_ROOT_FOLDER }; + + private final static String[] observedNodeTypesUnderAllResults = { + SlcTypes.SLC_TEST_RESULT, NodeType.NT_UNSTRUCTURED }; + + private boolean isResultFolder = false; + + /** + * To be overridden to adapt size of form and result frames. + */ + protected int[] getWeights() { + return new int[] { 70, 30 }; + } + + @Override + public void createPartControl(Composite parent) { + try { + session = repository.login(NodeConstants.HOME_WORKSPACE); + } catch (RepositoryException e1) { + throw new SlcException("Cannot log in to repository"); + } + + parent.setLayout(new FillLayout()); + // Main layout + SashForm sashForm = new SashForm(parent, SWT.VERTICAL); + sashForm.setSashWidth(4); + sashForm.setLayout(new FillLayout()); + + // Create the tree on top of the view + Composite top = new Composite(sashForm, SWT.NONE); + GridLayout gl = new GridLayout(1, false); + top.setLayout(gl); + resultTreeViewer = createResultsTreeViewer(top); + + // Create the property viewer on the bottom + Composite bottom = new Composite(sashForm, SWT.NONE); + bottom.setLayout(new GridLayout(1, false)); + propertiesViewer = createPropertiesViewer(bottom); + + sashForm.setWeights(getWeights()); + + setOrderedInput(resultTreeViewer); + + // Initialize observer + try { + ObservationManager observationManager = session.getWorkspace() + .getObservationManager(); + myResultsObserver = new MyResultsObserver(resultTreeViewer + .getTree().getDisplay()); + allResultsObserver = new AllResultsObserver(resultTreeViewer + .getTree().getDisplay()); + + // observe tree changes under MyResults + observationManager.addEventListener(myResultsObserver, + Event.NODE_ADDED | Event.NODE_REMOVED, + SlcJcrResultUtils.getMyResultsBasePath(session), true, + null, observedNodeTypesUnderMyResult, false); + // observe tree changes under All results + observationManager.addEventListener(allResultsObserver, + Event.NODE_ADDED | Event.NODE_REMOVED, + SlcJcrResultUtils.getSlcResultsBasePath(session), true, + null, observedNodeTypesUnderAllResults, false); + } catch (RepositoryException e) { + throw new SlcException("Cannot register listeners", e); + } + } + + /** + * Override default behaviour so that default defined order remains + * unchanged on first level of the tree + */ + private void setOrderedInput(TreeViewer viewer) { + // Add specific ordering + viewer.setInput(null); + viewer.setComparator(null); + viewer.setInput(initializeResultTree()); + viewer.setComparator(new ResultItemsComparator()); + } + + // The main tree viewer + protected TreeViewer createResultsTreeViewer(Composite parent) { + int style = SWT.BORDER | SWT.MULTI; + + TreeViewer viewer = new TreeViewer(parent, style); + viewer.getTree().setLayoutData( + new GridData(SWT.FILL, SWT.FILL, true, true)); + + viewer.setContentProvider(new ResultTreeContentProvider()); + + // Add label provider with label decorator + ResultTreeLabelProvider rtLblProvider = new ResultTreeLabelProvider(); + ILabelDecorator decorator = ClientUiPlugin.getDefault().getWorkbench() + .getDecoratorManager().getLabelDecorator(); + viewer.setLabelProvider(new DecoratingLabelProvider(rtLblProvider, + decorator)); + viewer.addDoubleClickListener(new ViewDoubleClickListener()); + + // Override default behaviour to insure that 2 distincts results that + // have the same name will be correctly and distincly returned by + // corresponding TreeViewer.getSelection() method. + viewer.setComparer(new ResultItemsComparer()); + + // viewer.setLabelProvider(rtLblProvider); + getSite().setSelectionProvider(viewer); + + // add drag & drop support + int operations = DND.DROP_COPY | DND.DROP_MOVE; + Transfer[] tt = new Transfer[] { TextTransfer.getInstance() }; + viewer.addDragSupport(operations, tt, new ViewDragListener()); + viewer.addDropSupport(operations, tt, new ViewDropListener(viewer)); + + // add context menu + 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); + menuManager.setRemoveAllWhenShown(true); + + getSite().registerContextMenu(menuManager, viewer); + + // add change listener to display TestResult information in the property + // viewer + viewer.addSelectionChangedListener(new MySelectionChangedListener()); + return viewer; + } + + // Detailed property viewer + protected TableViewer createPropertiesViewer(Composite parent) { + propertiesViewer = new TableViewer(parent); + propertiesViewer.getTable().setLayoutData( + new GridData(SWT.FILL, SWT.FILL, true, true)); + propertiesViewer.getTable().setHeaderVisible(true); + propertiesViewer.setContentProvider(new PropertiesContentProvider()); + TableViewerColumn col = new TableViewerColumn(propertiesViewer, + SWT.NONE); + col.getColumn().setText("Name"); + col.getColumn().setWidth(100); + col.setLabelProvider(new ColumnLabelProvider() { + public String getText(Object element) { + try { + String name = ((Property) element).getName(); + String value = null; + if (SlcNames.SLC_TEST_CASE.equals(name)) + value = "Test case"; + else if (SlcNames.SLC_COMPLETED.equals(name)) + value = "Completed on"; + else if (SlcNames.SLC_SUCCESS.equals(name)) + value = "Status"; + else if (SlcNames.SLC_MESSAGE.equals(name)) + value = "Message"; + else if (SlcNames.SLC_ERROR_MESSAGE.equals(name)) + value = "Error"; + return value; + } catch (RepositoryException e) { + throw new SlcException( + "Unexpected exception in label provider", e); + } + } + }); + col = new TableViewerColumn(propertiesViewer, SWT.NONE); + col.getColumn().setText("Value"); + col.getColumn().setWidth(200); + col.setLabelProvider(new ColumnLabelProvider() { + public String getText(Object element) { + try { + Property property = (Property) element; + String name = property.getName(); + String value = null; + + if (SlcNames.SLC_TEST_CASE.equals(name) + || SlcNames.SLC_ERROR_MESSAGE.equals(name) + || SlcNames.SLC_MESSAGE.equals(name)) + value = property.getValue().getString(); + else if (SlcNames.SLC_COMPLETED.equals(name)) { + Calendar date = property.getValue().getDate(); + value = dateFormat.format(date.getTime()); + } else if (SlcNames.SLC_SUCCESS.equals(name)) { + if (property.getValue().getBoolean()) + value = "PASSED"; + else { + if (property.getParent().hasProperty( + SlcNames.SLC_ERROR_MESSAGE)) + value = "ERROR"; + else + value = "FAILED"; + } + } + return value; + } catch (RepositoryException e) { + throw new SlcException( + "Unexpected exception in label provider", e); + } + } + }); + propertiesViewer.setInput(getViewSite()); + return propertiesViewer; + } + + /** + * Override to provide specific behaviour. Typically to enable the display + * of a result file. + * + * @param evt + */ + protected void processDoubleClick(DoubleClickEvent evt) { + Object obj = ((IStructuredSelection) evt.getSelection()) + .getFirstElement(); + try { + if (obj instanceof SingleResultNode) { + SingleResultNode srNode = (SingleResultNode) obj; + Node node = srNode.getNode(); + // 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); + } + } + + @Override + public void setFocus() { + } + + /** + * refreshes the passed resultParent and its corresponding subtree. It + * refreshes the whole viewer if null is passed. + * + * @param ResultParent + * + */ + public void refresh(ResultParent resultParent) { + if (resultParent == null) { + if (!resultTreeViewer.getTree().isDisposed()) { + TreePath[] tps = resultTreeViewer.getExpandedTreePaths(); + setOrderedInput(resultTreeViewer); + resultTreeViewer.setExpandedTreePaths(tps); + } else + setOrderedInput(resultTreeViewer); + } else { + if (resultParent instanceof ParentNodeFolder) { + ParentNodeFolder currFolder = (ParentNodeFolder) resultParent; + jcrRefresh(currFolder.getNode()); + currFolder.forceFullRefresh(); + } + // FIXME: specific refresh does not work + // resultTreeViewer.refresh(resultParent, true); + refresh(null); + } + } + + /** + * refreshes the passed node and its corresponding subtree. + * + * @param node + * cannot be null + * + */ + public boolean jcrRefresh(Node node) { + // if (log.isDebugEnabled()) + // log.debug(" JCR refreshing " + node + "..."); + // Thread.dumpStack(); + boolean isPassed = true; + try { + if (node.isNodeType(SlcTypes.SLC_TEST_RESULT)) { + isPassed = node.getNode(SlcNames.SLC_AGGREGATED_STATUS) + .getProperty(SlcNames.SLC_SUCCESS).getBoolean(); + } else if (node.isNodeType(SlcTypes.SLC_RESULT_FOLDER)) { + NodeIterator ni = node.getNodes(); + while (ni.hasNext()) { + Node currChild = ni.nextNode(); + isPassed = isPassed & jcrRefresh(currChild); + } + if (isPassed != node.getNode(SlcNames.SLC_AGGREGATED_STATUS) + .getProperty(SlcNames.SLC_SUCCESS).getBoolean()) { + node.getNode(SlcNames.SLC_AGGREGATED_STATUS).setProperty( + SlcNames.SLC_SUCCESS, isPassed); + node.getSession().save(); + return isPassed; + } + } else + ; // do nothing + } catch (RepositoryException e) { + throw new SlcException("Cannot register listeners", e); + } + return isPassed; + } + + private ResultParent[] initializeResultTree() { + try { + // Force initialization of the tree structure if needed + SlcJcrResultUtils.getSlcResultsParentNode(session); + SlcJcrResultUtils.getMyResultParentNode(session); + // Remove yesterday and last 7 days virtual folders + // ResultParent[] roots = new ResultParent[5]; + ResultParent[] roots = new ResultParent[3]; + + // My results + roots[0] = new ParentNodeFolder(null, + SlcJcrResultUtils.getMyResultParentNode(session), + SlcUiConstants.DEFAULT_MY_RESULTS_FOLDER_LABEL); + + // today + Calendar cal = Calendar.getInstance(); + String relPath = JcrUtils.dateAsPath(cal); + List datePathes = new ArrayList(); + datePathes.add(relPath); + roots[1] = new VirtualFolder(null, + ResultParentUtils.getResultsForDates(session, datePathes), + "Today"); + + // // Yesterday + // cal = Calendar.getInstance(); + // cal.add(Calendar.DAY_OF_YEAR, -1); + // relPath = JcrUtils.dateAsPath(cal); + // datePathes = new ArrayList(); + // datePathes.add(relPath); + // roots[2] = new VirtualFolder(null, + // ResultParentUtils.getResultsForDates(session, datePathes), + // "Yesterday"); + // // Last 7 days + // + // cal = Calendar.getInstance(); + // datePathes = new ArrayList(); + // + // for (int i = 0; i < 7; i++) { + // cal.add(Calendar.DAY_OF_YEAR, -i); + // relPath = JcrUtils.dateAsPath(cal); + // datePathes.add(relPath); + // } + // roots[3] = new VirtualFolder(null, + // ResultParentUtils.getResultsForDates(session, datePathes), + // "Last 7 days"); + + // All results + Node otherResultsPar = session.getNode(SlcJcrResultUtils + .getSlcResultsBasePath(session)); + // roots[4] = new ParentNodeFolder(null, otherResultsPar, + // "All results"); + roots[2] = new ParentNodeFolder(null, otherResultsPar, + "All results"); + return roots; + } catch (RepositoryException re) { + throw new SlcException( + "Unexpected error while initializing ResultTree.", re); + } + } + + // Manage context menu + /** + * Defines the commands that will pop up in the context menu. + **/ + protected void contextMenuAboutToShow(IMenuManager menuManager) { + IWorkbenchWindow window = ClientUiPlugin.getDefault().getWorkbench() + .getActiveWorkbenchWindow(); + + IStructuredSelection selection = (IStructuredSelection) resultTreeViewer + .getSelection(); + boolean canAddSubfolder = false; + boolean canRenamefolder = false; + boolean isSingleResultNode = false; + boolean isUnderMyResult = false; + boolean validMultipleDelete = false; + try { + + // Building conditions + if (selection.size() == 1) { + Object obj = selection.getFirstElement(); + if (obj instanceof SingleResultNode) + isSingleResultNode = true; + else if (obj instanceof ParentNodeFolder) { + Node cNode = ((ParentNodeFolder) obj).getNode(); + if (cNode.isNodeType(SlcTypes.SLC_RESULT_FOLDER)) { + canAddSubfolder = true; + canRenamefolder = true; + isUnderMyResult = true; + } else if (cNode + .isNodeType(SlcTypes.SLC_MY_RESULT_ROOT_FOLDER)) { + canAddSubfolder = true; + } + } + } else { + @SuppressWarnings("rawtypes") + Iterator it = selection.iterator(); + multicheck: while (it.hasNext()) { + validMultipleDelete = true; + Object obj = it.next(); + if (obj instanceof SingleResultNode) + continue multicheck; + else if (obj instanceof ParentNodeFolder) { + Node cNode = ((ParentNodeFolder) obj).getNode(); + if (cNode.isNodeType(SlcTypes.SLC_RESULT_FOLDER)) + continue multicheck; + else { + validMultipleDelete = false; + break multicheck; + } + } else { + validMultipleDelete = false; + break multicheck; + } + } + } + } catch (RepositoryException re) { + throw new SlcException( + "unexpected error while building condition for context menu", + re); + } + + // Effective Refresh + CommandUtils.refreshCommand(menuManager, window, + RefreshJcrResultTreeView.ID, + RefreshJcrResultTreeView.DEFAULT_LABEL, + RefreshJcrResultTreeView.DEFAULT_IMG_DESCRIPTOR, true); + + CommandUtils.refreshCommand(menuManager, window, DeleteItems.ID, + DeleteItems.DEFAULT_LABEL, DeleteItems.DEFAULT_IMG_DESCRIPTOR, + isUnderMyResult || isSingleResultNode || validMultipleDelete); + + CommandUtils.refreshCommand(menuManager, window, AddResultFolder.ID, + AddResultFolder.DEFAULT_LABEL, + ClientUiPlugin.getDefault().getWorkbench().getSharedImages() + .getImageDescriptor(ISharedImages.IMG_OBJ_ADD), + canAddSubfolder); + + CommandUtils.refreshCommand(menuManager, window, RenameResultFolder.ID, + RenameResultFolder.DEFAULT_LABEL, + RenameResultFolder.DEFAULT_IMG_DESCRIPTOR, canRenamefolder); + + // Command removed for the time being. + CommandUtils.refreshCommand(menuManager, window, RenameResultNode.ID, + RenameResultNode.DEFAULT_LABEL, + RenameResultNode.DEFAULT_IMG_DESCRIPTOR, false); + + // Test to be removed + // If you use this pattern, do not forget to call + // menuManager.setRemoveAllWhenShown(true); + // when creating the menuManager + + // menuManager.add(new Action("Test") { + // public void run() { + // log.debug("do something"); + // } + // }); + } + + /* INNER CLASSES */ + class ViewDragListener implements DragSourceListener { + + public void dragStart(DragSourceEvent event) { + // Check if the drag action should start. + IStructuredSelection selection = (IStructuredSelection) resultTreeViewer + .getSelection(); + boolean doIt = false; + + // FIXME clean this code. + try { + if (selection.size() == 1) { + Object obj = selection.getFirstElement(); + if (obj instanceof ResultFolder) { + Node tNode = ((ResultFolder) obj).getNode(); + if (tNode.getPrimaryNodeType().isNodeType( + SlcTypes.SLC_RESULT_FOLDER)) { + doIt = true; + isResultFolder = true; + } + } else + isResultFolder = false; + } else + isResultFolder = false; + + if (!isResultFolder) { + @SuppressWarnings("rawtypes") + Iterator it = selection.iterator(); + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof SingleResultNode) { + Node tNode = ((SingleResultNode) obj).getNode(); + if (tNode.getPrimaryNodeType().isNodeType( + SlcTypes.SLC_TEST_RESULT)) { + doIt = true; + } + } + } + } + + } catch (RepositoryException re) { + throw new SlcException( + "unexpected error while validating drag source", re); + } + event.doit = doIt; + } + + public void dragSetData(DragSourceEvent event) { + IStructuredSelection selection = (IStructuredSelection) resultTreeViewer + .getSelection(); + + try { + // specific case of a result folder + if (isResultFolder) { + Object obj = selection.getFirstElement(); + event.data = ((ResultFolder) obj).getNode().getIdentifier(); + } else { + @SuppressWarnings("rawtypes") + Iterator it = selection.iterator(); + StringBuilder nodes = new StringBuilder(); + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof SingleResultNode) { + Node tNode = ((SingleResultNode) obj).getNode(); + if (tNode.getPrimaryNodeType().isNodeType( + SlcTypes.SLC_TEST_RESULT)) { + nodes.append(tNode.getIdentifier()).append(";"); + } + } + } + event.data = nodes.toString(); + } + } catch (RepositoryException re) { + throw new SlcException("unexpected error while setting data", + re); + } + } + + public void dragFinished(DragSourceEvent event) { + // refresh is done via observer + } + } + + // Implementation of the Drop Listener + protected class ViewDropListener extends ViewerDropAdapter { + private Node targetParentNode = null; + + public ViewDropListener(Viewer viewer) { + super(viewer); + } + + @Override + public boolean validateDrop(Object target, int operation, + TransferData transferType) { + boolean validDrop = false; + try { + // We can only drop under myResults + Node tpNode = null; + if (target instanceof SingleResultNode) { + Node currNode = ((SingleResultNode) target).getNode(); + String pPath = currNode.getParent().getPath(); + if (pPath.startsWith(SlcJcrResultUtils + .getMyResultsBasePath(session))) + tpNode = currNode.getParent(); + } else if (target instanceof ResultFolder) { + tpNode = ((ResultFolder) target).getNode(); + } else if (target instanceof ParentNodeFolder) { + Node node = ((ParentNodeFolder) target).getNode(); + if (node.isNodeType(SlcTypes.SLC_MY_RESULT_ROOT_FOLDER)) + tpNode = ((ParentNodeFolder) target).getNode(); + } + + if (tpNode != null) { + targetParentNode = tpNode; + validDrop = true; + } + } catch (RepositoryException re) { + throw new SlcException( + "unexpected error while validating drop target", re); + } + return validDrop; + } + + @Override + public boolean performDrop(Object data) { + // clear selection to prevent unwanted scrolling of the UI + resultTreeViewer.setSelection(null); + try { + if (isResultFolder) { + // Sanity check : we cannot move a folder to one of its sub + // folder or neither move an object in the same parent + // folder + Node source = session.getNodeByIdentifier((String) data); + if (targetParentNode.getPath().startsWith(source.getPath()) + || source.getParent().getPath() + .equals(targetParentNode.getPath())) + return false; + + // Move + String sourcePath = source.getPath(); + String destPath = targetParentNode.getPath() + "/" + + source.getName(); + session.move(sourcePath, destPath); + // Update passed status of the parent source Node + ResultParentUtils.updatePassedStatus( + session.getNode(JcrUtils.parentPath(sourcePath)), + true); + // Node target = session.getNode(destPath); + session.save(); + return true; + } + + String[] datas = ((String) data).split(";"); + nodesToCopy: for (String id : datas) { + + Node source = session.getNodeByIdentifier(id); + String name; + if (source.hasProperty(Property.JCR_TITLE)) + name = source.getProperty(Property.JCR_TITLE) + .getString(); + else if (source.hasProperty(SlcNames.SLC_TEST_CASE)) + name = source.getProperty(SlcNames.SLC_TEST_CASE) + .getString(); + else + name = source.getName(); + + // Check if another copy of the same test instance already + // exists at target + NodeIterator ni = targetParentNode.getNodes(); + String slcUid = source.getProperty(SlcNames.SLC_UUID) + .getString(); + while (ni.hasNext()) { + Node curr = ni.nextNode(); + if (curr.hasProperty(SlcNames.SLC_UUID) + && slcUid.equals(curr.getProperty( + SlcNames.SLC_UUID).getString())) { + MessageDialog + .openWarning( + PlatformUI.getWorkbench() + .getDisplay() + .getActiveShell(), + "Duplicated instance.", + "An instance of the same test case (" + + name + + ") exists at destination.\n " + + "This item will not be neither copied nor moved."); + continue nodesToCopy; + + } + } + + Node target; + boolean passedStatus = false; + if (source.hasNode(SlcNames.SLC_AGGREGATED_STATUS)) + passedStatus = source + .getNode(SlcNames.SLC_AGGREGATED_STATUS) + .getProperty(SlcNames.SLC_SUCCESS).getBoolean(); + + boolean isActionUnderMyResult = source.getPath() + .startsWith( + SlcJcrResultUtils + .getMyResultsBasePath(session)); + + if (!isActionUnderMyResult) {// Copy + target = targetParentNode.addNode(source.getName(), + source.getPrimaryNodeType().getName()); + JcrUtils.copy(source, target); + } else {// move + String sourcePath = source.getPath(); + String destPath = targetParentNode.getPath() + "/" + + name; + session.move(sourcePath, destPath); + // Update passed status of the parent source Node + ResultParentUtils + .updatePassedStatus(session.getNode(JcrUtils + .parentPath(sourcePath)), true); + target = session.getNode(destPath); + + } + if (!target.isNodeType(NodeType.MIX_TITLE)) + target.addMixin(NodeType.MIX_TITLE); + target.setProperty(Property.JCR_TITLE, name); + ResultParentUtils.updatePassedStatus(target.getParent(), + passedStatus); + session.save(); + } + } catch (RepositoryException re) { + throw new SlcException( + "unexpected error while copying dropped node", re); + + } + return true; + } + } + + class MyResultsObserver extends AsyncUiEventListener { + + public MyResultsObserver(Display display) { + super(display); + } + + @Override + protected Boolean willProcessInUiThread(List events) + throws RepositoryException { + // unfiltered for the time being + return true; + } + + protected void onEventInUiThread(List events) + throws RepositoryException { + List nodesToRefresh = new ArrayList(); + + for (Event event : events) { + String parPath = JcrUtils.parentPath(event.getPath()); + if (session.nodeExists(parPath)) { + Node node = session.getNode(parPath); + if (!nodesToRefresh.contains(node)) { + nodesToRefresh.add(node); + } + } + } + + // Update check nodes + for (Node node : nodesToRefresh) + jcrRefresh(node); + refresh(null); + } + } + + class AllResultsObserver extends AsyncUiEventListener { + + public AllResultsObserver(Display display) { + super(display); + } + + @Override + protected Boolean willProcessInUiThread(List events) + throws RepositoryException { + // unfiltered for the time being + return true; + } + + protected void onEventInUiThread(List events) + throws RepositoryException { + refresh(null); + // if (lastSelectedSourceElementParent != null) + // refresh(lastSelectedSourceElementParent); + } + } + + class PropertiesContentProvider implements IStructuredContentProvider { + + public void dispose() { + } + + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + } + + public Object[] getElements(Object inputElement) { + try { + if (inputElement instanceof Node) { + Node node = (Node) inputElement; + if (node.isNodeType(SlcTypes.SLC_TEST_RESULT)) { + List props = new ArrayList(); + if (node.hasProperty(SlcNames.SLC_TEST_CASE)) + props.add(node.getProperty(SlcNames.SLC_TEST_CASE)); + if (node.hasProperty(SlcNames.SLC_COMPLETED)) + props.add(node.getProperty(SlcNames.SLC_COMPLETED)); + if (node.hasNode(SlcNames.SLC_AGGREGATED_STATUS)) { + Node status = node + .getNode(SlcNames.SLC_AGGREGATED_STATUS); + props.add(status.getProperty(SlcNames.SLC_SUCCESS)); + if (status.hasProperty(SlcNames.SLC_MESSAGE)) + props.add(status + .getProperty(SlcNames.SLC_MESSAGE)); + if (status.hasProperty(SlcNames.SLC_ERROR_MESSAGE)) + props.add(status + .getProperty(SlcNames.SLC_ERROR_MESSAGE)); + } + return props.toArray(); + } + } + return new Object[] {}; + + } catch (RepositoryException e) { + throw new SlcException("Cannot get element for " + + inputElement, e); + } + } + } + + class MySelectionChangedListener implements ISelectionChangedListener { + + public void selectionChanged(SelectionChangedEvent event) { + if (!event.getSelection().isEmpty()) { + IStructuredSelection sel = (IStructuredSelection) event + .getSelection(); + ResultParent firstItem = (ResultParent) sel.getFirstElement(); + if (firstItem instanceof SingleResultNode) + propertiesViewer.setInput(((SingleResultNode) firstItem) + .getNode()); + else + propertiesViewer.setInput(null); + // update cache for Drag & drop + // lastSelectedTargetElement = firstItem; + // lastSelectedSourceElement = firstItem; + // lastSelectedSourceElementParent = (ResultParent) firstItem + // .getParent(); + // String pPath = ""; + // try { + // + // if (firstItem instanceof ParentNodeFolder) + // pPath = ((ParentNodeFolder) firstItem).getNode() + // .getPath(); + // else if (firstItem instanceof SingleResultNode) + // pPath = ((SingleResultNode) firstItem).getNode() + // .getPath(); + // } catch (RepositoryException e) { + // throw new SlcException( + // "Unexpected error while checking parent UI tree", e); + // } + // if ((pPath.startsWith(SlcJcrResultUtils + // .getMyResultsBasePath(session)))) + // isActionUnderMyResult = true; + // else + // isActionUnderMyResult = false; + } + } + } + + class ViewDoubleClickListener implements IDoubleClickListener { + public void doubleClick(DoubleClickEvent evt) { + processDoubleClick(evt); + } + + } + + /* DEPENDENCY INJECTION */ + public void dispose() { + // JcrUtils.unregisterQuietly(session.getWorkspace(), resultsObserver); + JcrUtils.logoutQuietly(session); + super.dispose(); + } + + public void setRepository(Repository repository) { + this.repository = repository; + } +} diff --git a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/wizards/ConfirmOverwriteWizard.java b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/wizards/ConfirmOverwriteWizard.java index 3fa15f9bf..d76621964 100644 --- a/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/wizards/ConfirmOverwriteWizard.java +++ b/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/wizards/ConfirmOverwriteWizard.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.wizards; import javax.jcr.Node; diff --git a/org.argeo.slc.e4/src/org/argeo/slc/e4/SlcImages.java b/org.argeo.slc.e4/src/org/argeo/slc/e4/SlcImages.java index 0ede8597f..a201bb1ab 100644 --- a/org.argeo.slc.e4/src/org/argeo/slc/e4/SlcImages.java +++ b/org.argeo.slc.e4/src/org/argeo/slc/e4/SlcImages.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.e4; diff --git a/org.argeo.slc.e4/src/org/argeo/slc/e4/parts/JcrExecutionModulesView.java b/org.argeo.slc.e4/src/org/argeo/slc/e4/parts/JcrExecutionModulesView.java index b08b8a470..fa4b8f663 100644 --- a/org.argeo.slc.e4/src/org/argeo/slc/e4/parts/JcrExecutionModulesView.java +++ b/org.argeo.slc.e4/src/org/argeo/slc/e4/parts/JcrExecutionModulesView.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.e4.parts; import java.util.Arrays; diff --git a/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/RpmFactory.java b/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/RpmFactory.java index aee295693..0223a2099 100644 --- a/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/RpmFactory.java +++ b/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/RpmFactory.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.rpmfactory; import java.io.File; diff --git a/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/RpmProxyService.java b/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/RpmProxyService.java index 8f86253b6..40002a8de 100644 --- a/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/RpmProxyService.java +++ b/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/RpmProxyService.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.rpmfactory; import org.argeo.jcr.proxy.ResourceProxy; diff --git a/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/BuildInMock.java b/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/BuildInMock.java index 18ea0c183..a69e39fde 100644 --- a/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/BuildInMock.java +++ b/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/BuildInMock.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.rpmfactory.core; import java.io.File; diff --git a/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/RpmFactoryImpl.java b/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/RpmFactoryImpl.java index b009551d2..5e1a62783 100644 --- a/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/RpmFactoryImpl.java +++ b/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/RpmFactoryImpl.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.rpmfactory.core; import java.io.File; diff --git a/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/RpmProxyServiceImpl.java b/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/RpmProxyServiceImpl.java index 7f7eb1202..d067dfaa1 100644 --- a/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/RpmProxyServiceImpl.java +++ b/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/RpmProxyServiceImpl.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.rpmfactory.core; import java.util.HashSet; diff --git a/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/RpmSpecFile.java b/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/RpmSpecFile.java index 8b5994f32..c9132f93f 100644 --- a/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/RpmSpecFile.java +++ b/org.argeo.slc.factory/src/org/argeo/slc/rpmfactory/core/RpmSpecFile.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.rpmfactory.core; import java.io.IOException; diff --git a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/JcrMetadataWriter.java b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/JcrMetadataWriter.java index c4922d325..e2d1b10fe 100644 --- a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/JcrMetadataWriter.java +++ b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/JcrMetadataWriter.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jcr; import java.util.HashMap; diff --git a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/JcrTestResult.java b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/JcrTestResult.java index 3f94b8bcd..e2d0607ae 100644 --- a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/JcrTestResult.java +++ b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/JcrTestResult.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jcr; import java.util.Date; diff --git a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/SlcJcrConstants.java b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/SlcJcrConstants.java index 3190c85b9..19e643067 100644 --- a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/SlcJcrConstants.java +++ b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/SlcJcrConstants.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jcr; import org.argeo.slc.SlcNames; diff --git a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/SlcJcrResultUtils.java b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/SlcJcrResultUtils.java index 0aea1fc60..c7717dbc3 100644 --- a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/SlcJcrResultUtils.java +++ b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/SlcJcrResultUtils.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jcr; import javax.jcr.Node; diff --git a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/SlcJcrUtils.java b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/SlcJcrUtils.java index 4094060bd..c91a94c1b 100644 --- a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/SlcJcrUtils.java +++ b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/SlcJcrUtils.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jcr; import java.util.Calendar; diff --git a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/execution/JcrAgent.java b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/execution/JcrAgent.java index c75863ade..7f776d1b1 100644 --- a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/execution/JcrAgent.java +++ b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/execution/JcrAgent.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jcr.execution; import java.net.InetAddress; diff --git a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/execution/JcrExecutionModulesListener.java b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/execution/JcrExecutionModulesListener.java index 022dd8721..2804b2215 100644 --- a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/execution/JcrExecutionModulesListener.java +++ b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/execution/JcrExecutionModulesListener.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jcr.execution; import java.util.Arrays; diff --git a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/execution/JcrExecutionProcess.java b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/execution/JcrExecutionProcess.java index 137d28c77..9d0045961 100644 --- a/org.argeo.slc.jcr/src/org/argeo/slc/jcr/execution/JcrExecutionProcess.java +++ b/org.argeo.slc.jcr/src/org/argeo/slc/jcr/execution/JcrExecutionProcess.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jcr.execution; import java.util.ArrayList; diff --git a/org.argeo.slc.launcher/src/org/argeo/slc/cli/SlcMain.java b/org.argeo.slc.launcher/src/org/argeo/slc/cli/SlcMain.java index a4bf3cd65..8717b5030 100644 --- a/org.argeo.slc.launcher/src/org/argeo/slc/cli/SlcMain.java +++ b/org.argeo.slc.launcher/src/org/argeo/slc/cli/SlcMain.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.cli; import java.io.File; diff --git a/org.argeo.slc.repo/ext/test/org/argeo/slc/repo/internal/AetherUtilsTest.java b/org.argeo.slc.repo/ext/test/org/argeo/slc/repo/internal/AetherUtilsTest.java index 61824e4ed..21563fe50 100644 --- a/org.argeo.slc.repo/ext/test/org/argeo/slc/repo/internal/AetherUtilsTest.java +++ b/org.argeo.slc.repo/ext/test/org/argeo/slc/repo/internal/AetherUtilsTest.java @@ -1,19 +1,4 @@ package org.argeo.slc.repo.internal; -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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. - */ import junit.framework.TestCase; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/ArtifactIndexer.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/ArtifactIndexer.java index a3c1b5d4d..037a7be67 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/ArtifactIndexer.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/ArtifactIndexer.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo; import javax.jcr.Node; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/JarFileIndexer.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/JarFileIndexer.java index 89f7120e4..95fa918b1 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/JarFileIndexer.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/JarFileIndexer.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo; import java.io.ByteArrayInputStream; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/MavenProxyService.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/MavenProxyService.java index 8df4a5383..81261fe21 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/MavenProxyService.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/MavenProxyService.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo; import org.argeo.jcr.proxy.ResourceProxy; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/NodeIndexer.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/NodeIndexer.java index 77798abd9..374ad8505 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/NodeIndexer.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/NodeIndexer.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo; import javax.jcr.Node; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/PdeSourcesIndexer.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/PdeSourcesIndexer.java index b6f87e0e2..0ce3ba920 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/PdeSourcesIndexer.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/PdeSourcesIndexer.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo; import javax.jcr.Binary; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/RepoConstants.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/RepoConstants.java index f2d26eea6..572ac9e7f 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/RepoConstants.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/RepoConstants.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo; /** SLC repository constants */ diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/RepoSync.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/RepoSync.java index d524a2cc3..2eb532e76 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/RepoSync.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/RepoSync.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo; import java.io.InputStream; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/RepoUtils.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/RepoUtils.java index d9787ef51..a6dc5d94f 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/RepoUtils.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/RepoUtils.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo; import java.io.ByteArrayOutputStream; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/core/WorkspaceIndexer.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/core/WorkspaceIndexer.java index e5622aad3..d0233c39d 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/core/WorkspaceIndexer.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/core/WorkspaceIndexer.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo.core; import java.util.List; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/AetherUtils.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/AetherUtils.java index fcc9b05b1..e9360f9f2 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/AetherUtils.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/AetherUtils.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo.maven; import java.util.regex.Pattern; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/ArtifactIdComparator.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/ArtifactIdComparator.java index 98d2d1d46..7aef78db5 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/ArtifactIdComparator.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/ArtifactIdComparator.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo.maven; import java.util.Comparator; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/ConvertPoms_01_03.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/ConvertPoms_01_03.java index f05171513..d46375e1d 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/ConvertPoms_01_03.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/ConvertPoms_01_03.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo.maven; import java.io.File; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/GenerateBinaries.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/GenerateBinaries.java index 83335e9a5..3ccc164c7 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/GenerateBinaries.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/GenerateBinaries.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo.maven; import java.util.ArrayList; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/IndexDistribution.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/IndexDistribution.java index 9f97dff50..1d013f57d 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/IndexDistribution.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/IndexDistribution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo.maven; import java.io.File; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/MavenConventionsUtils.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/MavenConventionsUtils.java index c25e3fb7f..9487e4d8d 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/MavenConventionsUtils.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/MavenConventionsUtils.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo.maven; import java.io.File; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/MavenProxyServiceImpl.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/MavenProxyServiceImpl.java index 789f4c215..9a88534a0 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/MavenProxyServiceImpl.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/MavenProxyServiceImpl.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo.maven; import java.util.ArrayList; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/Migration_01_03.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/Migration_01_03.java index 065e22ef6..a7f7d169d 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/Migration_01_03.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/Migration_01_03.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo.maven; import java.io.IOException; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ImportBundlesZip.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ImportBundlesZip.java index fbc44b3e0..0518bbf1a 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ImportBundlesZip.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ImportBundlesZip.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo.osgi; import java.io.ByteArrayInputStream; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/NormalizeGroup.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/NormalizeGroup.java index 1d2503799..7a25c4bff 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/NormalizeGroup.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/NormalizeGroup.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo.osgi; import java.util.ArrayList; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ObrWrapper.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ObrWrapper.java index d44593bc6..4ace647cb 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ObrWrapper.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ObrWrapper.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo.osgi; public class ObrWrapper { diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/OsgiProfile.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/OsgiProfile.java index 50f87be16..b15ed5d29 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/OsgiProfile.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/OsgiProfile.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.repo.osgi; import java.io.InputStream; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/AbstractExecutionModulesManager.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/AbstractExecutionModulesManager.java index 3b9da2a76..a31f18c25 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/AbstractExecutionModulesManager.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/AbstractExecutionModulesManager.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime; import java.util.Map; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultAgent.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultAgent.java index d9037fa4b..6fc255a01 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultAgent.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultAgent.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime; import java.io.UnsupportedEncodingException; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionFlow.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionFlow.java index 289f660e1..f99ce9d71 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionFlow.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionFlow.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime; import java.util.ArrayList; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionSpec.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionSpec.java index 6fc001caa..16790a4dc 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionSpec.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionSpec.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime; import java.io.Serializable; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionStack.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionStack.java index 4939e3243..af98a16be 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionStack.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionStack.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime; import java.util.HashMap; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/ExecutionThread.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/ExecutionThread.java index 8d95f495b..d940905f6 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/ExecutionThread.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/ExecutionThread.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime; import java.security.AccessControlContext; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/InstantiationManager.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/InstantiationManager.java index 0571e8307..4aea94fdf 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/InstantiationManager.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/InstantiationManager.java @@ -1,123 +1,108 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime; - -import java.util.Stack; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.slc.SlcException; -import org.argeo.slc.execution.ExecutionFlow; -import org.argeo.slc.execution.ExecutionSpecAttribute; -import org.argeo.slc.execution.RefSpecAttribute; -import org.argeo.slc.primitive.PrimitiveSpecAttribute; -import org.argeo.slc.primitive.PrimitiveUtils; - -/** Manage parameters that need to be set during the instantiation of a flow */ -public class InstantiationManager { - - private final static Log log = LogFactory - .getLog(InstantiationManager.class); - - private ThreadLocal> flowStack = new ThreadLocal>(); - - public Object createRef(String name) { - - if ((flowStack.get() == null) || flowStack.get().empty()) { - throw new SlcException("No flow is currently initializing." - + " Declare ParameterRef as inner beans or prototypes."); - } - - return getInitializingFlowParameter(name); - } - - public void flowInitializationStarted(ExecutionFlow flow, String flowName) { - // set the flow name if it is DefaultExecutionFlow - if (flow instanceof DefaultExecutionFlow) { - ((DefaultExecutionFlow) flow).setName(flowName); - } - - if (log.isTraceEnabled()) - log.trace("Start initialization of " + flow.hashCode() + " (" - + flow + " - " + flow.getClass() + ")"); - - // log.info("# flowInitializationStarted " + flowName); - // create a stack for this thread if there is none - if (flowStack.get() == null) { - flowStack.set(new Stack()); - } - flowStack.get().push(flow); - } - - public void flowInitializationFinished(ExecutionFlow flow, String flowName) { - if (log.isTraceEnabled()) - log.trace("Finish initialization of " + flow.hashCode() + " (" - + flow + " - " + flow.getClass() + ")"); - - if (flowStack.get() != null) { - ExecutionFlow registeredFlow = flowStack.get().pop(); - if (registeredFlow != null) { - if (!flow.getName().equals(registeredFlow.getName())) - throw new SlcException("Current flow is " + flow); - // log.info("# flowInitializationFinished " + flowName); - // initializingFlow.set(null); - } - } else { - // happens for flows imported as services - log.warn("flowInitializationFinished - Flow Stack is null"); - } - } - - protected ExecutionFlow findInitializingFlowWithParameter(String key) { - if ((flowStack.get() == null) || flowStack.get().empty()) - throw new SlcException("No initializing flow available."); - - // first look in the outer flow (that may override parameters) - for (int i = 0; i < flowStack.get().size(); i++) { - if (flowStack.get().elementAt(i).isSetAsParameter(key)) { - return flowStack.get().elementAt(i); - } - } - throw new SlcException("Key " + key + " is not set as parameter in " - + flowStack.get().firstElement().toString() + " (stack size=" - + flowStack.get().size() + ")"); - - } - - public Object getInitializingFlowParameter(String key) { - return findInitializingFlowWithParameter(key).getParameter(key); - } - - public Class getInitializingFlowParameterClass(String key) { - ExecutionSpecAttribute attr = findInitializingFlowWithParameter(key) - .getExecutionSpec().getAttributes().get(key); - if (attr instanceof RefSpecAttribute) - return ((RefSpecAttribute) attr).getTargetClass(); - else if (attr instanceof PrimitiveSpecAttribute) { - String type = ((PrimitiveSpecAttribute) attr).getType(); - Class clss = PrimitiveUtils.typeAsClass(type); - if (clss == null) - throw new SlcException("Cannot convert type " + type - + " to class."); - return clss; - } else - return null; - } - - public Boolean isInFlowInitialization() { - return (flowStack.get() != null) && !flowStack.get().empty(); - } -} +package org.argeo.slc.runtime; + +import java.util.Stack; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.argeo.slc.SlcException; +import org.argeo.slc.execution.ExecutionFlow; +import org.argeo.slc.execution.ExecutionSpecAttribute; +import org.argeo.slc.execution.RefSpecAttribute; +import org.argeo.slc.primitive.PrimitiveSpecAttribute; +import org.argeo.slc.primitive.PrimitiveUtils; + +/** Manage parameters that need to be set during the instantiation of a flow */ +public class InstantiationManager { + + private final static Log log = LogFactory + .getLog(InstantiationManager.class); + + private ThreadLocal> flowStack = new ThreadLocal>(); + + public Object createRef(String name) { + + if ((flowStack.get() == null) || flowStack.get().empty()) { + throw new SlcException("No flow is currently initializing." + + " Declare ParameterRef as inner beans or prototypes."); + } + + return getInitializingFlowParameter(name); + } + + public void flowInitializationStarted(ExecutionFlow flow, String flowName) { + // set the flow name if it is DefaultExecutionFlow + if (flow instanceof DefaultExecutionFlow) { + ((DefaultExecutionFlow) flow).setName(flowName); + } + + if (log.isTraceEnabled()) + log.trace("Start initialization of " + flow.hashCode() + " (" + + flow + " - " + flow.getClass() + ")"); + + // log.info("# flowInitializationStarted " + flowName); + // create a stack for this thread if there is none + if (flowStack.get() == null) { + flowStack.set(new Stack()); + } + flowStack.get().push(flow); + } + + public void flowInitializationFinished(ExecutionFlow flow, String flowName) { + if (log.isTraceEnabled()) + log.trace("Finish initialization of " + flow.hashCode() + " (" + + flow + " - " + flow.getClass() + ")"); + + if (flowStack.get() != null) { + ExecutionFlow registeredFlow = flowStack.get().pop(); + if (registeredFlow != null) { + if (!flow.getName().equals(registeredFlow.getName())) + throw new SlcException("Current flow is " + flow); + // log.info("# flowInitializationFinished " + flowName); + // initializingFlow.set(null); + } + } else { + // happens for flows imported as services + log.warn("flowInitializationFinished - Flow Stack is null"); + } + } + + protected ExecutionFlow findInitializingFlowWithParameter(String key) { + if ((flowStack.get() == null) || flowStack.get().empty()) + throw new SlcException("No initializing flow available."); + + // first look in the outer flow (that may override parameters) + for (int i = 0; i < flowStack.get().size(); i++) { + if (flowStack.get().elementAt(i).isSetAsParameter(key)) { + return flowStack.get().elementAt(i); + } + } + throw new SlcException("Key " + key + " is not set as parameter in " + + flowStack.get().firstElement().toString() + " (stack size=" + + flowStack.get().size() + ")"); + + } + + public Object getInitializingFlowParameter(String key) { + return findInitializingFlowWithParameter(key).getParameter(key); + } + + public Class getInitializingFlowParameterClass(String key) { + ExecutionSpecAttribute attr = findInitializingFlowWithParameter(key) + .getExecutionSpec().getAttributes().get(key); + if (attr instanceof RefSpecAttribute) + return ((RefSpecAttribute) attr).getTargetClass(); + else if (attr instanceof PrimitiveSpecAttribute) { + String type = ((PrimitiveSpecAttribute) attr).getType(); + Class clss = PrimitiveUtils.typeAsClass(type); + if (clss == null) + throw new SlcException("Cannot convert type " + type + + " to class."); + return clss; + } else + return null; + } + + public Boolean isInFlowInitialization() { + return (flowStack.get() != null) && !flowStack.get().empty(); + } +} diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/ProcessThread.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/ProcessThread.java index 10630687f..2c4f73c7e 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/ProcessThread.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/ProcessThread.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime; import java.security.AccessControlContext; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/ProcessThreadGroup.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/ProcessThreadGroup.java index 6c25ecfa4..79f38d77b 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/ProcessThreadGroup.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/ProcessThreadGroup.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime; import java.util.concurrent.ArrayBlockingQueue; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/CloseTestResult.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/CloseTestResult.java index 32d82556b..2bb48b8fa 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/CloseTestResult.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/CloseTestResult.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.tasks; import org.argeo.slc.test.TestResult; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/Echo.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/Echo.java index d3ac0b36e..a6e60d36b 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/Echo.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/Echo.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.tasks; import java.io.File; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/If.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/If.java index bdcfb37b9..08eb804cc 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/If.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/If.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.tasks; import org.argeo.slc.SlcException; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/JvmProcess.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/JvmProcess.java index a868a1244..c89f2b814 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/JvmProcess.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/JvmProcess.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.tasks; import java.io.File; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/SystemCall.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/SystemCall.java index c16209d9e..f5e850201 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/SystemCall.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/SystemCall.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.tasks; import java.io.File; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/SystemCallOutputListener.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/SystemCallOutputListener.java index f10e52a15..bedd15a09 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/SystemCallOutputListener.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/tasks/SystemCallOutputListener.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.tasks; public interface SystemCallOutputListener { diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/BasicTestData.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/BasicTestData.java index 4ff120aa2..ec6261d68 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/BasicTestData.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/BasicTestData.java @@ -1,40 +1,25 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.test; - -import org.argeo.slc.test.TestData; - -public class BasicTestData implements TestData { - private Object expected; - private Object reached; - - public Object getExpected() { - return expected; - } - - public void setExpected(Object expected) { - this.expected = expected; - } - - public Object getReached() { - return reached; - } - - public void setReached(Object reached) { - this.reached = reached; - } - -} +package org.argeo.slc.runtime.test; + +import org.argeo.slc.test.TestData; + +public class BasicTestData implements TestData { + private Object expected; + private Object reached; + + public Object getExpected() { + return expected; + } + + public void setExpected(Object expected) { + this.expected = expected; + } + + public Object getReached() { + return reached; + } + + public void setReached(Object reached) { + this.reached = reached; + } + +} diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/BasicTestDefinition.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/BasicTestDefinition.java index 009714125..3bc49f611 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/BasicTestDefinition.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/BasicTestDefinition.java @@ -1,60 +1,45 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.test; - -import org.argeo.slc.SlcException; -import org.argeo.slc.test.IncompatibleTestDataException; -import org.argeo.slc.test.TestData; -import org.argeo.slc.test.TestDefinition; -import org.argeo.slc.test.TestResult; -import org.argeo.slc.test.TestRun; -import org.argeo.slc.test.TestStatus; -import org.argeo.slc.test.context.ContextAware; - -/** Understands basic test data and context aware test data. */ -public class BasicTestDefinition implements TestDefinition { - - public void execute(TestRun testRun) { - if (testRun. getTestData() instanceof BasicTestData) { - BasicTestData testData = testRun.getTestData(); - TestResult result = testRun.getTestResult(); - - if (result == null) - throw new SlcException("No test result defined."); - - try { - if (testData.getExpected().equals(testData.getReached())) { - result.addResultPart(new SimpleResultPart( - TestStatus.PASSED, "Reached and expected equals")); - } else { - result.addResultPart(new SimpleResultPart( - TestStatus.FAILED, "Expected " - + testData.getExpected() + " but reached " - + testData.getReached())); - } - } catch (Exception e) { - result.addResultPart(new SimpleResultPart(TestStatus.ERROR, - "Could not compare", e)); - } - } else if (testRun. getTestData() instanceof ContextAware) { - TestData testData = testRun.getTestData(); - ContextUtils.compareReachedExpected((ContextAware) testData, - testRun.getTestResult()); - } else { - throw new IncompatibleTestDataException(testRun); - } - } -} +package org.argeo.slc.runtime.test; + +import org.argeo.slc.SlcException; +import org.argeo.slc.test.IncompatibleTestDataException; +import org.argeo.slc.test.TestData; +import org.argeo.slc.test.TestDefinition; +import org.argeo.slc.test.TestResult; +import org.argeo.slc.test.TestRun; +import org.argeo.slc.test.TestStatus; +import org.argeo.slc.test.context.ContextAware; + +/** Understands basic test data and context aware test data. */ +public class BasicTestDefinition implements TestDefinition { + + public void execute(TestRun testRun) { + if (testRun. getTestData() instanceof BasicTestData) { + BasicTestData testData = testRun.getTestData(); + TestResult result = testRun.getTestResult(); + + if (result == null) + throw new SlcException("No test result defined."); + + try { + if (testData.getExpected().equals(testData.getReached())) { + result.addResultPart(new SimpleResultPart( + TestStatus.PASSED, "Reached and expected equals")); + } else { + result.addResultPart(new SimpleResultPart( + TestStatus.FAILED, "Expected " + + testData.getExpected() + " but reached " + + testData.getReached())); + } + } catch (Exception e) { + result.addResultPart(new SimpleResultPart(TestStatus.ERROR, + "Could not compare", e)); + } + } else if (testRun. getTestData() instanceof ContextAware) { + TestData testData = testRun.getTestData(); + ContextUtils.compareReachedExpected((ContextAware) testData, + testRun.getTestResult()); + } else { + throw new IncompatibleTestDataException(testRun); + } + } +} diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/ContextUtils.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/ContextUtils.java index 663e1ed46..97d7305c1 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/ContextUtils.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/ContextUtils.java @@ -1,139 +1,124 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.test; - -import java.util.Map; -import java.util.TreeMap; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.slc.test.TestResult; -import org.argeo.slc.test.TestStatus; -import org.argeo.slc.test.context.ContextAware; -import org.argeo.slc.test.context.ParentContextAware; - -/** Utilities for comparing and synchronising contexts. */ -public class ContextUtils { - private final static Log log = LogFactory.getLog(ContextUtils.class); - - public static void compareReachedExpected(ContextAware contextAware, - TestResult testResult) { - for (String key : contextAware.getExpectedValues().keySet()) { - - // Compare expected values with reached ones - Object expectedValue = contextAware.getExpectedValues().get(key); - - if (expectedValue.toString().equals( - contextAware.getContextSkipFlag())) { - if (log.isDebugEnabled()) - log.debug("Skipped check for key '" + key + "'"); - continue; - } - - if (contextAware.getValues().containsKey(key)) { - Object reachedValue = contextAware.getValues().get(key); - - if (expectedValue.equals(contextAware.getContextAnyFlag())) { - testResult.addResultPart(new SimpleResultPart( - TestStatus.PASSED, "Expected any value for key '" - + key + "'")); - } else if (expectedValue.equals(reachedValue)) { - testResult.addResultPart(new SimpleResultPart( - TestStatus.PASSED, "Values matched for key '" + key - + "'")); - } else { - testResult.addResultPart(new SimpleResultPart( - TestStatus.FAILED, "Mismatch for key '" + key - + "': expected '" + expectedValue - + "' but reached '" + reachedValue + "'")); - } - } else { - testResult.addResultPart(new SimpleResultPart( - TestStatus.FAILED, "No value reached for key '" + key - + "'")); - } - } - } - - /** - * Makes sure that all children and sub-children of parent share the same - * maps for values and expected values. - */ - public static void synchronize(ParentContextAware parent) { - Map expectedValuesCommon = new TreeMap( - parent.getExpectedValues()); - synchronize(parent, expectedValuesCommon); - if (log.isDebugEnabled()) - log.debug("Synchronized context " + parent); - - } - - private static void synchronize(ParentContextAware parent, - Map expectedValuesCommon) { - for (ContextAware child : parent.getChildContexts()) { - // Values - putNotContained(parent.getValues(), child.getValues()); - child.setValues(parent.getValues()); - - // Expected Values - // Expected values reference is not overridden: each child has its - // own expected values map. - overrideContained(expectedValuesCommon, child.getExpectedValues()); - - // Creates a new Map in order not to disturb other context using the - // same keys - Map expectedValuesCommonChild = new TreeMap( - expectedValuesCommon); - putNotContained(expectedValuesCommonChild, - child.getExpectedValues()); - - if (child instanceof ParentContextAware) { - // Recursive sync - synchronize((ParentContextAware) child, - expectedValuesCommonChild); - } - } - - } - - /** - * Put into common map the values from child map which are not already - * defined in common map. - */ - public static void putNotContained(Map commonMap, - Map childMap) { - for (String key : childMap.keySet()) { - if (!commonMap.containsKey(key)) { - commonMap.put(key, childMap.get(key)); - } - } - } - - /** Overrides child map values with the values already set in common map */ - public static void overrideContained(Map commonMap, - Map childMap) { - for (String key : childMap.keySet()) { - if (commonMap.containsKey(key)) { - childMap.put(key, commonMap.get(key)); - } - } - } - - /** Makes sure this cannot be instantiated. */ - private ContextUtils() { - - } -} +package org.argeo.slc.runtime.test; + +import java.util.Map; +import java.util.TreeMap; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.argeo.slc.test.TestResult; +import org.argeo.slc.test.TestStatus; +import org.argeo.slc.test.context.ContextAware; +import org.argeo.slc.test.context.ParentContextAware; + +/** Utilities for comparing and synchronising contexts. */ +public class ContextUtils { + private final static Log log = LogFactory.getLog(ContextUtils.class); + + public static void compareReachedExpected(ContextAware contextAware, + TestResult testResult) { + for (String key : contextAware.getExpectedValues().keySet()) { + + // Compare expected values with reached ones + Object expectedValue = contextAware.getExpectedValues().get(key); + + if (expectedValue.toString().equals( + contextAware.getContextSkipFlag())) { + if (log.isDebugEnabled()) + log.debug("Skipped check for key '" + key + "'"); + continue; + } + + if (contextAware.getValues().containsKey(key)) { + Object reachedValue = contextAware.getValues().get(key); + + if (expectedValue.equals(contextAware.getContextAnyFlag())) { + testResult.addResultPart(new SimpleResultPart( + TestStatus.PASSED, "Expected any value for key '" + + key + "'")); + } else if (expectedValue.equals(reachedValue)) { + testResult.addResultPart(new SimpleResultPart( + TestStatus.PASSED, "Values matched for key '" + key + + "'")); + } else { + testResult.addResultPart(new SimpleResultPart( + TestStatus.FAILED, "Mismatch for key '" + key + + "': expected '" + expectedValue + + "' but reached '" + reachedValue + "'")); + } + } else { + testResult.addResultPart(new SimpleResultPart( + TestStatus.FAILED, "No value reached for key '" + key + + "'")); + } + } + } + + /** + * Makes sure that all children and sub-children of parent share the same + * maps for values and expected values. + */ + public static void synchronize(ParentContextAware parent) { + Map expectedValuesCommon = new TreeMap( + parent.getExpectedValues()); + synchronize(parent, expectedValuesCommon); + if (log.isDebugEnabled()) + log.debug("Synchronized context " + parent); + + } + + private static void synchronize(ParentContextAware parent, + Map expectedValuesCommon) { + for (ContextAware child : parent.getChildContexts()) { + // Values + putNotContained(parent.getValues(), child.getValues()); + child.setValues(parent.getValues()); + + // Expected Values + // Expected values reference is not overridden: each child has its + // own expected values map. + overrideContained(expectedValuesCommon, child.getExpectedValues()); + + // Creates a new Map in order not to disturb other context using the + // same keys + Map expectedValuesCommonChild = new TreeMap( + expectedValuesCommon); + putNotContained(expectedValuesCommonChild, + child.getExpectedValues()); + + if (child instanceof ParentContextAware) { + // Recursive sync + synchronize((ParentContextAware) child, + expectedValuesCommonChild); + } + } + + } + + /** + * Put into common map the values from child map which are not already + * defined in common map. + */ + public static void putNotContained(Map commonMap, + Map childMap) { + for (String key : childMap.keySet()) { + if (!commonMap.containsKey(key)) { + commonMap.put(key, childMap.get(key)); + } + } + } + + /** Overrides child map values with the values already set in common map */ + public static void overrideContained(Map commonMap, + Map childMap) { + for (String key : childMap.keySet()) { + if (commonMap.containsKey(key)) { + childMap.put(key, commonMap.get(key)); + } + } + } + + /** Makes sure this cannot be instantiated. */ + private ContextUtils() { + + } +} diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleResultPart.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleResultPart.java index 2c7726fcd..7ba746463 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleResultPart.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleResultPart.java @@ -1,150 +1,135 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.test; - -import java.io.Serializable; - -import org.argeo.slc.test.TestResultPart; -import org.argeo.slc.test.TestRun; -import org.argeo.slc.test.TestRunAware; -import org.argeo.slc.test.TestStatus; - -/** - *

- * Basic implementation of a result part, implementing the standard three status - * approach for test results. - *

- * - * @see TestStatus - */ -public class SimpleResultPart implements TestResultPart, TestStatus, - TestRunAware, Serializable { - private static final long serialVersionUID = 6669675957685071901L; - - private Long tid; - - private String testRunUuid; - - /** The status. Default to ERROR since it should always be explicitely set. */ - private Integer status = ERROR; - private String message; - private String exceptionMessage; - - public SimpleResultPart() { - } - - public SimpleResultPart(Integer status, String message) { - this(status, message, null); - } - - public SimpleResultPart(Integer status, String message, Exception exception) { - this.status = status; - this.message = message; - setException(exception); - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void setStatus(Integer status) { - this.status = status; - } - - public Integer getStatus() { - return status; - } - - public String getExceptionMessage() { - return exceptionMessage; - } - - public void setException(Exception exception) { - if (exception == null) - return; - - StringBuffer buf = new StringBuffer(""); - buf.append(exception.toString()); - buf.append('\n'); - for (StackTraceElement elem : exception.getStackTrace()) { - buf.append('\t').append(elem.toString()).append('\n'); - } - - if (exception.getCause() != null) - addRootCause(buf, exception.getCause()); - - this.exceptionMessage = buf.toString(); - } - - protected void addRootCause(StringBuffer buf, Throwable cause) { - if (cause == null) - return; - - buf.append("Caused by: " + cause.getMessage()); - for (StackTraceElement elem : cause.getStackTrace()) { - buf.append('\t').append(elem.toString()).append('\n'); - } - - if (cause.getCause() != null) { - addRootCause(buf, cause.getCause()); - } - } - - @Override - public String toString() { - StringBuffer buf = new StringBuffer(""); - buf.append(SlcTestUtils.statusToString(status)); - if (status == PASSED || status == FAILED) { - buf.append(' '); - } else if (status == ERROR) { - buf.append(" "); - } - buf.append(message); - return buf.toString(); - } - - /** @deprecated */ - Long getTid() { - return tid; - } - - /** @deprecated */ - void setTid(Long tid) { - this.tid = tid; - } - - public String getTestRunUuid() { - return testRunUuid; - } - - /** For ORM */ - public void setTestRunUuid(String testRunUuid) { - this.testRunUuid = testRunUuid; - } - - public void notifyTestRun(TestRun testRun) { - testRunUuid = testRun.getUuid(); - } - - public void setExceptionMessage(String exceptionMessage) { - this.exceptionMessage = exceptionMessage; - } - -} +package org.argeo.slc.runtime.test; + +import java.io.Serializable; + +import org.argeo.slc.test.TestResultPart; +import org.argeo.slc.test.TestRun; +import org.argeo.slc.test.TestRunAware; +import org.argeo.slc.test.TestStatus; + +/** + *

+ * Basic implementation of a result part, implementing the standard three status + * approach for test results. + *

+ * + * @see TestStatus + */ +public class SimpleResultPart implements TestResultPart, TestStatus, + TestRunAware, Serializable { + private static final long serialVersionUID = 6669675957685071901L; + + private Long tid; + + private String testRunUuid; + + /** The status. Default to ERROR since it should always be explicitely set. */ + private Integer status = ERROR; + private String message; + private String exceptionMessage; + + public SimpleResultPart() { + } + + public SimpleResultPart(Integer status, String message) { + this(status, message, null); + } + + public SimpleResultPart(Integer status, String message, Exception exception) { + this.status = status; + this.message = message; + setException(exception); + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getStatus() { + return status; + } + + public String getExceptionMessage() { + return exceptionMessage; + } + + public void setException(Exception exception) { + if (exception == null) + return; + + StringBuffer buf = new StringBuffer(""); + buf.append(exception.toString()); + buf.append('\n'); + for (StackTraceElement elem : exception.getStackTrace()) { + buf.append('\t').append(elem.toString()).append('\n'); + } + + if (exception.getCause() != null) + addRootCause(buf, exception.getCause()); + + this.exceptionMessage = buf.toString(); + } + + protected void addRootCause(StringBuffer buf, Throwable cause) { + if (cause == null) + return; + + buf.append("Caused by: " + cause.getMessage()); + for (StackTraceElement elem : cause.getStackTrace()) { + buf.append('\t').append(elem.toString()).append('\n'); + } + + if (cause.getCause() != null) { + addRootCause(buf, cause.getCause()); + } + } + + @Override + public String toString() { + StringBuffer buf = new StringBuffer(""); + buf.append(SlcTestUtils.statusToString(status)); + if (status == PASSED || status == FAILED) { + buf.append(' '); + } else if (status == ERROR) { + buf.append(" "); + } + buf.append(message); + return buf.toString(); + } + + /** @deprecated */ + Long getTid() { + return tid; + } + + /** @deprecated */ + void setTid(Long tid) { + this.tid = tid; + } + + public String getTestRunUuid() { + return testRunUuid; + } + + /** For ORM */ + public void setTestRunUuid(String testRunUuid) { + this.testRunUuid = testRunUuid; + } + + public void notifyTestRun(TestRun testRun) { + testRunUuid = testRun.getUuid(); + } + + public void setExceptionMessage(String exceptionMessage) { + this.exceptionMessage = exceptionMessage; + } + +} diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleTestResult.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleTestResult.java index b4437d71f..3791a7ec6 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleTestResult.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleTestResult.java @@ -1,103 +1,88 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.test; - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; -import java.util.UUID; -import java.util.Vector; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.slc.SlcException; -import org.argeo.slc.test.TestResult; -import org.argeo.slc.test.TestResultPart; -import org.argeo.slc.test.TestRun; - -/** - * Basic implementation of a test result containing only a list of result parts. - */ -public class SimpleTestResult implements TestResult { - private static Log log = LogFactory.getLog(SimpleTestResult.class); - - private String uuid; - private String currentTestRunUuid; - - private Boolean throwError = true; - - private Date closeDate; - private List parts = new Vector(); - - private Map attributes = new TreeMap(); - - public void addResultPart(TestResultPart part) { - if (throwError && part.getStatus() == ERROR) { - throw new SlcException( - "There was an error in the underlying test: " - + part.getExceptionMessage()); - } - parts.add(part); - if (log.isDebugEnabled()) - log.debug(part); - } - - public void close() { - parts.clear(); - closeDate = new Date(); - } - - public List getParts() { - return parts; - } - - public Date getCloseDate() { - return closeDate; - } - - public void setThrowError(Boolean throwError) { - this.throwError = throwError; - } - - public void notifyTestRun(TestRun testRun) { - currentTestRunUuid = testRun.getUuid(); - } - - public String getUuid() { - if (uuid == null) { - uuid = UUID.randomUUID().toString(); - } - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - public String getCurrentTestRunUuid() { - return currentTestRunUuid; - } - - public Map getAttributes() { - return attributes; - } - - public void setAttributes(Map attributes) { - this.attributes = attributes; - } - -} +package org.argeo.slc.runtime.test; + +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; +import java.util.UUID; +import java.util.Vector; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.argeo.slc.SlcException; +import org.argeo.slc.test.TestResult; +import org.argeo.slc.test.TestResultPart; +import org.argeo.slc.test.TestRun; + +/** + * Basic implementation of a test result containing only a list of result parts. + */ +public class SimpleTestResult implements TestResult { + private static Log log = LogFactory.getLog(SimpleTestResult.class); + + private String uuid; + private String currentTestRunUuid; + + private Boolean throwError = true; + + private Date closeDate; + private List parts = new Vector(); + + private Map attributes = new TreeMap(); + + public void addResultPart(TestResultPart part) { + if (throwError && part.getStatus() == ERROR) { + throw new SlcException( + "There was an error in the underlying test: " + + part.getExceptionMessage()); + } + parts.add(part); + if (log.isDebugEnabled()) + log.debug(part); + } + + public void close() { + parts.clear(); + closeDate = new Date(); + } + + public List getParts() { + return parts; + } + + public Date getCloseDate() { + return closeDate; + } + + public void setThrowError(Boolean throwError) { + this.throwError = throwError; + } + + public void notifyTestRun(TestRun testRun) { + currentTestRunUuid = testRun.getUuid(); + } + + public String getUuid() { + if (uuid == null) { + uuid = UUID.randomUUID().toString(); + } + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getCurrentTestRunUuid() { + return currentTestRunUuid; + } + + public Map getAttributes() { + return attributes; + } + + public void setAttributes(Map attributes) { + this.attributes = attributes; + } + +} diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleTestRun.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleTestRun.java index a00c48dfa..bc0145295 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleTestRun.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SimpleTestRun.java @@ -1,110 +1,95 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.test; - -import java.util.UUID; - -import org.argeo.slc.deploy.DeployedSystem; -import org.argeo.slc.test.ExecutableTestRun; -import org.argeo.slc.test.TestData; -import org.argeo.slc.test.TestDefinition; -import org.argeo.slc.test.TestResult; -import org.argeo.slc.test.WritableTestRun; - -/** - * A basic bean implementation of a WritableTestRun, holding - * references to the various parts of a test run. - */ -public class SimpleTestRun implements WritableTestRun, ExecutableTestRun { - private String uuid; - - // private String slcExecutionUuid; - // private String slcExecutionStepUuid; - - private DeployedSystem deployedSystem; - private TestData testData; - private TestDefinition testDefinition; - private TestResult testResult; - - /** Executes the underlying test definition. */ - public void run() { - uuid = UUID.randomUUID().toString(); - if (testResult != null) - testResult.notifyTestRun(this); - - testDefinition.execute(this); - } - - @SuppressWarnings("unchecked") - public T getDeployedSystem() { - return (T) deployedSystem; - } - - public void setDeployedSystem(DeployedSystem deployedSystem) { - this.deployedSystem = deployedSystem; - } - - @SuppressWarnings("unchecked") - public T getTestData() { - return (T) testData; - } - - public void setTestData(TestData testData) { - this.testData = testData; - } - - @SuppressWarnings("unchecked") - public T getTestDefinition() { - return (T) testDefinition; - } - - public void setTestDefinition(TestDefinition testDefinition) { - this.testDefinition = testDefinition; - } - - @SuppressWarnings("unchecked") - public T getTestResult() { - return (T) testResult; - } - - public void setTestResult(TestResult testResult) { - this.testResult = testResult; - } - - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - // public String getSlcExecutionUuid() { - // return slcExecutionUuid; - // } - // - // public void setSlcExecutionUuid(String slcExecutionUuid) { - // this.slcExecutionUuid = slcExecutionUuid; - // } - // - // public String getSlcExecutionStepUuid() { - // return slcExecutionStepUuid; - // } - // - // public void setSlcExecutionStepUuid(String slcExecutionStepUuid) { - // this.slcExecutionStepUuid = slcExecutionStepUuid; - // } -} +package org.argeo.slc.runtime.test; + +import java.util.UUID; + +import org.argeo.slc.deploy.DeployedSystem; +import org.argeo.slc.test.ExecutableTestRun; +import org.argeo.slc.test.TestData; +import org.argeo.slc.test.TestDefinition; +import org.argeo.slc.test.TestResult; +import org.argeo.slc.test.WritableTestRun; + +/** + * A basic bean implementation of a WritableTestRun, holding + * references to the various parts of a test run. + */ +public class SimpleTestRun implements WritableTestRun, ExecutableTestRun { + private String uuid; + + // private String slcExecutionUuid; + // private String slcExecutionStepUuid; + + private DeployedSystem deployedSystem; + private TestData testData; + private TestDefinition testDefinition; + private TestResult testResult; + + /** Executes the underlying test definition. */ + public void run() { + uuid = UUID.randomUUID().toString(); + if (testResult != null) + testResult.notifyTestRun(this); + + testDefinition.execute(this); + } + + @SuppressWarnings("unchecked") + public T getDeployedSystem() { + return (T) deployedSystem; + } + + public void setDeployedSystem(DeployedSystem deployedSystem) { + this.deployedSystem = deployedSystem; + } + + @SuppressWarnings("unchecked") + public T getTestData() { + return (T) testData; + } + + public void setTestData(TestData testData) { + this.testData = testData; + } + + @SuppressWarnings("unchecked") + public T getTestDefinition() { + return (T) testDefinition; + } + + public void setTestDefinition(TestDefinition testDefinition) { + this.testDefinition = testDefinition; + } + + @SuppressWarnings("unchecked") + public T getTestResult() { + return (T) testResult; + } + + public void setTestResult(TestResult testResult) { + this.testResult = testResult; + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + // public String getSlcExecutionUuid() { + // return slcExecutionUuid; + // } + // + // public void setSlcExecutionUuid(String slcExecutionUuid) { + // this.slcExecutionUuid = slcExecutionUuid; + // } + // + // public String getSlcExecutionStepUuid() { + // return slcExecutionStepUuid; + // } + // + // public void setSlcExecutionStepUuid(String slcExecutionStepUuid) { + // this.slcExecutionStepUuid = slcExecutionStepUuid; + // } +} diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SlcTestUtils.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SlcTestUtils.java index fe38620ad..5275d0f54 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SlcTestUtils.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/SlcTestUtils.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.test; import org.argeo.slc.SlcException; diff --git a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/TestDataUtils.java b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/TestDataUtils.java index b2d74a7c9..872f1a5ab 100644 --- a/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/TestDataUtils.java +++ b/org.argeo.slc.runtime/src/org/argeo/slc/runtime/test/TestDataUtils.java @@ -1,63 +1,48 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.runtime.test; - -import org.argeo.slc.UnsupportedException; -import org.argeo.slc.test.TestData; -import org.argeo.slc.test.TestDataProvider; - -/** Utilities for dealing with test datas. */ -public class TestDataUtils { - /** Extracts the test data from the given provider. */ - public static T getFromProvider(Object obj, - Class clss, String key) { - if (obj instanceof TestDataProvider) { - TestDataProvider testDataProvider = (TestDataProvider) obj; - return testDataProvider.getTestData(clss, key); - } else { - throw new UnsupportedException("test data provider", obj); - } - } - - /** - * Extracts the test data from the given provider using null - * as key. - */ - public static T getFromProvider(Object obj, - Class clss) { - return getFromProvider(obj, clss, null); - } - - /** - * Returns it self after making the proper checks. Used for test data being - * their own data providers. - */ - @SuppressWarnings("unchecked") - public static T getItSelf(Class clss, - TestData testDataObject) { - if (clss.isAssignableFrom(testDataObject.getClass())) { - return (T) testDataObject; - } else { - throw new UnsupportedException("test data", testDataObject); - } - - } - - /** Makes sure this is an utility class. */ - private TestDataUtils() { - - } -} +package org.argeo.slc.runtime.test; + +import org.argeo.slc.UnsupportedException; +import org.argeo.slc.test.TestData; +import org.argeo.slc.test.TestDataProvider; + +/** Utilities for dealing with test datas. */ +public class TestDataUtils { + /** Extracts the test data from the given provider. */ + public static T getFromProvider(Object obj, + Class clss, String key) { + if (obj instanceof TestDataProvider) { + TestDataProvider testDataProvider = (TestDataProvider) obj; + return testDataProvider.getTestData(clss, key); + } else { + throw new UnsupportedException("test data provider", obj); + } + } + + /** + * Extracts the test data from the given provider using null + * as key. + */ + public static T getFromProvider(Object obj, + Class clss) { + return getFromProvider(obj, clss, null); + } + + /** + * Returns it self after making the proper checks. Used for test data being + * their own data providers. + */ + @SuppressWarnings("unchecked") + public static T getItSelf(Class clss, + TestData testDataObject) { + if (clss.isAssignableFrom(testDataObject.getClass())) { + return (T) testDataObject; + } else { + throw new UnsupportedException("test data", testDataObject); + } + + } + + /** Makes sure this is an utility class. */ + private TestDataUtils() { + + } +} diff --git a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/deploy/DefaultResourceSetTest.java b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/deploy/DefaultResourceSetTest.java index 15fb42903..e433d6694 100644 --- a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/deploy/DefaultResourceSetTest.java +++ b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/deploy/DefaultResourceSetTest.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.deploy; import java.util.Map; diff --git a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/AbstractExecutionFlowTestCase.java b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/AbstractExecutionFlowTestCase.java index edb383cb5..3a5e8a75b 100644 --- a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/AbstractExecutionFlowTestCase.java +++ b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/AbstractExecutionFlowTestCase.java @@ -1,83 +1,68 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; - -import junit.framework.TestCase; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.slc.execution.ExecutionContext; -import org.argeo.slc.execution.ExecutionFlow; -import org.argeo.slc.runtime.test.SimpleTestResult; -import org.argeo.slc.test.TestResultPart; -import org.argeo.slc.test.TestStatus; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -public abstract class AbstractExecutionFlowTestCase extends TestCase { - - protected final Log log = LogFactory.getLog(getClass()); - - protected void logException(Throwable ex) { - log.info("Got Exception of class " + ex.getClass().toString() - + " with message '" + ex.getMessage() + "'."); - } - - protected void validateTestResult(SimpleTestResult testResult) { - validateTestResult(testResult, TestStatus.PASSED); - } - - protected void validateTestResult(SimpleTestResult testResult, - int expectedStatus) { - for (TestResultPart part : testResult.getParts()) { - if (part.getStatus() != expectedStatus) { - fail("Error found in TestResult: " + part.getMessage()); - } - } - } - - protected ConfigurableApplicationContext createApplicationContext( - String applicationContextSuffix) { - ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext( - inPackage(applicationContextSuffix)); - // applicationContext.start(); - return applicationContext; - } - - protected void configureAndExecuteSlcFlow(String applicationContextSuffix, - String beanName) { - ConfigurableApplicationContext applicationContext = createApplicationContext(applicationContextSuffix); - ExecutionContext executionContext = (ExecutionContext) applicationContext - .getBean("executionContext"); - ExecutionFlow executionFlow = (ExecutionFlow) applicationContext - .getBean(beanName); - if (executionFlow instanceof DefaultExecutionFlow) - ((DefaultExecutionFlow) executionFlow) - .setExecutionContext(executionContext); - try { - executionContext.beforeFlow(executionFlow); - executionFlow.run(); - } finally { - executionContext.afterFlow(executionFlow); - } - applicationContext.close(); - } - - protected String inPackage(String suffix) { - String prefix = getClass().getPackage().getName().replace('.', '/'); - return prefix + '/' + suffix; - } -} +package org.argeo.slc.core.execution; + +import junit.framework.TestCase; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.argeo.slc.execution.ExecutionContext; +import org.argeo.slc.execution.ExecutionFlow; +import org.argeo.slc.runtime.test.SimpleTestResult; +import org.argeo.slc.test.TestResultPart; +import org.argeo.slc.test.TestStatus; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +public abstract class AbstractExecutionFlowTestCase extends TestCase { + + protected final Log log = LogFactory.getLog(getClass()); + + protected void logException(Throwable ex) { + log.info("Got Exception of class " + ex.getClass().toString() + + " with message '" + ex.getMessage() + "'."); + } + + protected void validateTestResult(SimpleTestResult testResult) { + validateTestResult(testResult, TestStatus.PASSED); + } + + protected void validateTestResult(SimpleTestResult testResult, + int expectedStatus) { + for (TestResultPart part : testResult.getParts()) { + if (part.getStatus() != expectedStatus) { + fail("Error found in TestResult: " + part.getMessage()); + } + } + } + + protected ConfigurableApplicationContext createApplicationContext( + String applicationContextSuffix) { + ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext( + inPackage(applicationContextSuffix)); + // applicationContext.start(); + return applicationContext; + } + + protected void configureAndExecuteSlcFlow(String applicationContextSuffix, + String beanName) { + ConfigurableApplicationContext applicationContext = createApplicationContext(applicationContextSuffix); + ExecutionContext executionContext = (ExecutionContext) applicationContext + .getBean("executionContext"); + ExecutionFlow executionFlow = (ExecutionFlow) applicationContext + .getBean(beanName); + if (executionFlow instanceof DefaultExecutionFlow) + ((DefaultExecutionFlow) executionFlow) + .setExecutionContext(executionContext); + try { + executionContext.beforeFlow(executionFlow); + executionFlow.run(); + } finally { + executionContext.afterFlow(executionFlow); + } + applicationContext.close(); + } + + protected String inPackage(String suffix) { + String prefix = getClass().getPackage().getName().replace('.', '/'); + return prefix + '/' + suffix; + } +} diff --git a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/BasicExecutionFlowTest.java b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/BasicExecutionFlowTest.java index c2ecd09dc..b79fe44c5 100644 --- a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/BasicExecutionFlowTest.java +++ b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/BasicExecutionFlowTest.java @@ -1,185 +1,170 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; - -import java.util.HashMap; -import java.util.Map; - -import org.argeo.slc.execution.ExecutionContext; -import org.argeo.slc.execution.ExecutionFlow; -import org.argeo.slc.runtime.test.SimpleTestResult; -import org.argeo.slc.test.TestStatus; -import org.springframework.beans.factory.BeanCreationException; -import org.springframework.context.ConfigurableApplicationContext; - -public class BasicExecutionFlowTest extends AbstractExecutionFlowTestCase { - // TO TEST - // - post-processing for @{} replacement in beans with complex properties - // - bean of scope other than execution are not resolved at execution - - // public void testMyTest() throws Exception { - // ConfigurableApplicationContext applicationContext = - // createApplicationContext("test.xml"); - // log.info("Start Execution"); - // ((ExecutionFlow) applicationContext.getBean("flow1")).execute(); - // applicationContext.close(); - // } - - public void XXXtestSpecOverriding() throws Exception { - ConfigurableApplicationContext applicationContext = createApplicationContext("specOverriding.xml"); - ((ExecutionFlow) applicationContext.getBean("flow2")).run(); - SimpleTestResult res = (SimpleTestResult) applicationContext - .getBean("myTestResult"); - validateTestResult(res); - } - - public void testMultipleFlows() throws Exception { - ConfigurableApplicationContext applicationContext = createApplicationContext("multipleFlow.xml"); - ((ExecutionFlow) applicationContext.getBean("flow1")).run(); - SimpleTestResult res = (SimpleTestResult) applicationContext - .getBean("myTestResult"); - validateTestResult(res); - res.getParts().clear(); - ((ExecutionFlow) applicationContext.getBean("flow2")).run(); - validateTestResult(res, TestStatus.FAILED); - applicationContext.close(); - } - - /** - * Test placeholder resolution in a context without scope execution or proxy - * and with cascading flows (the flow A contains the flow B) - * - * @throws Exception - */ - public void testPlaceHolders() throws Exception { - ConfigurableApplicationContext applicationContext = createApplicationContext("placeHolders.cascading.xml"); - ((ExecutionFlow) applicationContext.getBean("flowA")).run(); - validateTestResult((SimpleTestResult) applicationContext - .getBean("myTestResult")); - applicationContext.close(); - } - - /** - * Test placeholder resolution in a context without scope execution or proxy - * and with cascading flows (the flow A contains the flow B) setting - * execution values (should have no effect) - * - * @throws Exception - */ - public void testPlaceHoldersWithExecutionValues() throws Exception { - ConfigurableApplicationContext applicationContext = createApplicationContext("placeHolders.cascading.xml"); - - ExecutionContext executionContext = (ExecutionContext) applicationContext - .getBean("executionContext"); - Map executionParameters = new HashMap(); - executionParameters.put("p1", "e1"); - executionParameters.put("p2", "e2"); - executionParameters.put("p3", "e3"); - executionParameters.put("p4", "e4"); - executionParameters.put("p5", "e5"); - executionParameters.put("p6", "e6"); - executionParameters.put("p7", "e7"); - executionParameters.put("p8", "e8"); - addVariables(executionContext, executionParameters); - - ((ExecutionFlow) applicationContext.getBean("flowA")).run(); - validateTestResult((SimpleTestResult) applicationContext - .getBean("myTestResult")); - applicationContext.close(); - } - - public void XXXtestPlaceHoldersExec() throws Exception { - ConfigurableApplicationContext applicationContext = createApplicationContext("placeHolders.cascading.exec.xml"); - - ExecutionContext executionContext = (ExecutionContext) applicationContext - .getBean("executionContext"); - Map executionParameters = new HashMap(); - executionParameters.put("p1", "e1"); - executionParameters.put("p2", "e2"); - executionParameters.put("p3", "e3"); - executionParameters.put("p4", "e4"); - executionParameters.put("p5", "e5"); - executionParameters.put("p6", "e6"); - addVariables(executionContext, executionParameters); - - ((ExecutionFlow) applicationContext.getBean("flowA")).run(); - validateTestResult((SimpleTestResult) applicationContext - .getBean("myTestResult")); - applicationContext.close(); - } - - public void testCanonicFlowParameters() throws Exception { - configureAndExecuteSlcFlow("canonic-001.xml", "canonic.001"); - } - - public void testCanonicDefaultValues() throws Exception { - configureAndExecuteSlcFlow("canonic-002.xml", "canonic.002"); - } - - public void testCanonicMissingValues() throws Exception { - try { - configureAndExecuteSlcFlow("canonic-003.error.xml", "canonic.003"); - fail("Parameter not set - should be rejected."); - } catch (BeanCreationException e) { - // exception expected - logException(e); - } - } - - public void testCanonicUnknownParameter() throws Exception { - try { - configureAndExecuteSlcFlow("canonic-004.error.xml", "canonic.004"); - fail("Unknown parameter set - should be rejected."); - } catch (BeanCreationException e) { - // exception expected - logException(e); - } - } - - public void testListSetMap() throws Exception { - ConfigurableApplicationContext applicationContext = createApplicationContext("listSetMap.xml"); - ExecutionFlow executionFlow = (ExecutionFlow) applicationContext - .getBean("myFlow"); - executionFlow.run(); - - validateTestResult((SimpleTestResult) applicationContext - .getBean("myTestResult")); - - // BasicTestData res = (BasicTestData) - // applicationContext.getBean("cascadingComplex.testData"); - // log.info("res=" + res.getReached().toString()); - - applicationContext.close(); - } - - public void testListSetMapMultipleFlows() throws Exception { - ConfigurableApplicationContext applicationContext = createApplicationContext("listSetMapMultipleFlow.xml"); - ((ExecutionFlow) applicationContext.getBean("flow1")).run(); - SimpleTestResult res = (SimpleTestResult) applicationContext - .getBean("myTestResult"); - validateTestResult(res); - res.getParts().clear(); - ((ExecutionFlow) applicationContext.getBean("flow2")).run(); - validateTestResult(res, TestStatus.FAILED); - applicationContext.close(); - } - - protected void addVariables(ExecutionContext executionContext, - Map vars) { - for (String key : vars.keySet()) - executionContext.setVariable(key, vars.get(key)); - } -} +package org.argeo.slc.core.execution; + +import java.util.HashMap; +import java.util.Map; + +import org.argeo.slc.execution.ExecutionContext; +import org.argeo.slc.execution.ExecutionFlow; +import org.argeo.slc.runtime.test.SimpleTestResult; +import org.argeo.slc.test.TestStatus; +import org.springframework.beans.factory.BeanCreationException; +import org.springframework.context.ConfigurableApplicationContext; + +public class BasicExecutionFlowTest extends AbstractExecutionFlowTestCase { + // TO TEST + // - post-processing for @{} replacement in beans with complex properties + // - bean of scope other than execution are not resolved at execution + + // public void testMyTest() throws Exception { + // ConfigurableApplicationContext applicationContext = + // createApplicationContext("test.xml"); + // log.info("Start Execution"); + // ((ExecutionFlow) applicationContext.getBean("flow1")).execute(); + // applicationContext.close(); + // } + + public void XXXtestSpecOverriding() throws Exception { + ConfigurableApplicationContext applicationContext = createApplicationContext("specOverriding.xml"); + ((ExecutionFlow) applicationContext.getBean("flow2")).run(); + SimpleTestResult res = (SimpleTestResult) applicationContext + .getBean("myTestResult"); + validateTestResult(res); + } + + public void testMultipleFlows() throws Exception { + ConfigurableApplicationContext applicationContext = createApplicationContext("multipleFlow.xml"); + ((ExecutionFlow) applicationContext.getBean("flow1")).run(); + SimpleTestResult res = (SimpleTestResult) applicationContext + .getBean("myTestResult"); + validateTestResult(res); + res.getParts().clear(); + ((ExecutionFlow) applicationContext.getBean("flow2")).run(); + validateTestResult(res, TestStatus.FAILED); + applicationContext.close(); + } + + /** + * Test placeholder resolution in a context without scope execution or proxy + * and with cascading flows (the flow A contains the flow B) + * + * @throws Exception + */ + public void testPlaceHolders() throws Exception { + ConfigurableApplicationContext applicationContext = createApplicationContext("placeHolders.cascading.xml"); + ((ExecutionFlow) applicationContext.getBean("flowA")).run(); + validateTestResult((SimpleTestResult) applicationContext + .getBean("myTestResult")); + applicationContext.close(); + } + + /** + * Test placeholder resolution in a context without scope execution or proxy + * and with cascading flows (the flow A contains the flow B) setting + * execution values (should have no effect) + * + * @throws Exception + */ + public void testPlaceHoldersWithExecutionValues() throws Exception { + ConfigurableApplicationContext applicationContext = createApplicationContext("placeHolders.cascading.xml"); + + ExecutionContext executionContext = (ExecutionContext) applicationContext + .getBean("executionContext"); + Map executionParameters = new HashMap(); + executionParameters.put("p1", "e1"); + executionParameters.put("p2", "e2"); + executionParameters.put("p3", "e3"); + executionParameters.put("p4", "e4"); + executionParameters.put("p5", "e5"); + executionParameters.put("p6", "e6"); + executionParameters.put("p7", "e7"); + executionParameters.put("p8", "e8"); + addVariables(executionContext, executionParameters); + + ((ExecutionFlow) applicationContext.getBean("flowA")).run(); + validateTestResult((SimpleTestResult) applicationContext + .getBean("myTestResult")); + applicationContext.close(); + } + + public void XXXtestPlaceHoldersExec() throws Exception { + ConfigurableApplicationContext applicationContext = createApplicationContext("placeHolders.cascading.exec.xml"); + + ExecutionContext executionContext = (ExecutionContext) applicationContext + .getBean("executionContext"); + Map executionParameters = new HashMap(); + executionParameters.put("p1", "e1"); + executionParameters.put("p2", "e2"); + executionParameters.put("p3", "e3"); + executionParameters.put("p4", "e4"); + executionParameters.put("p5", "e5"); + executionParameters.put("p6", "e6"); + addVariables(executionContext, executionParameters); + + ((ExecutionFlow) applicationContext.getBean("flowA")).run(); + validateTestResult((SimpleTestResult) applicationContext + .getBean("myTestResult")); + applicationContext.close(); + } + + public void testCanonicFlowParameters() throws Exception { + configureAndExecuteSlcFlow("canonic-001.xml", "canonic.001"); + } + + public void testCanonicDefaultValues() throws Exception { + configureAndExecuteSlcFlow("canonic-002.xml", "canonic.002"); + } + + public void testCanonicMissingValues() throws Exception { + try { + configureAndExecuteSlcFlow("canonic-003.error.xml", "canonic.003"); + fail("Parameter not set - should be rejected."); + } catch (BeanCreationException e) { + // exception expected + logException(e); + } + } + + public void testCanonicUnknownParameter() throws Exception { + try { + configureAndExecuteSlcFlow("canonic-004.error.xml", "canonic.004"); + fail("Unknown parameter set - should be rejected."); + } catch (BeanCreationException e) { + // exception expected + logException(e); + } + } + + public void testListSetMap() throws Exception { + ConfigurableApplicationContext applicationContext = createApplicationContext("listSetMap.xml"); + ExecutionFlow executionFlow = (ExecutionFlow) applicationContext + .getBean("myFlow"); + executionFlow.run(); + + validateTestResult((SimpleTestResult) applicationContext + .getBean("myTestResult")); + + // BasicTestData res = (BasicTestData) + // applicationContext.getBean("cascadingComplex.testData"); + // log.info("res=" + res.getReached().toString()); + + applicationContext.close(); + } + + public void testListSetMapMultipleFlows() throws Exception { + ConfigurableApplicationContext applicationContext = createApplicationContext("listSetMapMultipleFlow.xml"); + ((ExecutionFlow) applicationContext.getBean("flow1")).run(); + SimpleTestResult res = (SimpleTestResult) applicationContext + .getBean("myTestResult"); + validateTestResult(res); + res.getParts().clear(); + ((ExecutionFlow) applicationContext.getBean("flow2")).run(); + validateTestResult(res, TestStatus.FAILED); + applicationContext.close(); + } + + protected void addVariables(ExecutionContext executionContext, + Map vars) { + for (String key : vars.keySet()) + executionContext.setVariable(key, vars.get(key)); + } +} diff --git a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/ExceptionIfInitCalledTwice.java b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/ExceptionIfInitCalledTwice.java index 55afdc0c8..7ba7c826a 100644 --- a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/ExceptionIfInitCalledTwice.java +++ b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/ExceptionIfInitCalledTwice.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import org.apache.commons.logging.Log; diff --git a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/FileExecutionResourcesSpringTest.java b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/FileExecutionResourcesSpringTest.java index 8b3d2ec25..0d1223a49 100644 --- a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/FileExecutionResourcesSpringTest.java +++ b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/FileExecutionResourcesSpringTest.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import java.io.File; diff --git a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/FileExecutionResourcesTest.java b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/FileExecutionResourcesTest.java index e2dae6564..63bd58c3c 100644 --- a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/FileExecutionResourcesTest.java +++ b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/FileExecutionResourcesTest.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import java.io.File; diff --git a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/ParameterRefTest.java b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/ParameterRefTest.java index af7769078..6b954b9f5 100644 --- a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/ParameterRefTest.java +++ b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/ParameterRefTest.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import org.argeo.slc.execution.ExecutionFlow; diff --git a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/tasks/SystemCallTest.java b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/tasks/SystemCallTest.java index 8301b8517..b007b9a54 100644 --- a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/tasks/SystemCallTest.java +++ b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/tasks/SystemCallTest.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.tasks; import org.apache.commons.logging.Log; diff --git a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/xml/FlowNamespaceTest.java b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/xml/FlowNamespaceTest.java index e72800124..4ebb6678d 100644 --- a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/xml/FlowNamespaceTest.java +++ b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/execution/xml/FlowNamespaceTest.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.xml; import org.argeo.slc.core.execution.AbstractExecutionFlowTestCase; diff --git a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/test/context/AbstractInternalSpringTestCase.java b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/test/context/AbstractInternalSpringTestCase.java index 61eb3b2b3..507bb41bf 100644 --- a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/test/context/AbstractInternalSpringTestCase.java +++ b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/test/context/AbstractInternalSpringTestCase.java @@ -1,101 +1,86 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.test.context; - -import java.util.Map; - -import junit.framework.TestCase; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.slc.SlcException; -import org.springframework.beans.factory.BeanFactoryUtils; -import org.springframework.beans.factory.ListableBeanFactory; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -/** Helper for tests using a Spring application context. */ -public abstract class AbstractInternalSpringTestCase extends TestCase { - protected final Log log = LogFactory.getLog(getClass()); - private ConfigurableApplicationContext context; - - /** - * Gets (and create if necessary) the application context to use. Default - * implementation uses a class path xml application context and calls - * {@link #getApplicationContextLocation()}. - */ - protected ConfigurableApplicationContext getContext() { - if (context == null) { - context = new ClassPathXmlApplicationContext( - getApplicationContextLocation()); - } - return context; - } - - /** Returns a bean from the underlying context */ - @SuppressWarnings(value = { "unchecked" }) - protected T getBean(String beanId) { - return (T) getContext().getBean(beanId); - } - - protected T getBean(Class clss) { - T bean = loadSingleFromContext(getContext(), clss); - if (bean == null) { - throw new SlcException("Cannot retrieve a unique bean of type " - + clss); - } else { - return bean; - } - } - - /** - * Th location of the application to load. The default implementation - * returns applicationContext.xml found in the same package as the - * test. - */ - protected String getApplicationContextLocation() { - return inPackage("applicationContext.xml"); - } - - /** - * Prefixes the package of the class after converting the '.' to '/' in - * order to have a resource path. - */ - protected String inPackage(String suffix) { - String prefix = getClass().getPackage().getName().replace('.', '/'); - return prefix + '/' + suffix; - } - - @SuppressWarnings(value = { "unchecked" }) - protected T loadSingleFromContext(ListableBeanFactory context, - Class clss) { - Map beans = BeanFactoryUtils.beansOfTypeIncludingAncestors( - context, clss, false, false); - if (beans.size() == 1) { - return beans.values().iterator().next(); - } else if (beans.size() > 1) { - if (log.isDebugEnabled()) { - log - .debug(("Found more that on bean for type " + clss - + ": " + beans.keySet())); - } - return null; - } else { - return null; - } - } - -} +package org.argeo.slc.core.test.context; + +import java.util.Map; + +import junit.framework.TestCase; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.argeo.slc.SlcException; +import org.springframework.beans.factory.BeanFactoryUtils; +import org.springframework.beans.factory.ListableBeanFactory; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +/** Helper for tests using a Spring application context. */ +public abstract class AbstractInternalSpringTestCase extends TestCase { + protected final Log log = LogFactory.getLog(getClass()); + private ConfigurableApplicationContext context; + + /** + * Gets (and create if necessary) the application context to use. Default + * implementation uses a class path xml application context and calls + * {@link #getApplicationContextLocation()}. + */ + protected ConfigurableApplicationContext getContext() { + if (context == null) { + context = new ClassPathXmlApplicationContext( + getApplicationContextLocation()); + } + return context; + } + + /** Returns a bean from the underlying context */ + @SuppressWarnings(value = { "unchecked" }) + protected T getBean(String beanId) { + return (T) getContext().getBean(beanId); + } + + protected T getBean(Class clss) { + T bean = loadSingleFromContext(getContext(), clss); + if (bean == null) { + throw new SlcException("Cannot retrieve a unique bean of type " + + clss); + } else { + return bean; + } + } + + /** + * Th location of the application to load. The default implementation + * returns applicationContext.xml found in the same package as the + * test. + */ + protected String getApplicationContextLocation() { + return inPackage("applicationContext.xml"); + } + + /** + * Prefixes the package of the class after converting the '.' to '/' in + * order to have a resource path. + */ + protected String inPackage(String suffix) { + String prefix = getClass().getPackage().getName().replace('.', '/'); + return prefix + '/' + suffix; + } + + @SuppressWarnings(value = { "unchecked" }) + protected T loadSingleFromContext(ListableBeanFactory context, + Class clss) { + Map beans = BeanFactoryUtils.beansOfTypeIncludingAncestors( + context, clss, false, false); + if (beans.size() == 1) { + return beans.values().iterator().next(); + } else if (beans.size() > 1) { + if (log.isDebugEnabled()) { + log + .debug(("Found more that on bean for type " + clss + + ": " + beans.keySet())); + } + return null; + } else { + return null; + } + } + +} diff --git a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/test/context/ContextTest.java b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/test/context/ContextTest.java index 75d4b9349..64a4369ed 100644 --- a/org.argeo.slc.spring/ext/test/org/argeo/slc/core/test/context/ContextTest.java +++ b/org.argeo.slc.spring/ext/test/org/argeo/slc/core/test/context/ContextTest.java @@ -1,46 +1,31 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.test.context; - -import java.util.List; - -import org.argeo.slc.runtime.test.ContextUtils; -import org.argeo.slc.runtime.test.SimpleTestResult; -import org.argeo.slc.test.TestResultPart; -import org.argeo.slc.test.TestStatus; -import org.argeo.slc.test.context.ContextAware; - -public class ContextTest extends AbstractInternalSpringTestCase { - - public void testComplexContext() { - SimpleTestResult testResult = new SimpleTestResult(); - ContextUtils.compareReachedExpected( - (ContextAware) getBean("context.c1"), testResult); - ContextUtils.compareReachedExpected( - (ContextAware) getBean("context.c2"), testResult); - ContextUtils.compareReachedExpected( - (ContextAware) getBean("context.c3"), testResult); - - List parts = testResult.getParts(); - assertEquals(6, parts.size()); - assertEquals(TestStatus.PASSED, parts.get(0).getStatus()); - assertEquals(TestStatus.PASSED, parts.get(1).getStatus()); - assertEquals(TestStatus.PASSED, parts.get(2).getStatus()); - assertEquals(TestStatus.FAILED, parts.get(3).getStatus()); - assertEquals(TestStatus.PASSED, parts.get(4).getStatus()); - assertEquals(TestStatus.PASSED, parts.get(5).getStatus()); - } -} +package org.argeo.slc.core.test.context; + +import java.util.List; + +import org.argeo.slc.runtime.test.ContextUtils; +import org.argeo.slc.runtime.test.SimpleTestResult; +import org.argeo.slc.test.TestResultPart; +import org.argeo.slc.test.TestStatus; +import org.argeo.slc.test.context.ContextAware; + +public class ContextTest extends AbstractInternalSpringTestCase { + + public void testComplexContext() { + SimpleTestResult testResult = new SimpleTestResult(); + ContextUtils.compareReachedExpected( + (ContextAware) getBean("context.c1"), testResult); + ContextUtils.compareReachedExpected( + (ContextAware) getBean("context.c2"), testResult); + ContextUtils.compareReachedExpected( + (ContextAware) getBean("context.c3"), testResult); + + List parts = testResult.getParts(); + assertEquals(6, parts.size()); + assertEquals(TestStatus.PASSED, parts.get(0).getStatus()); + assertEquals(TestStatus.PASSED, parts.get(1).getStatus()); + assertEquals(TestStatus.PASSED, parts.get(2).getStatus()); + assertEquals(TestStatus.FAILED, parts.get(3).getStatus()); + assertEquals(TestStatus.PASSED, parts.get(4).getStatus()); + assertEquals(TestStatus.PASSED, parts.get(5).getStatus()); + } +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/ant/AntFlowGenerator.java b/org.argeo.slc.spring/src/org/argeo/slc/ant/AntFlowGenerator.java index 9dea43e49..1a6f69219 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/ant/AntFlowGenerator.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/ant/AntFlowGenerator.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.ant; import java.util.ArrayList; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/ant/AntRun.java b/org.argeo.slc.spring/src/org/argeo/slc/ant/AntRun.java index 1e2dcb940..238e2255c 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/ant/AntRun.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/ant/AntRun.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.ant; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/attachment/AttachmentUploader.java b/org.argeo.slc.spring/src/org/argeo/slc/core/attachment/AttachmentUploader.java index 9b91207b3..fcd265752 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/attachment/AttachmentUploader.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/attachment/AttachmentUploader.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.attachment; import org.argeo.slc.attachment.Attachment; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/attachment/FileAttachmentsStorage.java b/org.argeo.slc.spring/src/org/argeo/slc/core/attachment/FileAttachmentsStorage.java index e6bd8e776..b5c9e3cd4 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/attachment/FileAttachmentsStorage.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/attachment/FileAttachmentsStorage.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.attachment; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/attachment/SimpleAttachment.java b/org.argeo.slc.spring/src/org/argeo/slc/core/attachment/SimpleAttachment.java index e9a44c959..5319d5915 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/attachment/SimpleAttachment.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/attachment/SimpleAttachment.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.attachment; import java.io.Serializable; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/build/ResourceDistribution.java b/org.argeo.slc.spring/src/org/argeo/slc/core/build/ResourceDistribution.java index 4ebbe92a4..e44933179 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/build/ResourceDistribution.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/build/ResourceDistribution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.build; import java.io.IOException; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/build/VersionDistributionId.java b/org.argeo.slc.spring/src/org/argeo/slc/core/build/VersionDistributionId.java index c11dc00ea..932ecc7d1 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/build/VersionDistributionId.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/build/VersionDistributionId.java @@ -1,97 +1,82 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.build; - -import java.util.StringTokenizer; - -/** - *

- * An implementation of the distribution id using the standard - * Major.Minor.Release notation. And additional arbitrary string can also be - * added. - *

- * - *

- * Examples:
- * 0.2.6
- * 2.4.12.RC1 - *

- */ -public class VersionDistributionId { - - private Integer major; - private Integer minor; - private Integer release; - private String additional; - - /** Parse the provided string in order to set the various components. */ - public void setVersionString(String str) { - StringTokenizer st = new StringTokenizer(str, "."); - if (st.hasMoreTokens()) - major = Integer.parseInt(st.nextToken()); - if (st.hasMoreTokens()) - minor = Integer.parseInt(st.nextToken()); - if (st.hasMoreTokens()) - release = Integer.parseInt(st.nextToken()); - if (st.hasMoreTokens()) - additional = st.nextToken(); - } - - public Integer getMajor() { - return major; - } - - public void setMajor(Integer major) { - this.major = major; - } - - public Integer getMinor() { - return minor; - } - - public void setMinor(Integer minor) { - this.minor = minor; - } - - public Integer getRelease() { - return release; - } - - public void setRelease(Integer release) { - this.release = release; - } - - public String getAdditional() { - return additional; - } - - public void setAdditional(String additional) { - this.additional = additional; - } - - @Override - public boolean equals(Object obj) { - // TODO Auto-generated method stub - return super.equals(obj); - } - - @Override - public String toString() { - return major + "." + minor + "." + release - + (additional != null ? "." + additional : ""); - } - -} +package org.argeo.slc.core.build; + +import java.util.StringTokenizer; + +/** + *

+ * An implementation of the distribution id using the standard + * Major.Minor.Release notation. And additional arbitrary string can also be + * added. + *

+ * + *

+ * Examples:
+ * 0.2.6
+ * 2.4.12.RC1 + *

+ */ +public class VersionDistributionId { + + private Integer major; + private Integer minor; + private Integer release; + private String additional; + + /** Parse the provided string in order to set the various components. */ + public void setVersionString(String str) { + StringTokenizer st = new StringTokenizer(str, "."); + if (st.hasMoreTokens()) + major = Integer.parseInt(st.nextToken()); + if (st.hasMoreTokens()) + minor = Integer.parseInt(st.nextToken()); + if (st.hasMoreTokens()) + release = Integer.parseInt(st.nextToken()); + if (st.hasMoreTokens()) + additional = st.nextToken(); + } + + public Integer getMajor() { + return major; + } + + public void setMajor(Integer major) { + this.major = major; + } + + public Integer getMinor() { + return minor; + } + + public void setMinor(Integer minor) { + this.minor = minor; + } + + public Integer getRelease() { + return release; + } + + public void setRelease(Integer release) { + this.release = release; + } + + public String getAdditional() { + return additional; + } + + public void setAdditional(String additional) { + this.additional = additional; + } + + @Override + public boolean equals(Object obj) { + // TODO Auto-generated method stub + return super.equals(obj); + } + + @Override + public String toString() { + return major + "." + minor + "." + release + + (additional != null ? "." + additional : ""); + } + +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/build/VersionedResourceDistribution.java b/org.argeo.slc.spring/src/org/argeo/slc/core/build/VersionedResourceDistribution.java index 52307ec67..414a12b29 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/build/VersionedResourceDistribution.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/build/VersionedResourceDistribution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.build; import org.argeo.slc.NameVersion; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/DefaultResourceSet.java b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/DefaultResourceSet.java index abdcfeec3..a5b8536df 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/DefaultResourceSet.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/DefaultResourceSet.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.deploy; import java.io.IOException; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/DigestCheck.java b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/DigestCheck.java index be8355fe3..e7908eb7f 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/DigestCheck.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/DigestCheck.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.deploy; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/LocalFilesDeployment.java b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/LocalFilesDeployment.java index 79ad83597..d339b9402 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/LocalFilesDeployment.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/LocalFilesDeployment.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.deploy; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/MultiResourceSet.java b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/MultiResourceSet.java index 8da17ba42..20867128e 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/MultiResourceSet.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/MultiResourceSet.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.deploy; import java.util.ArrayList; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/ResourceSet.java b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/ResourceSet.java index 01c01abae..6d670e033 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/ResourceSet.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/ResourceSet.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.deploy; import java.util.Map; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/SimpleExecutables.java b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/SimpleExecutables.java index 5a5b8259f..6c9336854 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/SimpleExecutables.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/SimpleExecutables.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.deploy; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/VersionedDirSync.java b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/VersionedDirSync.java index 13d254366..40f6735e0 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/VersionedDirSync.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/deploy/VersionedDirSync.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.deploy; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/AbstractExecutionFlowGenerator.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/AbstractExecutionFlowGenerator.java index dc55b40f9..19861151a 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/AbstractExecutionFlowGenerator.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/AbstractExecutionFlowGenerator.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import java.util.List; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/AbstractSpringExecutionModule.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/AbstractSpringExecutionModule.java index b2252f6a2..366b8d489 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/AbstractSpringExecutionModule.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/AbstractSpringExecutionModule.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import org.argeo.slc.execution.ExecutionModule; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultAgent.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultAgent.java index d07643414..c878e24f0 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultAgent.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultAgent.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; /** Implements the base methods of an SLC agent. */ diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultExecutionFlow.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultExecutionFlow.java index a555906cd..f3b4eb1d5 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultExecutionFlow.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultExecutionFlow.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import java.util.Map; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java index 9fe48f71c..0bdeb53bb 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import java.util.Comparator; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultExecutionSpec.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultExecutionSpec.java index fbd031bae..e603f71a7 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultExecutionSpec.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/DefaultExecutionSpec.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import java.util.ArrayList; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionAspect.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionAspect.java index b50b78f51..2fb23488c 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionAspect.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionAspect.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import org.apache.commons.logging.Log; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionParameterPostProcessor.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionParameterPostProcessor.java index dab4cfb3f..75105045e 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionParameterPostProcessor.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionParameterPostProcessor.java @@ -1,308 +1,293 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; - -import java.beans.PropertyDescriptor; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.slc.SlcException; -import org.argeo.slc.execution.ExecutionContext; -import org.argeo.slc.execution.ExecutionFlow; -import org.argeo.slc.runtime.InstantiationManager; -import org.springframework.beans.BeansException; -import org.springframework.beans.MutablePropertyValues; -import org.springframework.beans.PropertyValue; -import org.springframework.beans.PropertyValues; -import org.springframework.beans.factory.BeanDefinitionStoreException; -import org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter; -import org.springframework.beans.factory.config.TypedStringValue; -import org.springframework.beans.factory.support.ManagedList; -import org.springframework.beans.factory.support.ManagedMap; -import org.springframework.beans.factory.support.ManagedSet; -import org.springframework.util.ObjectUtils; -import org.springframework.util.StringUtils; - -/** - * Spring post processor which ensures that execution parameters are properly - * set. It is used at two levels: first during instantiation for instantiation - * parameters which allow to implement templates, then at runtime in order to - * interpret @{} placeholders when object of scope execution are instantiated. - */ -public class ExecutionParameterPostProcessor extends - InstantiationAwareBeanPostProcessorAdapter { - - private final static Log log = LogFactory - .getLog(ExecutionParameterPostProcessor.class); - - private ExecutionContext executionContext; - private InstantiationManager instantiationManager; - - private String placeholderPrefix = "@{"; - private String placeholderSuffix = "}"; - private String nullValue; - - @Override - public PropertyValues postProcessPropertyValues(PropertyValues pvs, - PropertyDescriptor[] pds, Object bean, String beanName) - throws BeansException { - - // TODO: resolve at execution only if scope is execution - // TODO: deal with placeholders in RuntimeBeanReference and - // RuntimeBeanNameReference - - MutablePropertyValues newPvs = new MutablePropertyValues(); - - boolean changesOccured = false; - - for (PropertyValue pv : pvs.getPropertyValues()) { - Object convertedValue = resolveValue(beanName, bean, pv.getValue()); - newPvs.addPropertyValue(new PropertyValue(pv, convertedValue)); - if (convertedValue != pv.getValue()) { - changesOccured = true; - } - } - - return changesOccured ? newPvs : pvs; - } - - @Override - public boolean postProcessAfterInstantiation(Object bean, String beanName) - throws BeansException { - if (bean instanceof ExecutionFlow) - instantiationManager.flowInitializationStarted( - (ExecutionFlow) bean, beanName); - return true; - } - - @Override - public Object postProcessAfterInitialization(Object bean, String beanName) - throws BeansException { - if (bean instanceof ExecutionFlow) - instantiationManager.flowInitializationFinished( - (ExecutionFlow) bean, beanName); - return bean; - } - - protected String resolvePlaceholder(Object bean, String placeholder) { - if (instantiationManager.isInFlowInitialization()) - return instantiationManager.getInitializingFlowParameter( - placeholder).toString(); - - else {// execution - // next call fail if no execution context available - Object obj = executionContext.getVariable(placeholder); - if (obj != null) { - return obj.toString(); - } - } - - return null; - } - - public Object resolveValue(String beanName, Object bean, Object value) { - if (value instanceof TypedStringValue) { - TypedStringValue tsv = (TypedStringValue) value; - String originalValue = tsv.getValue(); - - String convertedValue = resolveString(beanName, bean, originalValue); - if (convertedValue == null) - return null; - return convertedValue.equals(originalValue) ? value - : new TypedStringValue(convertedValue); - } else if (value instanceof String) { - String originalValue = value.toString(); - String convertedValue = resolveString(beanName, bean, originalValue); - if (convertedValue == null) - return null; - return convertedValue.equals(originalValue) ? value - : convertedValue; - } else if (value instanceof ManagedMap) { - Map mapVal = (Map) value; - - Map newContent = new ManagedMap(); - boolean entriesModified = false; - for (Iterator it = mapVal.entrySet().iterator(); it.hasNext();) { - Map.Entry entry = (Map.Entry) it.next(); - Object key = entry.getKey(); - int keyHash = (key != null ? key.hashCode() : 0); - Object newKey = resolveValue(beanName, bean, key); - int newKeyHash = (newKey != null ? newKey.hashCode() : 0); - Object val = entry.getValue(); - Object newVal = resolveValue(beanName, bean, val); - newContent.put(newKey, newVal); - entriesModified = entriesModified - || (newVal != val || newKey != key || newKeyHash != keyHash); - } - - return entriesModified ? newContent : value; - } else if (value instanceof ManagedList) { - List listVal = (List) value; - List newContent = new ManagedList(); - boolean valueModified = false; - - for (int i = 0; i < listVal.size(); i++) { - Object elem = listVal.get(i); - Object newVal = resolveValue(beanName, bean, elem); - newContent.add(newVal); - if (!ObjectUtils.nullSafeEquals(newVal, elem)) { - valueModified = true; - } - } - return valueModified ? newContent : value; - } else if (value instanceof ManagedSet) { - Set setVal = (Set) value; - Set newContent = new ManagedSet(); - boolean entriesModified = false; - for (Iterator it = setVal.iterator(); it.hasNext();) { - Object elem = it.next(); - int elemHash = (elem != null ? elem.hashCode() : 0); - Object newVal = resolveValue(beanName, bean, elem); - int newValHash = (newVal != null ? newVal.hashCode() : 0); - newContent.add(newVal); - entriesModified = entriesModified - || (newVal != elem || newValHash != elemHash); - } - return entriesModified ? newContent : value; - } else { - // log.debug(beanName + ": " + value.getClass() + " : " + value); - return value; - } - - } - - private String resolveString(String beanName, Object bean, String strVal) { - // in case is passed - if (strVal == null) - return null; - - String value = parseStringValue(bean, strVal, new HashSet()); - - if (value == null) - throw new SlcException("Could not resolve placeholder '" + strVal - + "' in bean '" + beanName + "'"); - - return (value.equals(nullValue) ? null : value); - } - - public void setPlaceholderPrefix(String placeholderPrefix) { - this.placeholderPrefix = placeholderPrefix; - } - - public void setPlaceholderSuffix(String placeholderSuffix) { - this.placeholderSuffix = placeholderSuffix; - } - - public void setNullValue(String nullValue) { - this.nullValue = nullValue; - } - - public void setInstantiationManager( - InstantiationManager instantiationManager) { - this.instantiationManager = instantiationManager; - } - - public void setExecutionContext(ExecutionContext executionContext) { - this.executionContext = executionContext; - } - - // - // Following methods hacked from the internals of - // PropertyPlaceholderConfigurer - // - - protected String parseStringValue(Object bean, String strVal, - Set visitedPlaceholders) - throws BeanDefinitionStoreException { - - // in case is passed - if (strVal == null) - return null; - - StringBuffer buf = new StringBuffer(strVal); - - int startIndex = strVal.indexOf(placeholderPrefix); - while (startIndex != -1) { - int endIndex = findPlaceholderEndIndex(buf, startIndex); - if (endIndex != -1) { - String placeholder = buf.substring(startIndex - + placeholderPrefix.length(), endIndex); - if (!visitedPlaceholders.add(placeholder)) { - throw new BeanDefinitionStoreException( - "Circular placeholder reference '" + placeholder - + "' in property definitions"); - } - // Recursive invocation, parsing placeholders contained in - // the placeholder key. - placeholder = parseStringValue(bean, placeholder, - visitedPlaceholders); - // Now obtain the value for the fully resolved key... - String propVal = resolvePlaceholder(bean, placeholder); - if (propVal != null) { - // Recursive invocation, parsing placeholders contained - // in the - // previously resolved placeholder value. - propVal = parseStringValue(bean, propVal, - visitedPlaceholders); - buf.replace(startIndex, - endIndex + placeholderSuffix.length(), propVal); - if (log.isTraceEnabled()) { - log.trace("Resolved placeholder '" + placeholder + "'"); - } - startIndex = buf.indexOf(placeholderPrefix, startIndex - + propVal.length()); - } else { - throw new BeanDefinitionStoreException( - "Could not resolve placeholder '" + placeholder - + "'"); - } - visitedPlaceholders.remove(placeholder); - } else { - startIndex = -1; - } - } - - return buf.toString(); - } - - private int findPlaceholderEndIndex(CharSequence buf, int startIndex) { - int index = startIndex + placeholderPrefix.length(); - int withinNestedPlaceholder = 0; - while (index < buf.length()) { - if (StringUtils.substringMatch(buf, index, placeholderSuffix)) { - if (withinNestedPlaceholder > 0) { - withinNestedPlaceholder--; - index = index + placeholderSuffix.length(); - } else { - return index; - } - } else if (StringUtils - .substringMatch(buf, index, placeholderPrefix)) { - withinNestedPlaceholder++; - index = index + placeholderPrefix.length(); - } else { - index++; - } - } - return -1; - } - -} +package org.argeo.slc.core.execution; + +import java.beans.PropertyDescriptor; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.argeo.slc.SlcException; +import org.argeo.slc.execution.ExecutionContext; +import org.argeo.slc.execution.ExecutionFlow; +import org.argeo.slc.runtime.InstantiationManager; +import org.springframework.beans.BeansException; +import org.springframework.beans.MutablePropertyValues; +import org.springframework.beans.PropertyValue; +import org.springframework.beans.PropertyValues; +import org.springframework.beans.factory.BeanDefinitionStoreException; +import org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter; +import org.springframework.beans.factory.config.TypedStringValue; +import org.springframework.beans.factory.support.ManagedList; +import org.springframework.beans.factory.support.ManagedMap; +import org.springframework.beans.factory.support.ManagedSet; +import org.springframework.util.ObjectUtils; +import org.springframework.util.StringUtils; + +/** + * Spring post processor which ensures that execution parameters are properly + * set. It is used at two levels: first during instantiation for instantiation + * parameters which allow to implement templates, then at runtime in order to + * interpret @{} placeholders when object of scope execution are instantiated. + */ +public class ExecutionParameterPostProcessor extends + InstantiationAwareBeanPostProcessorAdapter { + + private final static Log log = LogFactory + .getLog(ExecutionParameterPostProcessor.class); + + private ExecutionContext executionContext; + private InstantiationManager instantiationManager; + + private String placeholderPrefix = "@{"; + private String placeholderSuffix = "}"; + private String nullValue; + + @Override + public PropertyValues postProcessPropertyValues(PropertyValues pvs, + PropertyDescriptor[] pds, Object bean, String beanName) + throws BeansException { + + // TODO: resolve at execution only if scope is execution + // TODO: deal with placeholders in RuntimeBeanReference and + // RuntimeBeanNameReference + + MutablePropertyValues newPvs = new MutablePropertyValues(); + + boolean changesOccured = false; + + for (PropertyValue pv : pvs.getPropertyValues()) { + Object convertedValue = resolveValue(beanName, bean, pv.getValue()); + newPvs.addPropertyValue(new PropertyValue(pv, convertedValue)); + if (convertedValue != pv.getValue()) { + changesOccured = true; + } + } + + return changesOccured ? newPvs : pvs; + } + + @Override + public boolean postProcessAfterInstantiation(Object bean, String beanName) + throws BeansException { + if (bean instanceof ExecutionFlow) + instantiationManager.flowInitializationStarted( + (ExecutionFlow) bean, beanName); + return true; + } + + @Override + public Object postProcessAfterInitialization(Object bean, String beanName) + throws BeansException { + if (bean instanceof ExecutionFlow) + instantiationManager.flowInitializationFinished( + (ExecutionFlow) bean, beanName); + return bean; + } + + protected String resolvePlaceholder(Object bean, String placeholder) { + if (instantiationManager.isInFlowInitialization()) + return instantiationManager.getInitializingFlowParameter( + placeholder).toString(); + + else {// execution + // next call fail if no execution context available + Object obj = executionContext.getVariable(placeholder); + if (obj != null) { + return obj.toString(); + } + } + + return null; + } + + public Object resolveValue(String beanName, Object bean, Object value) { + if (value instanceof TypedStringValue) { + TypedStringValue tsv = (TypedStringValue) value; + String originalValue = tsv.getValue(); + + String convertedValue = resolveString(beanName, bean, originalValue); + if (convertedValue == null) + return null; + return convertedValue.equals(originalValue) ? value + : new TypedStringValue(convertedValue); + } else if (value instanceof String) { + String originalValue = value.toString(); + String convertedValue = resolveString(beanName, bean, originalValue); + if (convertedValue == null) + return null; + return convertedValue.equals(originalValue) ? value + : convertedValue; + } else if (value instanceof ManagedMap) { + Map mapVal = (Map) value; + + Map newContent = new ManagedMap(); + boolean entriesModified = false; + for (Iterator it = mapVal.entrySet().iterator(); it.hasNext();) { + Map.Entry entry = (Map.Entry) it.next(); + Object key = entry.getKey(); + int keyHash = (key != null ? key.hashCode() : 0); + Object newKey = resolveValue(beanName, bean, key); + int newKeyHash = (newKey != null ? newKey.hashCode() : 0); + Object val = entry.getValue(); + Object newVal = resolveValue(beanName, bean, val); + newContent.put(newKey, newVal); + entriesModified = entriesModified + || (newVal != val || newKey != key || newKeyHash != keyHash); + } + + return entriesModified ? newContent : value; + } else if (value instanceof ManagedList) { + List listVal = (List) value; + List newContent = new ManagedList(); + boolean valueModified = false; + + for (int i = 0; i < listVal.size(); i++) { + Object elem = listVal.get(i); + Object newVal = resolveValue(beanName, bean, elem); + newContent.add(newVal); + if (!ObjectUtils.nullSafeEquals(newVal, elem)) { + valueModified = true; + } + } + return valueModified ? newContent : value; + } else if (value instanceof ManagedSet) { + Set setVal = (Set) value; + Set newContent = new ManagedSet(); + boolean entriesModified = false; + for (Iterator it = setVal.iterator(); it.hasNext();) { + Object elem = it.next(); + int elemHash = (elem != null ? elem.hashCode() : 0); + Object newVal = resolveValue(beanName, bean, elem); + int newValHash = (newVal != null ? newVal.hashCode() : 0); + newContent.add(newVal); + entriesModified = entriesModified + || (newVal != elem || newValHash != elemHash); + } + return entriesModified ? newContent : value; + } else { + // log.debug(beanName + ": " + value.getClass() + " : " + value); + return value; + } + + } + + private String resolveString(String beanName, Object bean, String strVal) { + // in case is passed + if (strVal == null) + return null; + + String value = parseStringValue(bean, strVal, new HashSet()); + + if (value == null) + throw new SlcException("Could not resolve placeholder '" + strVal + + "' in bean '" + beanName + "'"); + + return (value.equals(nullValue) ? null : value); + } + + public void setPlaceholderPrefix(String placeholderPrefix) { + this.placeholderPrefix = placeholderPrefix; + } + + public void setPlaceholderSuffix(String placeholderSuffix) { + this.placeholderSuffix = placeholderSuffix; + } + + public void setNullValue(String nullValue) { + this.nullValue = nullValue; + } + + public void setInstantiationManager( + InstantiationManager instantiationManager) { + this.instantiationManager = instantiationManager; + } + + public void setExecutionContext(ExecutionContext executionContext) { + this.executionContext = executionContext; + } + + // + // Following methods hacked from the internals of + // PropertyPlaceholderConfigurer + // + + protected String parseStringValue(Object bean, String strVal, + Set visitedPlaceholders) + throws BeanDefinitionStoreException { + + // in case is passed + if (strVal == null) + return null; + + StringBuffer buf = new StringBuffer(strVal); + + int startIndex = strVal.indexOf(placeholderPrefix); + while (startIndex != -1) { + int endIndex = findPlaceholderEndIndex(buf, startIndex); + if (endIndex != -1) { + String placeholder = buf.substring(startIndex + + placeholderPrefix.length(), endIndex); + if (!visitedPlaceholders.add(placeholder)) { + throw new BeanDefinitionStoreException( + "Circular placeholder reference '" + placeholder + + "' in property definitions"); + } + // Recursive invocation, parsing placeholders contained in + // the placeholder key. + placeholder = parseStringValue(bean, placeholder, + visitedPlaceholders); + // Now obtain the value for the fully resolved key... + String propVal = resolvePlaceholder(bean, placeholder); + if (propVal != null) { + // Recursive invocation, parsing placeholders contained + // in the + // previously resolved placeholder value. + propVal = parseStringValue(bean, propVal, + visitedPlaceholders); + buf.replace(startIndex, + endIndex + placeholderSuffix.length(), propVal); + if (log.isTraceEnabled()) { + log.trace("Resolved placeholder '" + placeholder + "'"); + } + startIndex = buf.indexOf(placeholderPrefix, startIndex + + propVal.length()); + } else { + throw new BeanDefinitionStoreException( + "Could not resolve placeholder '" + placeholder + + "'"); + } + visitedPlaceholders.remove(placeholder); + } else { + startIndex = -1; + } + } + + return buf.toString(); + } + + private int findPlaceholderEndIndex(CharSequence buf, int startIndex) { + int index = startIndex + placeholderPrefix.length(); + int withinNestedPlaceholder = 0; + while (index < buf.length()) { + if (StringUtils.substringMatch(buf, index, placeholderSuffix)) { + if (withinNestedPlaceholder > 0) { + withinNestedPlaceholder--; + index = index + placeholderSuffix.length(); + } else { + return index; + } + } else if (StringUtils + .substringMatch(buf, index, placeholderPrefix)) { + withinNestedPlaceholder++; + index = index + placeholderPrefix.length(); + } else { + index++; + } + } + return -1; + } + +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionResources.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionResources.java index 759a12542..772330a78 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionResources.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionResources.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionResourcesFactoryBean.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionResourcesFactoryBean.java index 0b887da5a..b217c3bfa 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionResourcesFactoryBean.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionResourcesFactoryBean.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import org.springframework.beans.factory.FactoryBean; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionScope.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionScope.java index a931329b6..19296ab08 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionScope.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionScope.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import org.apache.commons.logging.Log; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/FileExecutionResources.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/FileExecutionResources.java index d225cd193..41fb6941a 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/FileExecutionResources.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/FileExecutionResources.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/MapExecutionContext.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/MapExecutionContext.java index 324f97305..5a96405cc 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/MapExecutionContext.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/MapExecutionContext.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import java.util.Collections; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/OsFileFactoryBean.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/OsFileFactoryBean.java index e524970cf..7cd6e20a7 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/OsFileFactoryBean.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/OsFileFactoryBean.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ParameterRef.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ParameterRef.java index b4eafac41..093f78184 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ParameterRef.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ParameterRef.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import org.apache.commons.logging.Log; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/SedFilteredResource.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/SedFilteredResource.java index c793f4963..728f95c5b 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/SedFilteredResource.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/SedFilteredResource.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/doc/ConsoleContextDescriber.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/doc/ConsoleContextDescriber.java index 6504a3de3..1e8f8f9a2 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/doc/ConsoleContextDescriber.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/doc/ConsoleContextDescriber.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.doc; import org.springframework.beans.MutablePropertyValues; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/doc/ContextDescriber.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/doc/ContextDescriber.java index 713019b37..7dd9afea7 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/doc/ContextDescriber.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/doc/ContextDescriber.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.doc; import org.springframework.beans.factory.config.BeanDefinition; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/CompositeRunnableFactory.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/CompositeRunnableFactory.java index f1e80d390..4fc5dc01d 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/CompositeRunnableFactory.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/CompositeRunnableFactory.java @@ -1,77 +1,62 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.generator; - -import java.util.Map; - -import org.argeo.slc.SlcException; -import org.springframework.beans.factory.support.BeanDefinitionRegistry; - -/** - * Composite RunnableFactory, redirecting the Runnable - * creation to on of the configured RunnableFactory depending - * on an entry of the data of the RunnableDataNode. - */ -public class CompositeRunnableFactory implements RunnableFactory { - - /** - * Key used to access factory ID in the data of the RunnableDataNode - */ - private String factoryKey; - - /** - * Maps a factory ID to an ExecutionFlowFactory - */ - private Map factories; - - public void createAndRegisterRunnable(RunnableDataNode node, - BeanDefinitionRegistry beanDefinitionRegistry) { - findFactory(node).createAndRegisterRunnable(node, beanDefinitionRegistry); - } - - /** - * Finds the RunnableFactory to use for a RunnableDataNode - * @param node - * @return the RunnableFactory to use for the RunnableDataNode - */ - private RunnableFactory findFactory(RunnableDataNode node) { - // get the factory ID from the data of the RunnableDescriptor - Map data = node.getData(); - if (!data.containsKey(factoryKey)) { - throw new SlcException("No data value for key '" + factoryKey + "'"); - } - String factoryId = data.get(factoryKey).toString(); - - // see if we have a factory for the factory ID - if ((factories != null) && factories.containsKey(factoryId)) { - return factories.get(factoryId); - } - // if not, look for a bean of name equals to the factory ID - else { - throw new SlcException("Not implemented"); - } - } - - public void setFactoryKey(String factoryKey) { - this.factoryKey = factoryKey; - } - - public void setFactories(Map factories) { - this.factories = factories; - } - - -} +package org.argeo.slc.core.execution.generator; + +import java.util.Map; + +import org.argeo.slc.SlcException; +import org.springframework.beans.factory.support.BeanDefinitionRegistry; + +/** + * Composite RunnableFactory, redirecting the Runnable + * creation to on of the configured RunnableFactory depending + * on an entry of the data of the RunnableDataNode. + */ +public class CompositeRunnableFactory implements RunnableFactory { + + /** + * Key used to access factory ID in the data of the RunnableDataNode + */ + private String factoryKey; + + /** + * Maps a factory ID to an ExecutionFlowFactory + */ + private Map factories; + + public void createAndRegisterRunnable(RunnableDataNode node, + BeanDefinitionRegistry beanDefinitionRegistry) { + findFactory(node).createAndRegisterRunnable(node, beanDefinitionRegistry); + } + + /** + * Finds the RunnableFactory to use for a RunnableDataNode + * @param node + * @return the RunnableFactory to use for the RunnableDataNode + */ + private RunnableFactory findFactory(RunnableDataNode node) { + // get the factory ID from the data of the RunnableDescriptor + Map data = node.getData(); + if (!data.containsKey(factoryKey)) { + throw new SlcException("No data value for key '" + factoryKey + "'"); + } + String factoryId = data.get(factoryKey).toString(); + + // see if we have a factory for the factory ID + if ((factories != null) && factories.containsKey(factoryId)) { + return factories.get(factoryId); + } + // if not, look for a bean of name equals to the factory ID + else { + throw new SlcException("Not implemented"); + } + } + + public void setFactoryKey(String factoryKey) { + this.factoryKey = factoryKey; + } + + public void setFactories(Map factories) { + this.factories = factories; + } + + +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/DefaultRunnableDataNode.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/DefaultRunnableDataNode.java index daed350b2..cd0eaefe6 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/DefaultRunnableDataNode.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/DefaultRunnableDataNode.java @@ -1,104 +1,89 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.generator; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Default implementation of RunnableDataNode - * - */ -public class DefaultRunnableDataNode implements RunnableDataNode { - - private List children = new ArrayList(); - - private RunnableDataNode parent; - - /** - * Data of the RunnableDataNode. Does not contain - * parent data. - */ - private Map properData = new HashMap(); - - private String path; - - private String beanName; - - public boolean isLeaf() { - return children.size() == 0; - } - - public List getChildren() { - return children; - } - - public void addChild(RunnableDataNode child) { - child.setParent(this); - children.add(child); - } - - public Map getData() { - Map data = new HashMap(); - if(parent != null) { - Map parentData = parent.getData(); - if(parentData != null) { - data.putAll(parentData); - } - } - // entries defined in parentData can be overridden - // in properData - if(properData != null) { - data.putAll(properData); - } - return data; - } - - public Map getProperData() { - return properData; - } - - public void setProperData(Map properData) { - this.properData = properData; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getBeanName() { - return beanName; - } - - public void setBeanName(String beanName) { - this.beanName = beanName; - } - - public void setParent(RunnableDataNode parent) { - this.parent = parent; - } - - public RunnableDataNode getParent() { - return parent; - } - -} +package org.argeo.slc.core.execution.generator; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Default implementation of RunnableDataNode + * + */ +public class DefaultRunnableDataNode implements RunnableDataNode { + + private List children = new ArrayList(); + + private RunnableDataNode parent; + + /** + * Data of the RunnableDataNode. Does not contain + * parent data. + */ + private Map properData = new HashMap(); + + private String path; + + private String beanName; + + public boolean isLeaf() { + return children.size() == 0; + } + + public List getChildren() { + return children; + } + + public void addChild(RunnableDataNode child) { + child.setParent(this); + children.add(child); + } + + public Map getData() { + Map data = new HashMap(); + if(parent != null) { + Map parentData = parent.getData(); + if(parentData != null) { + data.putAll(parentData); + } + } + // entries defined in parentData can be overridden + // in properData + if(properData != null) { + data.putAll(properData); + } + return data; + } + + public Map getProperData() { + return properData; + } + + public void setProperData(Map properData) { + this.properData = properData; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public String getBeanName() { + return beanName; + } + + public void setBeanName(String beanName) { + this.beanName = beanName; + } + + public void setParent(RunnableDataNode parent) { + this.parent = parent; + } + + public RunnableDataNode getParent() { + return parent; + } + +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/ExecutionFlowGenerator.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/ExecutionFlowGenerator.java index d9400e42e..0e06f4e17 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/ExecutionFlowGenerator.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/ExecutionFlowGenerator.java @@ -1,181 +1,166 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.generator; - -import java.util.HashMap; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.slc.SlcException; -import org.springframework.aop.scope.ScopedProxyUtils; -import org.springframework.beans.BeansException; -import org.springframework.beans.MutablePropertyValues; -import org.springframework.beans.factory.config.BeanDefinitionHolder; -import org.springframework.beans.factory.config.BeanFactoryPostProcessor; -import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; -import org.springframework.beans.factory.config.RuntimeBeanReference; -import org.springframework.beans.factory.support.BeanDefinitionRegistry; -import org.springframework.beans.factory.support.GenericBeanDefinition; -import org.springframework.core.Ordered; - -/** - * Generates ExecutionFlows and Runnables as - * beans in the Spring Application Context. - * Called by the Application Context as a BeanFactoryPostProcessor. - * Two kinds of beans are generated: - * RunnableCallFlow, calling a list of Runnables from the - * Application Context after configuring the ExecutionContext, - * and outputs of a RunnableFactory. - */ -public class ExecutionFlowGenerator implements BeanFactoryPostProcessor, - Ordered { - - private final Log log = LogFactory.getLog(getClass()); - - /** - * Source providing a list of RunnableCallFlowDescriptor - * used to create RunnableCallFlow and a list of - * RunnableDataNode used to create any kind of flow via a factory - */ - protected ExecutionFlowGeneratorSource source; - - /** - * Factory used to create Runnables in the Application context from - * the RunnableDataNode provided from the source. - */ - protected RunnableFactory runnableFactory; - - /** - * Bean name of the ExecutionContext. - * Used to provide the created RunnableCallFlow beans - * with a RuntimeBeanReference to - * the ExecutionContext - */ - private String executionContextBeanName = "executionContext"; - - /** - * Bean name of the context values Map. - * A bean of class HashMap is created with this name, and a - * RuntimeBeanReference is provided to the created - * RunnableCallFlow beans. - */ - private String contextValuesBeanName = "executionFlowGenerator.contextValues"; - - /** - * Prefix added to the bean names defined in each - * RunnableCallFlowDescriptor - */ - private String flowBeanNamesPrefix = ""; - - private int order = Ordered.HIGHEST_PRECEDENCE; - - public void postProcessBeanFactory( - ConfigurableListableBeanFactory beanFactory) throws BeansException { - - // assert that the beanFactory is a BeanDefinitionRegistry - if (!(beanFactory instanceof BeanDefinitionRegistry)) { - throw new SlcException("Can only work on " - + BeanDefinitionRegistry.class); - } - - // add bean for the Context Values Map - createAndRegisterContextValuesBean((BeanDefinitionRegistry) beanFactory); - - // add beans for each RunnableDataNode - for(RunnableDataNode node : source.getRunnableDataNodes()) { - runnableFactory.createAndRegisterRunnable(node, (BeanDefinitionRegistry) beanFactory); - } - - // add beans for each RunnableCallFlowDescriptor of the source to the application context - for (RunnableCallFlowDescriptor descriptor : source - .getRunnableCallFlowDescriptors()) { - createAndRegisterFlowFor(descriptor, (BeanDefinitionRegistry) beanFactory); - } - } - - /** - * Creates a RunnableCallFlow bean - * for a RunnableCallFlowDescriptor and registers - * it in the BeanDefinitionRegistry - * @param flowDescriptor - * @param registry - */ - private void createAndRegisterFlowFor(RunnableCallFlowDescriptor flowDescriptor, BeanDefinitionRegistry registry) { - // create the flow bean - GenericBeanDefinition flowBean = new GenericBeanDefinition(); - flowBean.setBeanClass(RunnableCallFlow.class); - - String beanName = flowBeanNamesPrefix + flowDescriptor.getBeanName(); - - MutablePropertyValues mpv = new MutablePropertyValues(); - mpv.addPropertyValue("runnableCalls", flowDescriptor.getRunnableCalls()); - mpv.addPropertyValue("sharedContextValuesMap", new RuntimeBeanReference(contextValuesBeanName)); - - mpv.addPropertyValue("name", beanName); - mpv.addPropertyValue("path", flowDescriptor.getPath()); - - mpv.addPropertyValue("executionContext", new RuntimeBeanReference(executionContextBeanName)); - - flowBean.setPropertyValues(mpv); - - // register it - if(log.isDebugEnabled()) { - log.debug("Registering bean definition for RunnableCallFlow " + beanName); - } - registry.registerBeanDefinition(beanName, flowBean); - } - - /** - * Creates the Context Values bean and register it in the - * BeanDefinitionRegistry - * @param registry - */ - private void createAndRegisterContextValuesBean(BeanDefinitionRegistry registry) { - GenericBeanDefinition contextValuesBean = new GenericBeanDefinition(); - contextValuesBean.setBeanClass(HashMap.class); - - BeanDefinitionHolder bdh = ScopedProxyUtils.createScopedProxy(new BeanDefinitionHolder(contextValuesBean, contextValuesBeanName), registry, true); - registry.registerBeanDefinition(contextValuesBeanName, bdh.getBeanDefinition()); - } - - public int getOrder() { - return order; - } - - public void setOrder(int order) { - this.order = order; - } - - public void setSource(ExecutionFlowGeneratorSource source) { - this.source = source; - } - - public void setRunnableFactory(RunnableFactory runnableFactory) { - this.runnableFactory = runnableFactory; - } - - public void setExecutionContextBeanName(String executionContextBeanName) { - this.executionContextBeanName = executionContextBeanName; - } - - public void setContextValuesBeanName(String contextValuesBeanName) { - this.contextValuesBeanName = contextValuesBeanName; - } - - public void setFlowBeanNamesPrefix(String flowBeanNamesPrefix) { - this.flowBeanNamesPrefix = flowBeanNamesPrefix; - } -} +package org.argeo.slc.core.execution.generator; + +import java.util.HashMap; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.argeo.slc.SlcException; +import org.springframework.aop.scope.ScopedProxyUtils; +import org.springframework.beans.BeansException; +import org.springframework.beans.MutablePropertyValues; +import org.springframework.beans.factory.config.BeanDefinitionHolder; +import org.springframework.beans.factory.config.BeanFactoryPostProcessor; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; +import org.springframework.beans.factory.config.RuntimeBeanReference; +import org.springframework.beans.factory.support.BeanDefinitionRegistry; +import org.springframework.beans.factory.support.GenericBeanDefinition; +import org.springframework.core.Ordered; + +/** + * Generates ExecutionFlows and Runnables as + * beans in the Spring Application Context. + * Called by the Application Context as a BeanFactoryPostProcessor. + * Two kinds of beans are generated: + * RunnableCallFlow, calling a list of Runnables from the + * Application Context after configuring the ExecutionContext, + * and outputs of a RunnableFactory. + */ +public class ExecutionFlowGenerator implements BeanFactoryPostProcessor, + Ordered { + + private final Log log = LogFactory.getLog(getClass()); + + /** + * Source providing a list of RunnableCallFlowDescriptor + * used to create RunnableCallFlow and a list of + * RunnableDataNode used to create any kind of flow via a factory + */ + protected ExecutionFlowGeneratorSource source; + + /** + * Factory used to create Runnables in the Application context from + * the RunnableDataNode provided from the source. + */ + protected RunnableFactory runnableFactory; + + /** + * Bean name of the ExecutionContext. + * Used to provide the created RunnableCallFlow beans + * with a RuntimeBeanReference to + * the ExecutionContext + */ + private String executionContextBeanName = "executionContext"; + + /** + * Bean name of the context values Map. + * A bean of class HashMap is created with this name, and a + * RuntimeBeanReference is provided to the created + * RunnableCallFlow beans. + */ + private String contextValuesBeanName = "executionFlowGenerator.contextValues"; + + /** + * Prefix added to the bean names defined in each + * RunnableCallFlowDescriptor + */ + private String flowBeanNamesPrefix = ""; + + private int order = Ordered.HIGHEST_PRECEDENCE; + + public void postProcessBeanFactory( + ConfigurableListableBeanFactory beanFactory) throws BeansException { + + // assert that the beanFactory is a BeanDefinitionRegistry + if (!(beanFactory instanceof BeanDefinitionRegistry)) { + throw new SlcException("Can only work on " + + BeanDefinitionRegistry.class); + } + + // add bean for the Context Values Map + createAndRegisterContextValuesBean((BeanDefinitionRegistry) beanFactory); + + // add beans for each RunnableDataNode + for(RunnableDataNode node : source.getRunnableDataNodes()) { + runnableFactory.createAndRegisterRunnable(node, (BeanDefinitionRegistry) beanFactory); + } + + // add beans for each RunnableCallFlowDescriptor of the source to the application context + for (RunnableCallFlowDescriptor descriptor : source + .getRunnableCallFlowDescriptors()) { + createAndRegisterFlowFor(descriptor, (BeanDefinitionRegistry) beanFactory); + } + } + + /** + * Creates a RunnableCallFlow bean + * for a RunnableCallFlowDescriptor and registers + * it in the BeanDefinitionRegistry + * @param flowDescriptor + * @param registry + */ + private void createAndRegisterFlowFor(RunnableCallFlowDescriptor flowDescriptor, BeanDefinitionRegistry registry) { + // create the flow bean + GenericBeanDefinition flowBean = new GenericBeanDefinition(); + flowBean.setBeanClass(RunnableCallFlow.class); + + String beanName = flowBeanNamesPrefix + flowDescriptor.getBeanName(); + + MutablePropertyValues mpv = new MutablePropertyValues(); + mpv.addPropertyValue("runnableCalls", flowDescriptor.getRunnableCalls()); + mpv.addPropertyValue("sharedContextValuesMap", new RuntimeBeanReference(contextValuesBeanName)); + + mpv.addPropertyValue("name", beanName); + mpv.addPropertyValue("path", flowDescriptor.getPath()); + + mpv.addPropertyValue("executionContext", new RuntimeBeanReference(executionContextBeanName)); + + flowBean.setPropertyValues(mpv); + + // register it + if(log.isDebugEnabled()) { + log.debug("Registering bean definition for RunnableCallFlow " + beanName); + } + registry.registerBeanDefinition(beanName, flowBean); + } + + /** + * Creates the Context Values bean and register it in the + * BeanDefinitionRegistry + * @param registry + */ + private void createAndRegisterContextValuesBean(BeanDefinitionRegistry registry) { + GenericBeanDefinition contextValuesBean = new GenericBeanDefinition(); + contextValuesBean.setBeanClass(HashMap.class); + + BeanDefinitionHolder bdh = ScopedProxyUtils.createScopedProxy(new BeanDefinitionHolder(contextValuesBean, contextValuesBeanName), registry, true); + registry.registerBeanDefinition(contextValuesBeanName, bdh.getBeanDefinition()); + } + + public int getOrder() { + return order; + } + + public void setOrder(int order) { + this.order = order; + } + + public void setSource(ExecutionFlowGeneratorSource source) { + this.source = source; + } + + public void setRunnableFactory(RunnableFactory runnableFactory) { + this.runnableFactory = runnableFactory; + } + + public void setExecutionContextBeanName(String executionContextBeanName) { + this.executionContextBeanName = executionContextBeanName; + } + + public void setContextValuesBeanName(String contextValuesBeanName) { + this.contextValuesBeanName = contextValuesBeanName; + } + + public void setFlowBeanNamesPrefix(String flowBeanNamesPrefix) { + this.flowBeanNamesPrefix = flowBeanNamesPrefix; + } +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/ExecutionFlowGeneratorSource.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/ExecutionFlowGeneratorSource.java index 8d699c660..de29e29ce 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/ExecutionFlowGeneratorSource.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/ExecutionFlowGeneratorSource.java @@ -1,39 +1,24 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.generator; - -import java.util.List; - -/** - * Provides 2 types of information required by an ExecutionFlowGenerator: - * a list of RunnableCallFlowDescriptor used to create RunnableCallFlow - * and a list of RunnableDataNode used to create any kind of flow via a factory. - */ -public interface ExecutionFlowGeneratorSource { - - /** - * @return a list of RunnableCallFlowDescriptor used - * by a ExecutionFlowGenerator to create RunnableCallFlow - */ - public List getRunnableCallFlowDescriptors(); - - /** - * @return a list of RunnableDataNode used - * by a ExecutionFlowGenerator to create any kind of flow via a factory - */ - public List getRunnableDataNodes(); - -} +package org.argeo.slc.core.execution.generator; + +import java.util.List; + +/** + * Provides 2 types of information required by an ExecutionFlowGenerator: + * a list of RunnableCallFlowDescriptor used to create RunnableCallFlow + * and a list of RunnableDataNode used to create any kind of flow via a factory. + */ +public interface ExecutionFlowGeneratorSource { + + /** + * @return a list of RunnableCallFlowDescriptor used + * by a ExecutionFlowGenerator to create RunnableCallFlow + */ + public List getRunnableCallFlowDescriptors(); + + /** + * @return a list of RunnableDataNode used + * by a ExecutionFlowGenerator to create any kind of flow via a factory + */ + public List getRunnableDataNodes(); + +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableCall.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableCall.java index c3fd5f2d8..d7740720a 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableCall.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableCall.java @@ -1,70 +1,55 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.generator; - -import java.util.Map; - -/** - * Storage class for information required to call a flow - * of the Spring execution context: - * bean name of the flow, - * variables to add to the Execution Context before the call - * and variables (context values) to add to a Map - * potentially referenced by the called flow - */ -public class RunnableCall { - - /** - * Bean name of the flow to call - */ - private String beanName; - - /** - * Variables to add to the execution context before the call - */ - private Map executionVariables; - - /** - * Variables to add to the Map potentially referenced by - * the called flow - */ - private Map contextValues; - - public String getBeanName() { - return beanName; - } - - public void setBeanName(String beanName) { - this.beanName = beanName; - } - - public Map getExecutionVariables() { - return executionVariables; - } - - public void setExecutionVariables(Map executionVariables) { - this.executionVariables = executionVariables; - } - - public Map getContextValues() { - return contextValues; - } - - public void setContextValues(Map contextValues) { - this.contextValues = contextValues; - } - -} +package org.argeo.slc.core.execution.generator; + +import java.util.Map; + +/** + * Storage class for information required to call a flow + * of the Spring execution context: + * bean name of the flow, + * variables to add to the Execution Context before the call + * and variables (context values) to add to a Map + * potentially referenced by the called flow + */ +public class RunnableCall { + + /** + * Bean name of the flow to call + */ + private String beanName; + + /** + * Variables to add to the execution context before the call + */ + private Map executionVariables; + + /** + * Variables to add to the Map potentially referenced by + * the called flow + */ + private Map contextValues; + + public String getBeanName() { + return beanName; + } + + public void setBeanName(String beanName) { + this.beanName = beanName; + } + + public Map getExecutionVariables() { + return executionVariables; + } + + public void setExecutionVariables(Map executionVariables) { + this.executionVariables = executionVariables; + } + + public Map getContextValues() { + return contextValues; + } + + public void setContextValues(Map contextValues) { + this.contextValues = contextValues; + } + +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableCallFlow.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableCallFlow.java index 695606c21..04043acff 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableCallFlow.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableCallFlow.java @@ -1,243 +1,228 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.generator; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.slc.SlcException; -import org.argeo.slc.core.execution.DefaultExecutionSpec; -import org.argeo.slc.execution.ExecutionContext; -import org.argeo.slc.execution.ExecutionFlow; -import org.argeo.slc.execution.ExecutionSpec; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; - -/** - * Execution Flow calling a list of Runnable (identified by their - * bean name in the Spring Application Context) after configuring the Execution - * context and a Map potentially shared by the called Runnable - * - */ -public class RunnableCallFlow implements ExecutionFlow, ApplicationContextAware { - - private final static Log log = LogFactory.getLog(RunnableCallFlow.class); - - /** - * Key in the execution context for the index of the call (e.g. 0 for the - * first runnable called, ...) - */ - public final static String VAR_CALL_INDEX = "slcVar.runnableCallFlow.callIndex"; - - /** - * Name of the flow. Also bean name - */ - private String name; - - /** - * Path of the flow - */ - private String path; - - /** - * Whether an exception in a Runnable shall stop the execution - * of the flow - */ - private Boolean failOnError = true; - - /** - * List of Runnable to call, with bean name, execution - * variables and context values - */ - private List runnableCalls; - - /** - * Map potentially referenced by called flows. Updated with the context - * values of a Runnable before calling it. - */ - private Map sharedContextValuesMap; - - /** - * ExecutionSpec of the flow. Does not contain any attribute. - */ - private ExecutionSpec executionSpec = new DefaultExecutionSpec(); - - /** - * Reference to the ExecutionContext - */ - private ExecutionContext executionContext; - - /** - * Reference to the Spring ApplicationContext. Set via - * setApplicationContext, the class implementing - * ApplicationContextAware - */ - private ApplicationContext applicationContext; - - /** - * Runs a Runnable after configuring the Execution Context and - * sharedContextValuesMap - * - * @param runnable - * the Runnable to call - * @param executionVariables - * the variables to add to the ExecutionContext - * @param contextValues - * the variables to add to sharedContextValuesMap - * @param callIndex - * index of the call (0 for the first called - * Runnable) set as variable of the - * ExecutionContext - */ - private void run(Runnable runnable, Map executionVariables, - Map contextValues, int callIndex) { - // add all variables to the Execution Context - for (Map.Entry entry : executionVariables.entrySet()) { - executionContext.setVariable(entry.getKey(), entry.getValue()); - } - - // add call Index Variable - executionContext.setVariable(VAR_CALL_INDEX, callIndex); - - // clear sharedContextValues and add all values of contextValues - if (sharedContextValuesMap != null) { - sharedContextValuesMap.clear(); - sharedContextValuesMap.putAll(contextValues); - } - - // then run the runnable - doExecuteRunnable(runnable); - } - - public void doExecuteRunnable(Runnable runnable) { - runnable.run(); - } - - /** - * Executes the flow. For each RunnableCall, the corresponding - * flow is retrieved from the Spring Application Context, the - * ExecutionContext and sharedContextValuesMap are - * configured and the Runnable is called. - */ - public void run() { - if (applicationContext == null) { - throw new SlcException("No ApplicationContext defined"); - } - - try { - for (int callIndex = 0; callIndex < runnableCalls.size(); ++callIndex) { - RunnableCall runnableCall = runnableCalls.get(callIndex); - Object bean = applicationContext.getBean( - runnableCall.getBeanName(), Runnable.class); - if (log.isDebugEnabled()) - log.debug("Running flow '" + runnableCall.getBeanName() - + "'"); - run((Runnable) bean, runnableCall.getExecutionVariables(), - runnableCall.getContextValues(), callIndex); - } - } catch (RuntimeException e) { - if (failOnError) - throw e; - else { - log.error("Execution flow failed," - + " but process did not fail" - + " because failOnError property" - + " is set to false: " + e); - if (log.isTraceEnabled()) - e.printStackTrace(); - } - } - } - - public Iterator runnables() { - List runnables = new ArrayList(); - for (int callIndex = 0; callIndex < runnableCalls.size(); ++callIndex) { - RunnableCall runnableCall = runnableCalls.get(callIndex); - Object bean = applicationContext.getBean( - runnableCall.getBeanName(), Runnable.class); - runnables.add((Runnable) bean); - } - return runnables.iterator(); - } - - public Runnable getRunnable() { - if (runnableCalls.size() == 1) - return runnables().next(); - else - throw new SlcException("There are " + runnableCalls.size() - + " runnables in flow " + getName()); - } - - @Override - public String toString() { - return new StringBuffer("RunnableCallFlow ").append(name).toString(); - } - - public ExecutionSpec getExecutionSpec() { - return executionSpec; - } - - public String getName() { - return name; - } - - public Object getParameter(String key) { - throw new SlcException("RunnableCallFlow have no parameters"); - } - - public String getPath() { - return path; - } - - public Boolean isSetAsParameter(String key) { - // The ExecutionSpec having no attribute, - // always return false - return false; - } - - public void setName(String name) { - this.name = name; - } - - public void setPath(String path) { - this.path = path; - } - - public void setExecutionContext(ExecutionContext executionContext) { - this.executionContext = executionContext; - } - - public void setRunnableCalls(List runnableCalls) { - this.runnableCalls = runnableCalls; - } - - public void setApplicationContext(ApplicationContext applicationContext) { - this.applicationContext = applicationContext; - } - - public void setSharedContextValuesMap(Map contextValues) { - this.sharedContextValuesMap = contextValues; - } - - public void setFailOnError(Boolean failOnError) { - this.failOnError = failOnError; - } - -} +package org.argeo.slc.core.execution.generator; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.argeo.slc.SlcException; +import org.argeo.slc.core.execution.DefaultExecutionSpec; +import org.argeo.slc.execution.ExecutionContext; +import org.argeo.slc.execution.ExecutionFlow; +import org.argeo.slc.execution.ExecutionSpec; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +/** + * Execution Flow calling a list of Runnable (identified by their + * bean name in the Spring Application Context) after configuring the Execution + * context and a Map potentially shared by the called Runnable + * + */ +public class RunnableCallFlow implements ExecutionFlow, ApplicationContextAware { + + private final static Log log = LogFactory.getLog(RunnableCallFlow.class); + + /** + * Key in the execution context for the index of the call (e.g. 0 for the + * first runnable called, ...) + */ + public final static String VAR_CALL_INDEX = "slcVar.runnableCallFlow.callIndex"; + + /** + * Name of the flow. Also bean name + */ + private String name; + + /** + * Path of the flow + */ + private String path; + + /** + * Whether an exception in a Runnable shall stop the execution + * of the flow + */ + private Boolean failOnError = true; + + /** + * List of Runnable to call, with bean name, execution + * variables and context values + */ + private List runnableCalls; + + /** + * Map potentially referenced by called flows. Updated with the context + * values of a Runnable before calling it. + */ + private Map sharedContextValuesMap; + + /** + * ExecutionSpec of the flow. Does not contain any attribute. + */ + private ExecutionSpec executionSpec = new DefaultExecutionSpec(); + + /** + * Reference to the ExecutionContext + */ + private ExecutionContext executionContext; + + /** + * Reference to the Spring ApplicationContext. Set via + * setApplicationContext, the class implementing + * ApplicationContextAware + */ + private ApplicationContext applicationContext; + + /** + * Runs a Runnable after configuring the Execution Context and + * sharedContextValuesMap + * + * @param runnable + * the Runnable to call + * @param executionVariables + * the variables to add to the ExecutionContext + * @param contextValues + * the variables to add to sharedContextValuesMap + * @param callIndex + * index of the call (0 for the first called + * Runnable) set as variable of the + * ExecutionContext + */ + private void run(Runnable runnable, Map executionVariables, + Map contextValues, int callIndex) { + // add all variables to the Execution Context + for (Map.Entry entry : executionVariables.entrySet()) { + executionContext.setVariable(entry.getKey(), entry.getValue()); + } + + // add call Index Variable + executionContext.setVariable(VAR_CALL_INDEX, callIndex); + + // clear sharedContextValues and add all values of contextValues + if (sharedContextValuesMap != null) { + sharedContextValuesMap.clear(); + sharedContextValuesMap.putAll(contextValues); + } + + // then run the runnable + doExecuteRunnable(runnable); + } + + public void doExecuteRunnable(Runnable runnable) { + runnable.run(); + } + + /** + * Executes the flow. For each RunnableCall, the corresponding + * flow is retrieved from the Spring Application Context, the + * ExecutionContext and sharedContextValuesMap are + * configured and the Runnable is called. + */ + public void run() { + if (applicationContext == null) { + throw new SlcException("No ApplicationContext defined"); + } + + try { + for (int callIndex = 0; callIndex < runnableCalls.size(); ++callIndex) { + RunnableCall runnableCall = runnableCalls.get(callIndex); + Object bean = applicationContext.getBean( + runnableCall.getBeanName(), Runnable.class); + if (log.isDebugEnabled()) + log.debug("Running flow '" + runnableCall.getBeanName() + + "'"); + run((Runnable) bean, runnableCall.getExecutionVariables(), + runnableCall.getContextValues(), callIndex); + } + } catch (RuntimeException e) { + if (failOnError) + throw e; + else { + log.error("Execution flow failed," + + " but process did not fail" + + " because failOnError property" + + " is set to false: " + e); + if (log.isTraceEnabled()) + e.printStackTrace(); + } + } + } + + public Iterator runnables() { + List runnables = new ArrayList(); + for (int callIndex = 0; callIndex < runnableCalls.size(); ++callIndex) { + RunnableCall runnableCall = runnableCalls.get(callIndex); + Object bean = applicationContext.getBean( + runnableCall.getBeanName(), Runnable.class); + runnables.add((Runnable) bean); + } + return runnables.iterator(); + } + + public Runnable getRunnable() { + if (runnableCalls.size() == 1) + return runnables().next(); + else + throw new SlcException("There are " + runnableCalls.size() + + " runnables in flow " + getName()); + } + + @Override + public String toString() { + return new StringBuffer("RunnableCallFlow ").append(name).toString(); + } + + public ExecutionSpec getExecutionSpec() { + return executionSpec; + } + + public String getName() { + return name; + } + + public Object getParameter(String key) { + throw new SlcException("RunnableCallFlow have no parameters"); + } + + public String getPath() { + return path; + } + + public Boolean isSetAsParameter(String key) { + // The ExecutionSpec having no attribute, + // always return false + return false; + } + + public void setName(String name) { + this.name = name; + } + + public void setPath(String path) { + this.path = path; + } + + public void setExecutionContext(ExecutionContext executionContext) { + this.executionContext = executionContext; + } + + public void setRunnableCalls(List runnableCalls) { + this.runnableCalls = runnableCalls; + } + + public void setApplicationContext(ApplicationContext applicationContext) { + this.applicationContext = applicationContext; + } + + public void setSharedContextValuesMap(Map contextValues) { + this.sharedContextValuesMap = contextValues; + } + + public void setFailOnError(Boolean failOnError) { + this.failOnError = failOnError; + } + +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableCallFlowDescriptor.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableCallFlowDescriptor.java index e0bbbdda9..738b75f76 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableCallFlowDescriptor.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableCallFlowDescriptor.java @@ -1,70 +1,55 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.generator; - -import java.util.ArrayList; -import java.util.List; - -/** - * Storage Class for information required to - * instantiate a RunnableCallFlow: - * bean name of the flow, - * path of the flow - * and list of RunnableCall. - * - */ -public class RunnableCallFlowDescriptor { - - /** - * Bean name of the flow to instantiate - */ - private String beanName; - - /** - * Path of the flow to instantiate - */ - private String path; - - /** - * List of RunnableCall - */ - private List runnableCalls = new ArrayList(); - - public String getBeanName() { - return beanName; - } - - public void setBeanName(String beanName) { - this.beanName = beanName; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public List getRunnableCalls() { - return runnableCalls; - } - - public void setRunnableCalls(List runnableCalls) { - this.runnableCalls = runnableCalls; - } - -} +package org.argeo.slc.core.execution.generator; + +import java.util.ArrayList; +import java.util.List; + +/** + * Storage Class for information required to + * instantiate a RunnableCallFlow: + * bean name of the flow, + * path of the flow + * and list of RunnableCall. + * + */ +public class RunnableCallFlowDescriptor { + + /** + * Bean name of the flow to instantiate + */ + private String beanName; + + /** + * Path of the flow to instantiate + */ + private String path; + + /** + * List of RunnableCall + */ + private List runnableCalls = new ArrayList(); + + public String getBeanName() { + return beanName; + } + + public void setBeanName(String beanName) { + this.beanName = beanName; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public List getRunnableCalls() { + return runnableCalls; + } + + public void setRunnableCalls(List runnableCalls) { + this.runnableCalls = runnableCalls; + } + +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableDataNode.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableDataNode.java index 51843dcd0..e526b5e65 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableDataNode.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableDataNode.java @@ -1,74 +1,59 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.generator; - -import java.util.List; -import java.util.Map; - -/** - * Stores information relative to a Runnable. - * Allows to structure the information as a tree, each node - * storing data as a Map. - */ -public interface RunnableDataNode { - - /** - * @return a Map containing the data associated with this node. - * Data associated with parent nodes are expected - * to be contained in the returned Map - */ - public Map getData(); - - /** - * @return the name of the bean to create. - * Can be null if no bean shall be created for the - * RunnableDataNode (e.g. is is a sub-node) - */ - public String getBeanName(); - - /** - * @return the path of the flow bean to create. - * Can be null if the bean to created is not an - * ExecutionFlow or if no bean shall be created for the - * RunnableDataNode (e.g. is is a sub-node) - */ - public String getPath(); - - /** - * @return whether the RunnableDataNode has - * children or not. - * Expected to be equivalent to getChildren().empty() - */ - public boolean isLeaf(); - - /** - * @return the list of RunnableDataNode children. - * Can be empty. Shall not be null. - */ - public List getChildren(); - - /** - * @return the RunnableDataNode parent. - * Can be null if no parent is defined (top node). - */ - public RunnableDataNode getParent(); - - /** - * Sets the RunnableDataNode parent - * @param parent - */ - public void setParent(RunnableDataNode parent); -} +package org.argeo.slc.core.execution.generator; + +import java.util.List; +import java.util.Map; + +/** + * Stores information relative to a Runnable. + * Allows to structure the information as a tree, each node + * storing data as a Map. + */ +public interface RunnableDataNode { + + /** + * @return a Map containing the data associated with this node. + * Data associated with parent nodes are expected + * to be contained in the returned Map + */ + public Map getData(); + + /** + * @return the name of the bean to create. + * Can be null if no bean shall be created for the + * RunnableDataNode (e.g. is is a sub-node) + */ + public String getBeanName(); + + /** + * @return the path of the flow bean to create. + * Can be null if the bean to created is not an + * ExecutionFlow or if no bean shall be created for the + * RunnableDataNode (e.g. is is a sub-node) + */ + public String getPath(); + + /** + * @return whether the RunnableDataNode has + * children or not. + * Expected to be equivalent to getChildren().empty() + */ + public boolean isLeaf(); + + /** + * @return the list of RunnableDataNode children. + * Can be empty. Shall not be null. + */ + public List getChildren(); + + /** + * @return the RunnableDataNode parent. + * Can be null if no parent is defined (top node). + */ + public RunnableDataNode getParent(); + + /** + * Sets the RunnableDataNode parent + * @param parent + */ + public void setParent(RunnableDataNode parent); +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableFactory.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableFactory.java index 2b3702889..c81008a9f 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableFactory.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/RunnableFactory.java @@ -1,29 +1,14 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.generator; - -import org.springframework.beans.factory.support.BeanDefinitionRegistry; - -/** - * Interprets a RunnableDataNode by creating corresponding - * beans and registering them in a BeanDefinitionRegistry - * - */ -public interface RunnableFactory { - - public void createAndRegisterRunnable(RunnableDataNode node, - BeanDefinitionRegistry beanDefinitionRegistry); -} +package org.argeo.slc.core.execution.generator; + +import org.springframework.beans.factory.support.BeanDefinitionRegistry; + +/** + * Interprets a RunnableDataNode by creating corresponding + * beans and registering them in a BeanDefinitionRegistry + * + */ +public interface RunnableFactory { + + public void createAndRegisterRunnable(RunnableDataNode node, + BeanDefinitionRegistry beanDefinitionRegistry); +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/CloseTestResult.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/CloseTestResult.java index 43b296106..76460d6c2 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/CloseTestResult.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/CloseTestResult.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.tasks; import org.argeo.slc.test.TestResult; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/Echo.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/Echo.java index d47149b86..87140246f 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/Echo.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/Echo.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.tasks; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/If.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/If.java index 0d22e437d..f8a79d848 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/If.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/If.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.tasks; import org.argeo.slc.SlcException; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/JvmProcess.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/JvmProcess.java index 01f11012f..157c150da 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/JvmProcess.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/JvmProcess.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.tasks; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/MergedLists.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/MergedLists.java index e1740e659..bb25c88e6 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/MergedLists.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/MergedLists.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.tasks; import java.util.ArrayList; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/MethodCall.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/MethodCall.java index e4fa77222..88aeb4716 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/MethodCall.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/MethodCall.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.tasks; import java.lang.reflect.Method; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/OverrideContextAware.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/OverrideContextAware.java index 9afa8468c..6162ecbb2 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/OverrideContextAware.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/OverrideContextAware.java @@ -1,72 +1,57 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.tasks; - -import org.argeo.slc.SlcException; -import org.argeo.slc.core.test.context.SimpleContextAware; -import org.argeo.slc.test.context.ContextAware; - -/** - * Overrides Values and Expected values of a target - * SimpleContextAware with the corresponding - * values and expected values of a source ContextAware - * - */ -public class OverrideContextAware implements Runnable { - - private ContextAware source; - - private SimpleContextAware target; - - /** - * Whether an exception shall be thrown if a value - * or expected value of the source is not defined - * in the target - */ - private Boolean failIfUndefinedInSource = true; - - public void run() { - // override values - if(source.getValues() != null) - for(String key : source.getValues().keySet()) { - if(failIfUndefinedInSource && !target.getValues().containsKey(key)) { - throw new SlcException("No entry in target values for key '" + key + "'"); - } - target.getValues().put(key, source.getValues().get(key)); - } - - // override expected values - if(source.getExpectedValues() != null) - for(String key : source.getExpectedValues().keySet()) { - if(failIfUndefinedInSource && !target.getExpectedValues().containsKey(key)) { - throw new SlcException("No entry in target expected values for key '" + key + "'"); - } - target.getExpectedValues().put(key, source.getExpectedValues().get(key)); - } - } - - public void setSource(ContextAware source) { - this.source = source; - } - - public void setTarget(SimpleContextAware target) { - this.target = target; - } - - public void setFailIfUndefinedInSource(Boolean failIfUndefinedInSource) { - this.failIfUndefinedInSource = failIfUndefinedInSource; - } -} +package org.argeo.slc.core.execution.tasks; + +import org.argeo.slc.SlcException; +import org.argeo.slc.core.test.context.SimpleContextAware; +import org.argeo.slc.test.context.ContextAware; + +/** + * Overrides Values and Expected values of a target + * SimpleContextAware with the corresponding + * values and expected values of a source ContextAware + * + */ +public class OverrideContextAware implements Runnable { + + private ContextAware source; + + private SimpleContextAware target; + + /** + * Whether an exception shall be thrown if a value + * or expected value of the source is not defined + * in the target + */ + private Boolean failIfUndefinedInSource = true; + + public void run() { + // override values + if(source.getValues() != null) + for(String key : source.getValues().keySet()) { + if(failIfUndefinedInSource && !target.getValues().containsKey(key)) { + throw new SlcException("No entry in target values for key '" + key + "'"); + } + target.getValues().put(key, source.getValues().get(key)); + } + + // override expected values + if(source.getExpectedValues() != null) + for(String key : source.getExpectedValues().keySet()) { + if(failIfUndefinedInSource && !target.getExpectedValues().containsKey(key)) { + throw new SlcException("No entry in target expected values for key '" + key + "'"); + } + target.getExpectedValues().put(key, source.getExpectedValues().get(key)); + } + } + + public void setSource(ContextAware source) { + this.source = source; + } + + public void setTarget(SimpleContextAware target) { + this.target = target; + } + + public void setFailIfUndefinedInSource(Boolean failIfUndefinedInSource) { + this.failIfUndefinedInSource = failIfUndefinedInSource; + } +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/SystemCall.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/SystemCall.java index 4237c5752..633f8f950 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/SystemCall.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/SystemCall.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.tasks; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/SystemCallOutputListener.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/SystemCallOutputListener.java index b28f1ade2..7972cdcb8 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/SystemCallOutputListener.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/SystemCallOutputListener.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.tasks; public interface SystemCallOutputListener { diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/UploadAttachments.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/UploadAttachments.java index 93f27b281..83f2ee8c5 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/UploadAttachments.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/tasks/UploadAttachments.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.tasks; import java.util.ArrayList; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/AsFlowDecorator.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/AsFlowDecorator.java index dceec1c5a..b68d9c77d 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/AsFlowDecorator.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/AsFlowDecorator.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.xml; import org.apache.commons.logging.Log; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/ExecutionScopeDecorator.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/ExecutionScopeDecorator.java index dfca9d512..b756381ef 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/ExecutionScopeDecorator.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/ExecutionScopeDecorator.java @@ -1,52 +1,37 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.xml; - -import org.springframework.aop.scope.ScopedProxyUtils; -import org.springframework.beans.factory.config.BeanDefinitionHolder; -import org.springframework.beans.factory.parsing.BeanComponentDefinition; -import org.springframework.beans.factory.xml.BeanDefinitionDecorator; -import org.springframework.beans.factory.xml.ParserContext; -import org.w3c.dom.Element; -import org.w3c.dom.Node; - -/** - * Inspired by org.springframework.aop.config.ScopedProxyBeanDefinitionDecorator - */ -public class ExecutionScopeDecorator implements BeanDefinitionDecorator { - private static final String PROXY_TARGET_CLASS = "proxy-target-class"; - - public BeanDefinitionHolder decorate(Node node, - BeanDefinitionHolder definition, ParserContext parserContext) { - - definition.getBeanDefinition().setScope("execution"); - - // Default: CGLib not used - boolean proxyTargetClass = false; - if (node instanceof Element) { - Element ele = (Element) node; - if (ele.hasAttribute(PROXY_TARGET_CLASS)) { - proxyTargetClass = Boolean.valueOf(ele.getAttribute(PROXY_TARGET_CLASS)).booleanValue(); - } - } - - // Register the original bean definition as it will be referenced by the scoped proxy and is relevant for tooling (validation, navigation). - String targetBeanName = ScopedProxyUtils.getTargetBeanName(definition.getBeanName()); - parserContext.getReaderContext().fireComponentRegistered(new BeanComponentDefinition(definition.getBeanDefinition(), targetBeanName)); - - return ScopedProxyUtils.createScopedProxy(definition, parserContext.getRegistry(), proxyTargetClass); - } -} +package org.argeo.slc.core.execution.xml; + +import org.springframework.aop.scope.ScopedProxyUtils; +import org.springframework.beans.factory.config.BeanDefinitionHolder; +import org.springframework.beans.factory.parsing.BeanComponentDefinition; +import org.springframework.beans.factory.xml.BeanDefinitionDecorator; +import org.springframework.beans.factory.xml.ParserContext; +import org.w3c.dom.Element; +import org.w3c.dom.Node; + +/** + * Inspired by org.springframework.aop.config.ScopedProxyBeanDefinitionDecorator + */ +public class ExecutionScopeDecorator implements BeanDefinitionDecorator { + private static final String PROXY_TARGET_CLASS = "proxy-target-class"; + + public BeanDefinitionHolder decorate(Node node, + BeanDefinitionHolder definition, ParserContext parserContext) { + + definition.getBeanDefinition().setScope("execution"); + + // Default: CGLib not used + boolean proxyTargetClass = false; + if (node instanceof Element) { + Element ele = (Element) node; + if (ele.hasAttribute(PROXY_TARGET_CLASS)) { + proxyTargetClass = Boolean.valueOf(ele.getAttribute(PROXY_TARGET_CLASS)).booleanValue(); + } + } + + // Register the original bean definition as it will be referenced by the scoped proxy and is relevant for tooling (validation, navigation). + String targetBeanName = ScopedProxyUtils.getTargetBeanName(definition.getBeanName()); + parserContext.getReaderContext().fireComponentRegistered(new BeanComponentDefinition(definition.getBeanDefinition(), targetBeanName)); + + return ScopedProxyUtils.createScopedProxy(definition, parserContext.getRegistry(), proxyTargetClass); + } +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/FlowBeanDefinitionParser.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/FlowBeanDefinitionParser.java index 7d2ab49a1..60e869992 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/FlowBeanDefinitionParser.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/FlowBeanDefinitionParser.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.xml; import java.util.ArrayList; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/FlowNamespaceHandler.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/FlowNamespaceHandler.java index 2deba8bb2..a1d6912aa 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/FlowNamespaceHandler.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/FlowNamespaceHandler.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.xml; import org.springframework.beans.factory.xml.NamespaceHandlerSupport; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/NamespaceUtils.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/NamespaceUtils.java index ccf94f131..baa01524f 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/NamespaceUtils.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/NamespaceUtils.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.xml; import org.argeo.slc.SlcException; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/ParamDecorator.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/ParamDecorator.java index 16839c042..ed7a22375 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/ParamDecorator.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/ParamDecorator.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.xml; import org.argeo.slc.core.execution.ParameterRef; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/SpecBeanDefinitionParser.java b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/SpecBeanDefinitionParser.java index bb2d24516..937e8d02d 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/SpecBeanDefinitionParser.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/execution/xml/SpecBeanDefinitionParser.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.execution.xml; import java.util.List; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/test/context/DefaultContextTestData.java b/org.argeo.slc.spring/src/org/argeo/slc/core/test/context/DefaultContextTestData.java index 3c7f44ae2..2701cd27b 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/test/context/DefaultContextTestData.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/test/context/DefaultContextTestData.java @@ -1,29 +1,14 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.test.context; - -import org.argeo.slc.runtime.test.TestDataUtils; -import org.argeo.slc.test.TestData; -import org.argeo.slc.test.TestDataProvider; - -public class DefaultContextTestData extends SimpleContextAware implements - TestData, TestDataProvider { - - public T getTestData(Class clss, String key) { - return TestDataUtils.getItSelf(clss, this); - } - -} +package org.argeo.slc.core.test.context; + +import org.argeo.slc.runtime.test.TestDataUtils; +import org.argeo.slc.test.TestData; +import org.argeo.slc.test.TestDataProvider; + +public class DefaultContextTestData extends SimpleContextAware implements + TestData, TestDataProvider { + + public T getTestData(Class clss, String key) { + return TestDataUtils.getItSelf(clss, this); + } + +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/test/context/SimpleContextAware.java b/org.argeo.slc.spring/src/org/argeo/slc/core/test/context/SimpleContextAware.java index 7980e3768..b2d819190 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/test/context/SimpleContextAware.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/test/context/SimpleContextAware.java @@ -1,86 +1,71 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.test.context; - -import java.util.Map; -import java.util.TreeMap; - -import org.argeo.slc.SlcException; -import org.argeo.slc.runtime.test.ContextUtils; -import org.argeo.slc.test.context.ContextAware; -import org.argeo.slc.test.context.ParentContextAware; -import org.springframework.beans.factory.InitializingBean; - -public class SimpleContextAware implements ContextAware, InitializingBean { - private ParentContextAware parentContext; - - private Map values = new TreeMap(); - private Map expectedValues = new TreeMap(); - - private String contextSkipFlag = DEFAULT_SKIP_FLAG; - private String contextAnyFlag = DEFAULT_ANY_FLAG; - - public Map getValues() { - return values; - } - - public void setValues(Map values) { - this.values = values; - } - - public Map getExpectedValues() { - return expectedValues; - } - - public void setExpectedValues(Map expectedValues) { - this.expectedValues = expectedValues; - } - - /** Used to add this context as a child by setting a property. */ - public void setParentContext(ParentContextAware parentContextAware) { - if (parentContext != null) - throw new SlcException("Parent context already set"); - this.parentContext = parentContextAware; - this.parentContext.addChildContext(this); - } - - protected ParentContextAware getParentContext() { - return parentContext; - } - - public void afterPropertiesSet() throws Exception { - if (parentContext != null) { - ContextUtils.synchronize(parentContext); - } - } - - public String getContextSkipFlag() { - return contextSkipFlag; - } - - public void setContextSkipFlag(String contextSkipFlag) { - this.contextSkipFlag = contextSkipFlag; - } - - public String getContextAnyFlag() { - return contextAnyFlag; - } - - public void setContextAnyFlag(String contextAnyFlag) { - this.contextAnyFlag = contextAnyFlag; - } - -} +package org.argeo.slc.core.test.context; + +import java.util.Map; +import java.util.TreeMap; + +import org.argeo.slc.SlcException; +import org.argeo.slc.runtime.test.ContextUtils; +import org.argeo.slc.test.context.ContextAware; +import org.argeo.slc.test.context.ParentContextAware; +import org.springframework.beans.factory.InitializingBean; + +public class SimpleContextAware implements ContextAware, InitializingBean { + private ParentContextAware parentContext; + + private Map values = new TreeMap(); + private Map expectedValues = new TreeMap(); + + private String contextSkipFlag = DEFAULT_SKIP_FLAG; + private String contextAnyFlag = DEFAULT_ANY_FLAG; + + public Map getValues() { + return values; + } + + public void setValues(Map values) { + this.values = values; + } + + public Map getExpectedValues() { + return expectedValues; + } + + public void setExpectedValues(Map expectedValues) { + this.expectedValues = expectedValues; + } + + /** Used to add this context as a child by setting a property. */ + public void setParentContext(ParentContextAware parentContextAware) { + if (parentContext != null) + throw new SlcException("Parent context already set"); + this.parentContext = parentContextAware; + this.parentContext.addChildContext(this); + } + + protected ParentContextAware getParentContext() { + return parentContext; + } + + public void afterPropertiesSet() throws Exception { + if (parentContext != null) { + ContextUtils.synchronize(parentContext); + } + } + + public String getContextSkipFlag() { + return contextSkipFlag; + } + + public void setContextSkipFlag(String contextSkipFlag) { + this.contextSkipFlag = contextSkipFlag; + } + + public String getContextAnyFlag() { + return contextAnyFlag; + } + + public void setContextAnyFlag(String contextAnyFlag) { + this.contextAnyFlag = contextAnyFlag; + } + +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/core/test/context/SimpleParentContextAware.java b/org.argeo.slc.spring/src/org/argeo/slc/core/test/context/SimpleParentContextAware.java index fc214ea1a..3c2e7b9f0 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/core/test/context/SimpleParentContextAware.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/core/test/context/SimpleParentContextAware.java @@ -1,51 +1,36 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.core.test.context; - -import java.util.Collection; -import java.util.List; -import java.util.Vector; - -import org.argeo.slc.runtime.test.ContextUtils; -import org.argeo.slc.test.context.ContextAware; -import org.argeo.slc.test.context.ParentContextAware; -import org.springframework.beans.factory.InitializingBean; - -public class SimpleParentContextAware extends SimpleContextAware implements - ParentContextAware, InitializingBean { - private List children = new Vector(); - - public Collection getChildContexts() { - return children; - } - - public void addChildContext(ContextAware contextAware) { - children.add(contextAware); - } - - @Override - public void afterPropertiesSet() throws Exception { - if (getParentContext() != null) { - // If has a parent, sync it. - super.afterPropertiesSet(); - } else { - if (children.size() > 0) { - // No need to synchronize if no children - ContextUtils.synchronize(this); - } - } - } -} +package org.argeo.slc.core.test.context; + +import java.util.Collection; +import java.util.List; +import java.util.Vector; + +import org.argeo.slc.runtime.test.ContextUtils; +import org.argeo.slc.test.context.ContextAware; +import org.argeo.slc.test.context.ParentContextAware; +import org.springframework.beans.factory.InitializingBean; + +public class SimpleParentContextAware extends SimpleContextAware implements + ParentContextAware, InitializingBean { + private List children = new Vector(); + + public Collection getChildContexts() { + return children; + } + + public void addChildContext(ContextAware contextAware) { + children.add(contextAware); + } + + @Override + public void afterPropertiesSet() throws Exception { + if (getParentContext() != null) { + // If has a parent, sync it. + super.afterPropertiesSet(); + } else { + if (children.size() > 0) { + // No need to synchronize if no children + ContextUtils.synchronize(this); + } + } + } +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/BundleRegister.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/BundleRegister.java index 747785fee..b04395cc6 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/BundleRegister.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/BundleRegister.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi; /** Experimental A structured set of OSGi bundles. */ diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/BundlesManager.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/BundlesManager.java index 9877c31e6..6563d3951 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/BundlesManager.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/BundlesManager.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi; import java.util.Collection; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/FileSystemBundleRegister.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/FileSystemBundleRegister.java index 03f21c530..605c797e6 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/FileSystemBundleRegister.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/FileSystemBundleRegister.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/MultipleServiceExporterPostProcessor.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/MultipleServiceExporterPostProcessor.java index 2d8b0311c..01509c273 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/MultipleServiceExporterPostProcessor.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/MultipleServiceExporterPostProcessor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi; import java.util.ArrayList; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiBundle.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiBundle.java index cb11615b6..01275da27 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiBundle.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiBundle.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi; import org.argeo.slc.DefaultNameVersion; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiExecutionModule.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiExecutionModule.java index df7ae9bc1..ca3f5faa7 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiExecutionModule.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiExecutionModule.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi; import org.apache.commons.logging.Log; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiExecutionModulesManager.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiExecutionModulesManager.java index 369365704..63eb6f9a4 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiExecutionModulesManager.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiExecutionModulesManager.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi; import java.lang.management.ManagementFactory; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiExecutionResources.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiExecutionResources.java index 306ad07a8..3668b9123 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiExecutionResources.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiExecutionResources.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi; import java.io.File; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiRuntime.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiRuntime.java index 8286eccd5..089baa6db 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiRuntime.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/OsgiRuntime.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi; import java.util.ArrayList; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/AbstractOsgiModularDistribution.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/AbstractOsgiModularDistribution.java index c76659f09..61380c0eb 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/AbstractOsgiModularDistribution.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/AbstractOsgiModularDistribution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi.build; import java.util.ArrayList; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/BundleModularDistribution.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/BundleModularDistribution.java index db7c7e8a1..ec7d2f6bf 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/BundleModularDistribution.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/BundleModularDistribution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi.build; import java.net.URL; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/EclipseUpdateSite.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/EclipseUpdateSite.java index e38d9c024..b8debf575 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/EclipseUpdateSite.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/EclipseUpdateSite.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi.build; import java.util.ArrayList; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/EclipseUpdateSiteCategory.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/EclipseUpdateSiteCategory.java index c71656236..510a55552 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/EclipseUpdateSiteCategory.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/EclipseUpdateSiteCategory.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi.build; public class EclipseUpdateSiteCategory { diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/EclipseUpdateSiteFeature.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/EclipseUpdateSiteFeature.java index f28c0cb12..42ded0b31 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/EclipseUpdateSiteFeature.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/EclipseUpdateSiteFeature.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi.build; import java.util.ArrayList; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/OsgiRuntimeModularDistribution.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/OsgiRuntimeModularDistribution.java index 5523e6efe..acc4bab36 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/OsgiRuntimeModularDistribution.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/build/OsgiRuntimeModularDistribution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi.build; import java.net.URL; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/osgi/deploy/OsgiResourceSet.java b/org.argeo.slc.spring/src/org/argeo/slc/osgi/deploy/OsgiResourceSet.java index 2414788c8..bea394927 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/osgi/deploy/OsgiResourceSet.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/osgi/deploy/OsgiResourceSet.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.osgi.deploy; import org.argeo.slc.core.deploy.DefaultResourceSet; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/spring/AbstractSystemExecution.java b/org.argeo.slc.spring/src/org/argeo/slc/spring/AbstractSystemExecution.java index 83a6640c4..2c12838cd 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/spring/AbstractSystemExecution.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/spring/AbstractSystemExecution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.spring; import javax.security.auth.Subject; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/spring/AuthenticatedApplicationContextInitialization.java b/org.argeo.slc.spring/src/org/argeo/slc/spring/AuthenticatedApplicationContextInitialization.java index 68a9cc993..40d562bb3 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/spring/AuthenticatedApplicationContextInitialization.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/spring/AuthenticatedApplicationContextInitialization.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.spring; import java.security.AccessController; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/spring/auth/AbstractSystemExecution.java b/org.argeo.slc.spring/src/org/argeo/slc/spring/auth/AbstractSystemExecution.java index ba358fa6d..eb1d73155 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/spring/auth/AbstractSystemExecution.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/spring/auth/AbstractSystemExecution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.spring.auth; import javax.security.auth.Subject; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/spring/auth/AuthenticatedApplicationContextInitialization.java b/org.argeo.slc.spring/src/org/argeo/slc/spring/auth/AuthenticatedApplicationContextInitialization.java index 570213403..79f7822ee 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/spring/auth/AuthenticatedApplicationContextInitialization.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/spring/auth/AuthenticatedApplicationContextInitialization.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.spring.auth; import java.security.AccessController; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/AbstractExecutionFlowTestcase.java b/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/AbstractExecutionFlowTestcase.java index b3c3ae4c0..f95296a5c 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/AbstractExecutionFlowTestcase.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/AbstractExecutionFlowTestcase.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.spring.unit; import org.argeo.slc.execution.ExecutionFlow; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/AbstractOsgiRuntimeTestCase.java b/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/AbstractOsgiRuntimeTestCase.java index 7cd14736e..734a5ec94 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/AbstractOsgiRuntimeTestCase.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/AbstractOsgiRuntimeTestCase.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.spring.unit; import java.util.ArrayList; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/AbstractSpringTestCase.java b/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/AbstractSpringTestCase.java index b6e48fed4..ec532eb13 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/AbstractSpringTestCase.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/AbstractSpringTestCase.java @@ -1,115 +1,100 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.spring.unit; - -import java.util.Map; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.slc.SlcException; -import org.springframework.beans.factory.BeanFactoryUtils; -import org.springframework.beans.factory.ListableBeanFactory; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -import junit.framework.TestCase; - -/** Helper for tests using a Spring application co,text. */ -public abstract class AbstractSpringTestCase extends TestCase { - protected final Log log = LogFactory.getLog(getClass()); - private ConfigurableApplicationContext context; - - /** - * Gets (and create if necessary) the application context to use. Default - * implementation uses a class path xml application context and calls - * {@link #getApplicationContextLocation()}. - */ - protected ConfigurableApplicationContext getContext() { - if (context == null) { - context = new ClassPathXmlApplicationContext( - getApplicationContextLocation()); - if (getIsStartContext()) - context.start(); - } - return context; - } - - @Override - protected void tearDown() throws Exception { - if (context != null && context.isActive()) - context.close(); - super.tearDown(); - } - - /** Whether the context should be started after being created. */ - protected Boolean getIsStartContext() { - return false; - } - - /** Returns a bean from the underlying context */ - @SuppressWarnings(value = { "unchecked" }) - protected T getBean(String beanId) { - return (T) getContext().getBean(beanId); - } - - protected T getBean(Class clss) { - T bean = loadSingleFromContext(getContext(), clss); - if (bean == null) { - throw new SlcException("Cannot retrieve a unique bean of type " - + clss); - } else { - return bean; - } - } - - /** - * Th location of the application to load. The default implementation - * returns applicationContext.xml found in the same package as the - * test. - */ - protected String getApplicationContextLocation() { - return inPackage("applicationContext.xml"); - } - - /** - * Prefixes the package of the class after converting the '.' to '/' in - * order to have a resource path. - */ - protected String inPackage(String suffix) { - String prefix = getClass().getPackage().getName().replace('.', '/'); - return prefix + '/' + suffix; - } - - @SuppressWarnings(value = { "unchecked" }) - protected T loadSingleFromContext(ListableBeanFactory context, - Class clss) { - Map beans = BeanFactoryUtils.beansOfTypeIncludingAncestors( - context, clss, false, false); - if (beans.size() == 1) { - return beans.values().iterator().next(); - } else if (beans.size() > 1) { - if (log.isDebugEnabled()) { - log - .debug(("Found more that on bean for type " + clss - + ": " + beans.keySet())); - } - return null; - } else { - return null; - } - } - -} +package org.argeo.slc.spring.unit; + +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.argeo.slc.SlcException; +import org.springframework.beans.factory.BeanFactoryUtils; +import org.springframework.beans.factory.ListableBeanFactory; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +import junit.framework.TestCase; + +/** Helper for tests using a Spring application co,text. */ +public abstract class AbstractSpringTestCase extends TestCase { + protected final Log log = LogFactory.getLog(getClass()); + private ConfigurableApplicationContext context; + + /** + * Gets (and create if necessary) the application context to use. Default + * implementation uses a class path xml application context and calls + * {@link #getApplicationContextLocation()}. + */ + protected ConfigurableApplicationContext getContext() { + if (context == null) { + context = new ClassPathXmlApplicationContext( + getApplicationContextLocation()); + if (getIsStartContext()) + context.start(); + } + return context; + } + + @Override + protected void tearDown() throws Exception { + if (context != null && context.isActive()) + context.close(); + super.tearDown(); + } + + /** Whether the context should be started after being created. */ + protected Boolean getIsStartContext() { + return false; + } + + /** Returns a bean from the underlying context */ + @SuppressWarnings(value = { "unchecked" }) + protected T getBean(String beanId) { + return (T) getContext().getBean(beanId); + } + + protected T getBean(Class clss) { + T bean = loadSingleFromContext(getContext(), clss); + if (bean == null) { + throw new SlcException("Cannot retrieve a unique bean of type " + + clss); + } else { + return bean; + } + } + + /** + * Th location of the application to load. The default implementation + * returns applicationContext.xml found in the same package as the + * test. + */ + protected String getApplicationContextLocation() { + return inPackage("applicationContext.xml"); + } + + /** + * Prefixes the package of the class after converting the '.' to '/' in + * order to have a resource path. + */ + protected String inPackage(String suffix) { + String prefix = getClass().getPackage().getName().replace('.', '/'); + return prefix + '/' + suffix; + } + + @SuppressWarnings(value = { "unchecked" }) + protected T loadSingleFromContext(ListableBeanFactory context, + Class clss) { + Map beans = BeanFactoryUtils.beansOfTypeIncludingAncestors( + context, clss, false, false); + if (beans.size() == 1) { + return beans.values().iterator().next(); + } else if (beans.size() > 1) { + if (log.isDebugEnabled()) { + log + .debug(("Found more that on bean for type " + clss + + ": " + beans.keySet())); + } + return null; + } else { + return null; + } + } + +} diff --git a/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/ExecutionFlowDescriptorTestUtils.java b/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/ExecutionFlowDescriptorTestUtils.java index f85849267..5e504f654 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/ExecutionFlowDescriptorTestUtils.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/ExecutionFlowDescriptorTestUtils.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.spring.unit; import java.util.ArrayList; diff --git a/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/UnitUtils.java b/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/UnitUtils.java index 1eeca0561..1e69adf7e 100644 --- a/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/UnitUtils.java +++ b/org.argeo.slc.spring/src/org/argeo/slc/spring/unit/UnitUtils.java @@ -1,57 +1,42 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.spring.unit; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; -import static junit.framework.Assert.assertNull; - -import java.util.Calendar; -import java.util.Date; -import java.util.GregorianCalendar; - -public abstract class UnitUtils { - public static void assertDateSec(Date expected, Date reached) { - if (expected == null) { - assertNull(reached); - return; - } else { - assertNotNull(reached); - } - - Calendar expectedCal = new GregorianCalendar(); - expectedCal.setTime(expected); - Calendar reachedCal = new GregorianCalendar(); - reachedCal.setTime(reached); - assertEquals(expectedCal.get(Calendar.YEAR), reachedCal - .get(Calendar.YEAR)); - assertEquals(expectedCal.get(Calendar.MONTH), reachedCal - .get(Calendar.MONTH)); - assertEquals(expectedCal.get(Calendar.DATE), reachedCal - .get(Calendar.DATE)); - assertEquals(expectedCal.get(Calendar.HOUR_OF_DAY), reachedCal - .get(Calendar.HOUR_OF_DAY)); - assertEquals(expectedCal.get(Calendar.MINUTE), reachedCal - .get(Calendar.MINUTE)); - assertEquals(expectedCal.get(Calendar.SECOND), reachedCal - .get(Calendar.SECOND)); - } - - private UnitUtils() { - - } - -} +package org.argeo.slc.spring.unit; + +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertNotNull; +import static junit.framework.Assert.assertNull; + +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; + +public abstract class UnitUtils { + public static void assertDateSec(Date expected, Date reached) { + if (expected == null) { + assertNull(reached); + return; + } else { + assertNotNull(reached); + } + + Calendar expectedCal = new GregorianCalendar(); + expectedCal.setTime(expected); + Calendar reachedCal = new GregorianCalendar(); + reachedCal.setTime(reached); + assertEquals(expectedCal.get(Calendar.YEAR), reachedCal + .get(Calendar.YEAR)); + assertEquals(expectedCal.get(Calendar.MONTH), reachedCal + .get(Calendar.MONTH)); + assertEquals(expectedCal.get(Calendar.DATE), reachedCal + .get(Calendar.DATE)); + assertEquals(expectedCal.get(Calendar.HOUR_OF_DAY), reachedCal + .get(Calendar.HOUR_OF_DAY)); + assertEquals(expectedCal.get(Calendar.MINUTE), reachedCal + .get(Calendar.MINUTE)); + assertEquals(expectedCal.get(Calendar.SECOND), reachedCal + .get(Calendar.SECOND)); + } + + private UnitUtils() { + + } + +} diff --git a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/CustomCli.java b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/CustomCli.java index 8b6a0e6f8..36db90f1c 100644 --- a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/CustomCli.java +++ b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/CustomCli.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.maven; import org.apache.maven.cli.MavenCli; diff --git a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/DependencyFileLoader.java b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/DependencyFileLoader.java index c3926e1b0..658b702c6 100644 --- a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/DependencyFileLoader.java +++ b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/DependencyFileLoader.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.maven; import java.io.IOException; diff --git a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/ManualWagonProvider.java b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/ManualWagonProvider.java index ecc03a83e..30dec4906 100644 --- a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/ManualWagonProvider.java +++ b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/ManualWagonProvider.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.maven; /******************************************************************************* diff --git a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenCall.java b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenCall.java index 9db7d4cb5..8e8499db9 100644 --- a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenCall.java +++ b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenCall.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.maven; import java.io.File; diff --git a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenDeployEnvironment.java b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenDeployEnvironment.java index 2522d2f09..cf2f591ac 100644 --- a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenDeployEnvironment.java +++ b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenDeployEnvironment.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.maven; import java.io.File; diff --git a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenFile.java b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenFile.java index 93e242b44..210f3af93 100644 --- a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenFile.java +++ b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenFile.java @@ -1,87 +1,72 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.maven; - -import org.argeo.slc.build.Distribution; -import org.argeo.slc.deploy.DeploymentData; - -public class MavenFile implements Distribution, DeploymentData { - private String groupId; - private String artifactId; - private String version; - private String type; - private String classifier; - private String scope; - - public String getScope() { - return scope; - } - - public void setScope(String scope) { - this.scope = scope; - } - - private String distributionId; - - public String getDistributionId() { - return distributionId; - } - - public void setDistributionId(String distributionId) { - this.distributionId = distributionId; - } - - public String getGroupId() { - return groupId; - } - - public void setGroupId(String groupId) { - this.groupId = groupId; - } - - public String getArtifactId() { - return artifactId; - } - - public void setArtifactId(String artifactId) { - this.artifactId = artifactId; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getClassifier() { - return classifier; - } - - public void setClassifier(String classifier) { - this.classifier = classifier; - } - -} +package org.argeo.slc.maven; + +import org.argeo.slc.build.Distribution; +import org.argeo.slc.deploy.DeploymentData; + +public class MavenFile implements Distribution, DeploymentData { + private String groupId; + private String artifactId; + private String version; + private String type; + private String classifier; + private String scope; + + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + private String distributionId; + + public String getDistributionId() { + return distributionId; + } + + public void setDistributionId(String distributionId) { + this.distributionId = distributionId; + } + + public String getGroupId() { + return groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getArtifactId() { + return artifactId; + } + + public void setArtifactId(String artifactId) { + this.artifactId = artifactId; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getClassifier() { + return classifier; + } + + public void setClassifier(String classifier) { + this.classifier = classifier; + } + +} diff --git a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenManager.java b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenManager.java index 37dabc60e..e4355ecf8 100644 --- a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenManager.java +++ b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenManager.java @@ -1,176 +1,161 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.maven; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.maven.repository.internal.MavenRepositorySystemUtils; -import org.argeo.slc.SlcException; -import org.argeo.slc.aether.AetherUtils; -import org.argeo.slc.aether.ConsoleRepositoryListener; -import org.argeo.slc.aether.ConsoleTransferListener; -import org.codehaus.plexus.PlexusContainer; -import org.eclipse.aether.DefaultRepositorySystemSession; -import org.eclipse.aether.RepositorySystem; -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.artifact.Artifact; -import org.eclipse.aether.artifact.DefaultArtifact; -import org.eclipse.aether.collection.CollectRequest; -import org.eclipse.aether.graph.Dependency; -import org.eclipse.aether.graph.DependencyNode; -import org.eclipse.aether.impl.DefaultServiceLocator; -import org.eclipse.aether.repository.LocalRepository; -import org.eclipse.aether.repository.RemoteRepository; -import org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator; - -public class MavenManager { - private final static Log log = LogFactory.getLog(MavenManager.class); - - public void init() { - try { - testMaven(); - testAether(); - // List> lst = plexusContainer - // .discoverComponents(plexusContainer.getContainerRealm()); - // for (ComponentDescriptor cd : lst) { - // log.debug(cd); - // } - // ArtifactHandler artifactHandler = plexusContainer - // .lookup(ArtifactHandler.class); - // ArtifactRepository localRepository = new - // DefaultArtifactRepositoryFactory().createArtifactRepository("local", - // , layoutId, snapshots, releases); - // Maven maven = mavenCli.getContainer().lookup(Maven.class); - // Artifact artifact = new DefaultArtifact("org.argeo.slc.dist", - // "org.argeo.slc.sdk", "0.13.1-SNAPSHOT", "compile", "pom", - // null, artifactHandler); - // ArtifactResolutionRequest req = new ArtifactResolutionRequest(); - // req.setLocalRepository(localRepository); - // req.setResolveTransitively(true); - // req.setArtifact(artifact); - // ArtifactResolver artifactResolver = plexusContainer - // .lookup(ArtifactResolver.class); - // ArtifactResolutionResult res = artifactResolver.resolve(req); - // Set artifacts = res.getArtifacts(); - // for (Artifact art : artifacts) { - // log.debug(art); - // } - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - public void testMaven() { - Thread.currentThread().setContextClassLoader( - getClass().getClassLoader()); - String[] goals = { "-o", "-e", "-f", - "/home/mbaudier/dev/src/slc/dist/org.argeo.slc.sdk/pom.xml", - "dependency:tree" }; - - // String m2Home = "/opt/apache-maven-3.0.1"; - // System.setProperty("classworlds.conf", m2Home + "/bin/m2.conf"); - // System.setProperty("maven.home", m2Home); - // - // Launcher.main(goals); - - CustomCli mavenCli = new CustomCli(); - mavenCli.doMain(goals, - "/home/mbaudier/dev/src/slc/dist/org.argeo.slc.sdk", - System.out, System.err); - - PlexusContainer plexusContainer = mavenCli.getContainer(); - log.debug(plexusContainer.getContext().getContextData()); - plexusContainer.dispose(); - } - - public void testAether() { - try { - RepositorySystem repoSystem = createRepositorySystem(); - - RepositorySystemSession session = createRepositorySystemSession(repoSystem); - - Dependency dependency = new Dependency(new DefaultArtifact( - "org.argeo.slc.dep:org.argeo.slc.dep.sdk:0.13.1-SNAPSHOT"), - "compile"); -// RemoteRepository argeo = new RemoteRepository("argeo", "default", -// "http://maven.argeo.org/argeo/"); -// RemoteRepository argeoSnapshots = new RemoteRepository( -// "argeo-snapshots", "default", -// "http://dev.argeo.org/maven/argeo-snapshots/"); - RemoteRepository argeo =null; - RemoteRepository argeoSnapshots =null; - - CollectRequest collectRequest = new CollectRequest(); - collectRequest.setRoot(dependency); - collectRequest.addRepository(argeo); - collectRequest.addRepository(argeoSnapshots); - DependencyNode node = repoSystem.collectDependencies(session, - collectRequest).getRoot(); - -// repoSystem.resolveDependencies(session, node, null); - - PreorderNodeListGenerator nlg = new PreorderNodeListGenerator(); - node.accept(nlg); - - for (Artifact artifact : nlg.getArtifacts(true)) { - log.debug(artifact); - } - - AetherUtils.logDependencyNode(0, node); - // System.out.println(nlg.getClassPath()); - - } catch (Exception e) { - throw new SlcException("Cannot resolve", e); - } - - } - - /** Creates a Maven {@link RepositorySystem}. */ - public static RepositorySystem createRepositorySystem() { - try { - DefaultServiceLocator locator = new DefaultServiceLocator(); - -// locator.setServices(WagonProvider.class, new ManualWagonProvider()); -// locator.addService(RepositoryConnectorFactory.class, -// WagonRepositoryConnectorFactory.class); - - return locator.getService(RepositorySystem.class); - } catch (Exception e) { - throw new SlcException("Cannot lookup repository system", e); - } - } - - public static RepositorySystemSession createRepositorySystemSession( - RepositorySystem system) { -// MavenRepositorySystemSession session = new MavenRepositorySystemSession(); - DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession(); - - LocalRepository localRepo = new LocalRepository( - System.getProperty("user.home") + "/.m2/repository"); - session.setLocalRepositoryManager( system.newLocalRepositoryManager( session, localRepo ) ); -// session.setLocalRepositoryManager(system -// .newLocalRepositoryManager(localRepo)); - session.setTransferListener(new ConsoleTransferListener(System.out)); - session.setRepositoryListener(new ConsoleRepositoryListener()); - return session; - } - - public static void main(String[] args) { - new MavenManager().init(); - } - -} +package org.argeo.slc.maven; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.maven.repository.internal.MavenRepositorySystemUtils; +import org.argeo.slc.SlcException; +import org.argeo.slc.aether.AetherUtils; +import org.argeo.slc.aether.ConsoleRepositoryListener; +import org.argeo.slc.aether.ConsoleTransferListener; +import org.codehaus.plexus.PlexusContainer; +import org.eclipse.aether.DefaultRepositorySystemSession; +import org.eclipse.aether.RepositorySystem; +import org.eclipse.aether.RepositorySystemSession; +import org.eclipse.aether.artifact.Artifact; +import org.eclipse.aether.artifact.DefaultArtifact; +import org.eclipse.aether.collection.CollectRequest; +import org.eclipse.aether.graph.Dependency; +import org.eclipse.aether.graph.DependencyNode; +import org.eclipse.aether.impl.DefaultServiceLocator; +import org.eclipse.aether.repository.LocalRepository; +import org.eclipse.aether.repository.RemoteRepository; +import org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator; + +public class MavenManager { + private final static Log log = LogFactory.getLog(MavenManager.class); + + public void init() { + try { + testMaven(); + testAether(); + // List> lst = plexusContainer + // .discoverComponents(plexusContainer.getContainerRealm()); + // for (ComponentDescriptor cd : lst) { + // log.debug(cd); + // } + // ArtifactHandler artifactHandler = plexusContainer + // .lookup(ArtifactHandler.class); + // ArtifactRepository localRepository = new + // DefaultArtifactRepositoryFactory().createArtifactRepository("local", + // , layoutId, snapshots, releases); + // Maven maven = mavenCli.getContainer().lookup(Maven.class); + // Artifact artifact = new DefaultArtifact("org.argeo.slc.dist", + // "org.argeo.slc.sdk", "0.13.1-SNAPSHOT", "compile", "pom", + // null, artifactHandler); + // ArtifactResolutionRequest req = new ArtifactResolutionRequest(); + // req.setLocalRepository(localRepository); + // req.setResolveTransitively(true); + // req.setArtifact(artifact); + // ArtifactResolver artifactResolver = plexusContainer + // .lookup(ArtifactResolver.class); + // ArtifactResolutionResult res = artifactResolver.resolve(req); + // Set artifacts = res.getArtifacts(); + // for (Artifact art : artifacts) { + // log.debug(art); + // } + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + public void testMaven() { + Thread.currentThread().setContextClassLoader( + getClass().getClassLoader()); + String[] goals = { "-o", "-e", "-f", + "/home/mbaudier/dev/src/slc/dist/org.argeo.slc.sdk/pom.xml", + "dependency:tree" }; + + // String m2Home = "/opt/apache-maven-3.0.1"; + // System.setProperty("classworlds.conf", m2Home + "/bin/m2.conf"); + // System.setProperty("maven.home", m2Home); + // + // Launcher.main(goals); + + CustomCli mavenCli = new CustomCli(); + mavenCli.doMain(goals, + "/home/mbaudier/dev/src/slc/dist/org.argeo.slc.sdk", + System.out, System.err); + + PlexusContainer plexusContainer = mavenCli.getContainer(); + log.debug(plexusContainer.getContext().getContextData()); + plexusContainer.dispose(); + } + + public void testAether() { + try { + RepositorySystem repoSystem = createRepositorySystem(); + + RepositorySystemSession session = createRepositorySystemSession(repoSystem); + + Dependency dependency = new Dependency(new DefaultArtifact( + "org.argeo.slc.dep:org.argeo.slc.dep.sdk:0.13.1-SNAPSHOT"), + "compile"); +// RemoteRepository argeo = new RemoteRepository("argeo", "default", +// "http://maven.argeo.org/argeo/"); +// RemoteRepository argeoSnapshots = new RemoteRepository( +// "argeo-snapshots", "default", +// "http://dev.argeo.org/maven/argeo-snapshots/"); + RemoteRepository argeo =null; + RemoteRepository argeoSnapshots =null; + + CollectRequest collectRequest = new CollectRequest(); + collectRequest.setRoot(dependency); + collectRequest.addRepository(argeo); + collectRequest.addRepository(argeoSnapshots); + DependencyNode node = repoSystem.collectDependencies(session, + collectRequest).getRoot(); + +// repoSystem.resolveDependencies(session, node, null); + + PreorderNodeListGenerator nlg = new PreorderNodeListGenerator(); + node.accept(nlg); + + for (Artifact artifact : nlg.getArtifacts(true)) { + log.debug(artifact); + } + + AetherUtils.logDependencyNode(0, node); + // System.out.println(nlg.getClassPath()); + + } catch (Exception e) { + throw new SlcException("Cannot resolve", e); + } + + } + + /** Creates a Maven {@link RepositorySystem}. */ + public static RepositorySystem createRepositorySystem() { + try { + DefaultServiceLocator locator = new DefaultServiceLocator(); + +// locator.setServices(WagonProvider.class, new ManualWagonProvider()); +// locator.addService(RepositoryConnectorFactory.class, +// WagonRepositoryConnectorFactory.class); + + return locator.getService(RepositorySystem.class); + } catch (Exception e) { + throw new SlcException("Cannot lookup repository system", e); + } + } + + public static RepositorySystemSession createRepositorySystemSession( + RepositorySystem system) { +// MavenRepositorySystemSession session = new MavenRepositorySystemSession(); + DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession(); + + LocalRepository localRepo = new LocalRepository( + System.getProperty("user.home") + "/.m2/repository"); + session.setLocalRepositoryManager( system.newLocalRepositoryManager( session, localRepo ) ); +// session.setLocalRepositoryManager(system +// .newLocalRepositoryManager(localRepo)); + session.setTransferListener(new ConsoleTransferListener(System.out)); + session.setRepositoryListener(new ConsoleRepositoryListener()); + return session; + } + + public static void main(String[] args) { + new MavenManager().init(); + } + +} diff --git a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenToUrl.java b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenToUrl.java index 1103e3c00..da1ac71dc 100644 --- a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenToUrl.java +++ b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/MavenToUrl.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.maven; import java.util.ArrayList; diff --git a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/RemoteRepo.java b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/RemoteRepo.java index 196b7c5ad..a3f3bc87c 100644 --- a/org.argeo.slc.support.maven/src/org/argeo/slc/maven/RemoteRepo.java +++ b/org.argeo.slc.support.maven/src/org/argeo/slc/maven/RemoteRepo.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.maven; public class RemoteRepo { diff --git a/org.argeo.slc.support/ext/test/org/argeo/slc/diff/LineTokenizerTest.java b/org.argeo.slc.support/ext/test/org/argeo/slc/diff/LineTokenizerTest.java index 4c7c85817..58ed61a92 100644 --- a/org.argeo.slc.support/ext/test/org/argeo/slc/diff/LineTokenizerTest.java +++ b/org.argeo.slc.support/ext/test/org/argeo/slc/diff/LineTokenizerTest.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; import java.util.List; diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/DataInterpreter.java b/org.argeo.slc.support/src/org/argeo/slc/diff/DataInterpreter.java index 9255c76fe..0f2705d00 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/DataInterpreter.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/DataInterpreter.java @@ -1,35 +1,20 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; - -/** - * Converts data into a format better adapted for comparison. It is typically - * used to convert String into typed format such as - * BigDecimal - */ -public interface DataInterpreter { - /** - * Converts data - * - * @param key - * any object used to differentiate the type of data (e.g. - * column, path) - * @param value - * the data to convert - * @return the converted object - */ - public Object convert(Object key, Object value); -} +package org.argeo.slc.diff; + +/** + * Converts data into a format better adapted for comparison. It is typically + * used to convert String into typed format such as + * BigDecimal + */ +public interface DataInterpreter { + /** + * Converts data + * + * @param key + * any object used to differentiate the type of data (e.g. + * column, path) + * @param value + * the data to convert + * @return the converted object + */ + public Object convert(Object key, Object value); +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/Diff.java b/org.argeo.slc.support/src/org/argeo/slc/diff/Diff.java index 79dd7c499..6bb5f6d8b 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/Diff.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/Diff.java @@ -1,25 +1,10 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; - -import org.springframework.core.io.Resource; - -/** A comparator providing structured information about the differences found. */ -public interface Diff { - /** Performs the comparison. */ - public void compare(Resource expected, Resource reached, - DiffResult diffResult); -} +package org.argeo.slc.diff; + +import org.springframework.core.io.Resource; + +/** A comparator providing structured information about the differences found. */ +public interface Diff { + /** Performs the comparison. */ + public void compare(Resource expected, Resource reached, + DiffResult diffResult); +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffIssue.java b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffIssue.java index eda08e5e9..b390d68c9 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffIssue.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffIssue.java @@ -1,58 +1,43 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; - -/** The root class for issues which happened during a diff. */ -public abstract class DiffIssue implements Comparable { - /** The position of this issue. */ - // Was final and is not anymore in order to persist in hibernate - protected DiffPosition position; - - // hibernate - private long id; - - /** Constructor */ - public DiffIssue(DiffPosition position) { - super(); - this.position = position; - } - - public int compareTo(DiffIssue o) { - return position.compareTo(o.position); - } - - /** The position of this issue within the test file */ - public DiffPosition getPosition() { - return position; - } - - // Hibernate - @SuppressWarnings("unused") - private void setId(long id) { - this.id = id; - } - - @SuppressWarnings("unused") - private long getId() { - return id; - } - - @SuppressWarnings("unused") - private void setPosition(DiffPosition position) { - this.position = position; - } - -} +package org.argeo.slc.diff; + +/** The root class for issues which happened during a diff. */ +public abstract class DiffIssue implements Comparable { + /** The position of this issue. */ + // Was final and is not anymore in order to persist in hibernate + protected DiffPosition position; + + // hibernate + private long id; + + /** Constructor */ + public DiffIssue(DiffPosition position) { + super(); + this.position = position; + } + + public int compareTo(DiffIssue o) { + return position.compareTo(o.position); + } + + /** The position of this issue within the test file */ + public DiffPosition getPosition() { + return position; + } + + // Hibernate + @SuppressWarnings("unused") + private void setId(long id) { + this.id = id; + } + + @SuppressWarnings("unused") + private long getId() { + return id; + } + + @SuppressWarnings("unused") + private void setPosition(DiffPosition position) { + this.position = position; + } + +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffIssueKey.java b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffIssueKey.java index 0be73a5a0..c9dde85cb 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffIssueKey.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffIssueKey.java @@ -1,52 +1,37 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; - -/** Intermediate class that can hold the key to be displayed. */ -public abstract class DiffIssueKey extends DiffIssue { - /** The position of this issue. */ - protected DiffKey key; - - /** Constructor without key */ - public DiffIssueKey(DiffPosition position) { - super(position); - } - - /** Constructor with key */ - public DiffIssueKey(DiffPosition position, DiffKey key) { - super(position); - this.key = key; - } - - public Object getKey() { - return key; - } - - @Override - public String toString() { - if (key != null) { - return key.toString(); - } else { - return ""; - } - } - - // Hibernate - @SuppressWarnings("unused") - private void setKey(DiffKey key) { - this.key = key; - } -} +package org.argeo.slc.diff; + +/** Intermediate class that can hold the key to be displayed. */ +public abstract class DiffIssueKey extends DiffIssue { + /** The position of this issue. */ + protected DiffKey key; + + /** Constructor without key */ + public DiffIssueKey(DiffPosition position) { + super(position); + } + + /** Constructor with key */ + public DiffIssueKey(DiffPosition position, DiffKey key) { + super(position); + this.key = key; + } + + public Object getKey() { + return key; + } + + @Override + public String toString() { + if (key != null) { + return key.toString(); + } else { + return ""; + } + } + + // Hibernate + @SuppressWarnings("unused") + private void setKey(DiffKey key) { + this.key = key; + } +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffKey.java b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffKey.java index 8c2e60d29..89a34963e 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffKey.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffKey.java @@ -1,24 +1,9 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; - -/** - * Object able to uniquely identify an atomic diff part. Used to identify - * missings and left-overs. - */ -public interface DiffKey { - public String toString(); -} +package org.argeo.slc.diff; + +/** + * Object able to uniquely identify an atomic diff part. Used to identify + * missings and left-overs. + */ +public interface DiffKey { + public String toString(); +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffMissing.java b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffMissing.java index 7e7ba248b..adea313ca 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffMissing.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffMissing.java @@ -1,41 +1,26 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; - -/** - * A value missing in one of the file. If its position is related to expected, - * this means it is a left over in the reached, if its position is related to - * the reached it means that it is missing from the reached. If the value is - * null it means that the entire line is missing. - */ -public class DiffMissing extends DiffIssueKey { - - public DiffMissing(DiffPosition position, DiffKey key) { - super(position); - super.key = key; - } - - @Override - public String toString() { - if (position.relatedFile == RelatedFile.EXPECTED) { - return position + ": left over " + super.toString(); - } else if (position.relatedFile == RelatedFile.REACHED) { - return position + ": missing " + super.toString(); - } - return super.toString(); - } - -} +package org.argeo.slc.diff; + +/** + * A value missing in one of the file. If its position is related to expected, + * this means it is a left over in the reached, if its position is related to + * the reached it means that it is missing from the reached. If the value is + * null it means that the entire line is missing. + */ +public class DiffMissing extends DiffIssueKey { + + public DiffMissing(DiffPosition position, DiffKey key) { + super(position); + super.key = key; + } + + @Override + public String toString() { + if (position.relatedFile == RelatedFile.EXPECTED) { + return position + ": left over " + super.toString(); + } else if (position.relatedFile == RelatedFile.REACHED) { + return position + ": missing " + super.toString(); + } + return super.toString(); + } + +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffMissingXml.java b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffMissingXml.java index 50fc7cdb7..c18223788 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffMissingXml.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffMissingXml.java @@ -1,58 +1,43 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; - -/** - * DiffMissing using the XPath of the position as - * DiffKey - */ -public class DiffMissingXml extends DiffMissing { - - public DiffMissingXml(XPathDiffPosition position) { - super(position, new DiffKeyXml(position.getXPath())); - } - - /** Implementation of DiffKey based on an XPath string. */ - protected static class DiffKeyXml implements DiffKey { - private final String xPath; - - public DiffKeyXml(String xPath) { - this.xPath = xPath; - } - - public String getXPath() { - return xPath; - } - - @Override - public String toString() { - return xPath; - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof DiffKeyXml)) - return false; - return xPath.equals(((DiffKeyXml) obj).xPath); - } - - @Override - public int hashCode() { - return xPath.hashCode(); - } - - } -} +package org.argeo.slc.diff; + +/** + * DiffMissing using the XPath of the position as + * DiffKey + */ +public class DiffMissingXml extends DiffMissing { + + public DiffMissingXml(XPathDiffPosition position) { + super(position, new DiffKeyXml(position.getXPath())); + } + + /** Implementation of DiffKey based on an XPath string. */ + protected static class DiffKeyXml implements DiffKey { + private final String xPath; + + public DiffKeyXml(String xPath) { + this.xPath = xPath; + } + + public String getXPath() { + return xPath; + } + + @Override + public String toString() { + return xPath; + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof DiffKeyXml)) + return false; + return xPath.equals(((DiffKeyXml) obj).xPath); + } + + @Override + public int hashCode() { + return xPath.hashCode(); + } + + } +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffNotMatched.java b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffNotMatched.java index 9483dfeff..eba911f9c 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffNotMatched.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffNotMatched.java @@ -1,90 +1,75 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; - -import org.argeo.slc.SlcException; - -/** Diff issue where reached and expected values are different. */ -public class DiffNotMatched extends DiffIssueKey { - - // To enable hibernate persistance, these object cannot be final - // private final Object expected; - // private final Object reached; - - private Object expected; - private Object reached; - - public DiffNotMatched(DiffPosition position, Object expected, Object reached) { - super(position); - this.expected = expected; - this.reached = reached; - } - - public DiffNotMatched(DiffPosition position, Object expected, - Object reached, DiffKey key) { - super(position, key); - this.expected = expected; - this.reached = reached; - } - - public Object getExpected() { - return expected; - } - - public Object getReached() { - return reached; - } - - @Override - public String toString() { - String result = position + ": not matched " + expected + " <> " - + reached; - if (super.key != null) { - result = result + " - Key: " + super.toString(); - } - - return result; - } - - @SuppressWarnings("unused") - private String getExpectedStr() { - if (expected instanceof String) - return (String) expected; - else - throw new SlcException( - "Object 'expected' is of wrong type. Must be a String"); - } - - @SuppressWarnings("unused") - private String getReachedStr() { - if (reached instanceof String) - return (String) reached; - else - throw new SlcException( - "Object 'reached' is of wrong type. Must be a String"); - } - - @SuppressWarnings("unused") - private void setReachedStr(String reachedStr) { - this.reached = reachedStr; - } - - @SuppressWarnings("unused") - private void setExpectedStr(String expectedStr) { - this.expected = expectedStr; - } - -} +package org.argeo.slc.diff; + +import org.argeo.slc.SlcException; + +/** Diff issue where reached and expected values are different. */ +public class DiffNotMatched extends DiffIssueKey { + + // To enable hibernate persistance, these object cannot be final + // private final Object expected; + // private final Object reached; + + private Object expected; + private Object reached; + + public DiffNotMatched(DiffPosition position, Object expected, Object reached) { + super(position); + this.expected = expected; + this.reached = reached; + } + + public DiffNotMatched(DiffPosition position, Object expected, + Object reached, DiffKey key) { + super(position, key); + this.expected = expected; + this.reached = reached; + } + + public Object getExpected() { + return expected; + } + + public Object getReached() { + return reached; + } + + @Override + public String toString() { + String result = position + ": not matched " + expected + " <> " + + reached; + if (super.key != null) { + result = result + " - Key: " + super.toString(); + } + + return result; + } + + @SuppressWarnings("unused") + private String getExpectedStr() { + if (expected instanceof String) + return (String) expected; + else + throw new SlcException( + "Object 'expected' is of wrong type. Must be a String"); + } + + @SuppressWarnings("unused") + private String getReachedStr() { + if (reached instanceof String) + return (String) reached; + else + throw new SlcException( + "Object 'reached' is of wrong type. Must be a String"); + } + + @SuppressWarnings("unused") + private void setReachedStr(String reachedStr) { + this.reached = reachedStr; + } + + @SuppressWarnings("unused") + private void setExpectedStr(String expectedStr) { + this.expected = expectedStr; + } + +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffPosition.java b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffPosition.java index f8ff823f2..9f38d8829 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffPosition.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffPosition.java @@ -1,47 +1,32 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; - -/** The position of a diff issue within the test resource. */ -public abstract class DiffPosition implements Comparable { - protected RelatedFile relatedFile; - - public DiffPosition(RelatedFile relatedFile) { - super(); - this.relatedFile = relatedFile; - } - - // For Hibernate - DiffPosition() { - } - - public RelatedFile getRelatedFile() { - return relatedFile; - } - - // Added to enable the new data model for persisting TabularDiffTestResult - @SuppressWarnings("unused") - private Boolean getIsReached() { - return relatedFile.equals(RelatedFile.REACHED); - } - - @SuppressWarnings("unused") - private void setIsReached(Boolean isReached) { - this.relatedFile = (isReached ? RelatedFile.REACHED - : RelatedFile.EXPECTED); - } - -} +package org.argeo.slc.diff; + +/** The position of a diff issue within the test resource. */ +public abstract class DiffPosition implements Comparable { + protected RelatedFile relatedFile; + + public DiffPosition(RelatedFile relatedFile) { + super(); + this.relatedFile = relatedFile; + } + + // For Hibernate + DiffPosition() { + } + + public RelatedFile getRelatedFile() { + return relatedFile; + } + + // Added to enable the new data model for persisting TabularDiffTestResult + @SuppressWarnings("unused") + private Boolean getIsReached() { + return relatedFile.equals(RelatedFile.REACHED); + } + + @SuppressWarnings("unused") + private void setIsReached(Boolean isReached) { + this.relatedFile = (isReached ? RelatedFile.REACHED + : RelatedFile.EXPECTED); + } + +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffResult.java b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffResult.java index 8cdcf7e1d..8c0f9e2f0 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/DiffResult.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/DiffResult.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; /** diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/KeyColumnsDiff.java b/org.argeo.slc.support/src/org/argeo/slc/diff/KeyColumnsDiff.java index 8ba832d4c..764732179 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/KeyColumnsDiff.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/KeyColumnsDiff.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; import java.util.List; diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/LineTokenizer.java b/org.argeo.slc.support/src/org/argeo/slc/diff/LineTokenizer.java index baaa3b966..fed4c37b5 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/LineTokenizer.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/LineTokenizer.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; import java.util.ArrayList; diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/RelatedFile.java b/org.argeo.slc.support/src/org/argeo/slc/diff/RelatedFile.java index e2887ba02..09b103338 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/RelatedFile.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/RelatedFile.java @@ -1,24 +1,9 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; - -/** Enumeration of the types of resource tested. */ -public enum RelatedFile { - /** The expected resource */ - EXPECTED, - /** The reached resource */ - REACHED -} +package org.argeo.slc.diff; + +/** Enumeration of the types of resource tested. */ +public enum RelatedFile { + /** The expected resource */ + EXPECTED, + /** The reached resource */ + REACHED +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/TableDiffPosition.java b/org.argeo.slc.support/src/org/argeo/slc/diff/TableDiffPosition.java index 7d5aa3ed3..a68384354 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/TableDiffPosition.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/TableDiffPosition.java @@ -1,101 +1,86 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; - -import org.argeo.slc.UnsupportedException; - -/** - * A diff position within a table structure such a CSV file or an SQL result - * set. - */ -public class TableDiffPosition extends DiffPosition { - private Integer line; - /** Can be null */ - private Integer column; - /** Can be null */ - private String columnName; - - public TableDiffPosition(RelatedFile relatedFile, Integer line, - Integer column, String columnName) { - super(relatedFile); - this.line = line; - this.column = column; - this.columnName = columnName; - } - - @SuppressWarnings("unused") - private TableDiffPosition() { - } - - public Integer getLine() { - return line; - } - - public Integer getColumn() { - return column; - } - - public String getColumnName() { - return columnName; - } - - public int compareTo(DiffPosition dp) { - if (!(dp instanceof TableDiffPosition)) - throw new UnsupportedException("position", dp); - - TableDiffPosition o = (TableDiffPosition) dp; - if (relatedFile.equals(o.relatedFile)) { - if (line == o.line) { - return column.compareTo(o.column); - } else { - return line.compareTo(o.line); - } - } else { - return relatedFile.compareTo(o.relatedFile); - } - } - - @Override - public String toString() { - StringBuffer buf = new StringBuffer(""); - buf.append(relatedFile).append('[').append(line); - if (column != null) { - buf.append(',').append(column); - if (columnName != null) { - buf.append('-').append(columnName); - } - } - buf.append(']'); - return buf.toString(); - } - - // Hibernate - @SuppressWarnings("unused") - private void setLine(Integer line) { - this.line = line; - } - - @SuppressWarnings("unused") - private void setColumn(Integer column) { - this.column = column; - } - - @SuppressWarnings("unused") - private void setColumnName(String columnName) { - this.columnName = columnName; - } - -} +package org.argeo.slc.diff; + +import org.argeo.slc.UnsupportedException; + +/** + * A diff position within a table structure such a CSV file or an SQL result + * set. + */ +public class TableDiffPosition extends DiffPosition { + private Integer line; + /** Can be null */ + private Integer column; + /** Can be null */ + private String columnName; + + public TableDiffPosition(RelatedFile relatedFile, Integer line, + Integer column, String columnName) { + super(relatedFile); + this.line = line; + this.column = column; + this.columnName = columnName; + } + + @SuppressWarnings("unused") + private TableDiffPosition() { + } + + public Integer getLine() { + return line; + } + + public Integer getColumn() { + return column; + } + + public String getColumnName() { + return columnName; + } + + public int compareTo(DiffPosition dp) { + if (!(dp instanceof TableDiffPosition)) + throw new UnsupportedException("position", dp); + + TableDiffPosition o = (TableDiffPosition) dp; + if (relatedFile.equals(o.relatedFile)) { + if (line == o.line) { + return column.compareTo(o.column); + } else { + return line.compareTo(o.line); + } + } else { + return relatedFile.compareTo(o.relatedFile); + } + } + + @Override + public String toString() { + StringBuffer buf = new StringBuffer(""); + buf.append(relatedFile).append('[').append(line); + if (column != null) { + buf.append(',').append(column); + if (columnName != null) { + buf.append('-').append(columnName); + } + } + buf.append(']'); + return buf.toString(); + } + + // Hibernate + @SuppressWarnings("unused") + private void setLine(Integer line) { + this.line = line; + } + + @SuppressWarnings("unused") + private void setColumn(Integer column) { + this.column = column; + } + + @SuppressWarnings("unused") + private void setColumnName(String columnName) { + this.columnName = columnName; + } + +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/Tolerance.java b/org.argeo.slc.support/src/org/argeo/slc/diff/Tolerance.java index 625699ca7..6bddd1da3 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/Tolerance.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/Tolerance.java @@ -1,33 +1,18 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; - -/** Compares objects, eventually using tolerance mechanisms. */ -public interface Tolerance { - /** - * Compares objects - * - * @param key - * any object used to differentiate the type of data (e.g. - * column, path) - * @param expected - * the expected value - * @param reached - * the reached value - * @return the converted object - */ - public Boolean compare(Object key, Object expected, Object reached); -} +package org.argeo.slc.diff; + +/** Compares objects, eventually using tolerance mechanisms. */ +public interface Tolerance { + /** + * Compares objects + * + * @param key + * any object used to differentiate the type of data (e.g. + * column, path) + * @param expected + * the expected value + * @param reached + * the reached value + * @return the converted object + */ + public Boolean compare(Object key, Object expected, Object reached); +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/ToleranceDiff.java b/org.argeo.slc.support/src/org/argeo/slc/diff/ToleranceDiff.java index 798b658e6..8260889df 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/ToleranceDiff.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/ToleranceDiff.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; import java.util.Map; diff --git a/org.argeo.slc.support/src/org/argeo/slc/diff/XPathDiffPosition.java b/org.argeo.slc.support/src/org/argeo/slc/diff/XPathDiffPosition.java index a1ddb6edb..b119421d6 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/diff/XPathDiffPosition.java +++ b/org.argeo.slc.support/src/org/argeo/slc/diff/XPathDiffPosition.java @@ -1,50 +1,35 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.diff; - -import org.argeo.slc.UnsupportedException; - -/** A diff position within an Xml file. NOT YET IMPLEMENTED. */ -public class XPathDiffPosition extends DiffPosition { - - private String xPath; - - public XPathDiffPosition(RelatedFile relatedFile, String path) { - super(relatedFile); - xPath = path; - } - - public int compareTo(DiffPosition dp) { - if (!(dp instanceof XPathDiffPosition)) - throw new UnsupportedException("position", dp); - - XPathDiffPosition o = (XPathDiffPosition) dp; - if (relatedFile.equals(o.relatedFile)) { - return xPath.compareTo(o.xPath); - } else { - return relatedFile.compareTo(o.relatedFile); - } - } - - public String getXPath() { - return xPath; - } - - @Override - public String toString() { - return xPath; - } -} +package org.argeo.slc.diff; + +import org.argeo.slc.UnsupportedException; + +/** A diff position within an Xml file. NOT YET IMPLEMENTED. */ +public class XPathDiffPosition extends DiffPosition { + + private String xPath; + + public XPathDiffPosition(RelatedFile relatedFile, String path) { + super(relatedFile); + xPath = path; + } + + public int compareTo(DiffPosition dp) { + if (!(dp instanceof XPathDiffPosition)) + throw new UnsupportedException("position", dp); + + XPathDiffPosition o = (XPathDiffPosition) dp; + if (relatedFile.equals(o.relatedFile)) { + return xPath.compareTo(o.xPath); + } else { + return relatedFile.compareTo(o.relatedFile); + } + } + + public String getXPath() { + return xPath; + } + + @Override + public String toString() { + return xPath; + } +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/jsch/AbstractJschTask.java b/org.argeo.slc.support/src/org/argeo/slc/jsch/AbstractJschTask.java index 2dbcd84e7..59c0acfae 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/jsch/AbstractJschTask.java +++ b/org.argeo.slc.support/src/org/argeo/slc/jsch/AbstractJschTask.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jsch; import java.io.IOException; diff --git a/org.argeo.slc.support/src/org/argeo/slc/jsch/CallbackHandlerUserInfo.java b/org.argeo.slc.support/src/org/argeo/slc/jsch/CallbackHandlerUserInfo.java index ab358aa9e..c069a8189 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/jsch/CallbackHandlerUserInfo.java +++ b/org.argeo.slc.support/src/org/argeo/slc/jsch/CallbackHandlerUserInfo.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jsch; import javax.security.auth.callback.Callback; diff --git a/org.argeo.slc.support/src/org/argeo/slc/jsch/JschContextSession.java b/org.argeo.slc.support/src/org/argeo/slc/jsch/JschContextSession.java index 44d0bcce3..8855beb7c 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/jsch/JschContextSession.java +++ b/org.argeo.slc.support/src/org/argeo/slc/jsch/JschContextSession.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jsch; import org.apache.commons.logging.Log; diff --git a/org.argeo.slc.support/src/org/argeo/slc/jsch/JschExecutor.java b/org.argeo.slc.support/src/org/argeo/slc/jsch/JschExecutor.java index b15694cbb..b9d5f55c7 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/jsch/JschExecutor.java +++ b/org.argeo.slc.support/src/org/argeo/slc/jsch/JschExecutor.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jsch; import java.io.File; diff --git a/org.argeo.slc.support/src/org/argeo/slc/jsch/JschMultiTasks.java b/org.argeo.slc.support/src/org/argeo/slc/jsch/JschMultiTasks.java index 40d4034bb..3dcba87c3 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/jsch/JschMultiTasks.java +++ b/org.argeo.slc.support/src/org/argeo/slc/jsch/JschMultiTasks.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jsch; import java.util.ArrayList; diff --git a/org.argeo.slc.support/src/org/argeo/slc/jsch/RemoteExec.java b/org.argeo.slc.support/src/org/argeo/slc/jsch/RemoteExec.java index 691d0d633..886dc92b2 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/jsch/RemoteExec.java +++ b/org.argeo.slc.support/src/org/argeo/slc/jsch/RemoteExec.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jsch; import java.io.BufferedReader; diff --git a/org.argeo.slc.support/src/org/argeo/slc/jsch/ScpFrom.java b/org.argeo.slc.support/src/org/argeo/slc/jsch/ScpFrom.java index 3f83778a8..ced80eee0 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/jsch/ScpFrom.java +++ b/org.argeo.slc.support/src/org/argeo/slc/jsch/ScpFrom.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jsch; import java.io.File; diff --git a/org.argeo.slc.support/src/org/argeo/slc/jsch/ScpTo.java b/org.argeo.slc.support/src/org/argeo/slc/jsch/ScpTo.java index c0af991a7..5da5f79e7 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/jsch/ScpTo.java +++ b/org.argeo.slc.support/src/org/argeo/slc/jsch/ScpTo.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jsch; import java.io.ByteArrayInputStream; diff --git a/org.argeo.slc.support/src/org/argeo/slc/jsch/SimpleUserInfo.java b/org.argeo.slc.support/src/org/argeo/slc/jsch/SimpleUserInfo.java index cabeeb26d..fd84224ad 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/jsch/SimpleUserInfo.java +++ b/org.argeo.slc.support/src/org/argeo/slc/jsch/SimpleUserInfo.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jsch; import java.io.IOException; diff --git a/org.argeo.slc.support/src/org/argeo/slc/jsch/SshFilesDeployment.java b/org.argeo.slc.support/src/org/argeo/slc/jsch/SshFilesDeployment.java index 9254d7c7a..53670e14d 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/jsch/SshFilesDeployment.java +++ b/org.argeo.slc.support/src/org/argeo/slc/jsch/SshFilesDeployment.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jsch; import java.util.ArrayList; diff --git a/org.argeo.slc.support/src/org/argeo/slc/jsch/SshShell.java b/org.argeo.slc.support/src/org/argeo/slc/jsch/SshShell.java index cb1b7241a..2ec2b72a1 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/jsch/SshShell.java +++ b/org.argeo.slc.support/src/org/argeo/slc/jsch/SshShell.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jsch; import java.io.BufferedReader; diff --git a/org.argeo.slc.support/src/org/argeo/slc/jsch/SshTarget.java b/org.argeo.slc.support/src/org/argeo/slc/jsch/SshTarget.java index eeebbc6e8..f328f8fbe 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/jsch/SshTarget.java +++ b/org.argeo.slc.support/src/org/argeo/slc/jsch/SshTarget.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jsch; import java.io.File; diff --git a/org.argeo.slc.support/src/org/argeo/slc/jsch/SwingUserInfo.java b/org.argeo.slc.support/src/org/argeo/slc/jsch/SwingUserInfo.java index 963cbab38..14eb16b6d 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/jsch/SwingUserInfo.java +++ b/org.argeo.slc.support/src/org/argeo/slc/jsch/SwingUserInfo.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.jsch; import java.awt.Container; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/jcr/JcrRepositoryBackup.java b/org.argeo.slc.support/src/org/argeo/slc/lib/jcr/JcrRepositoryBackup.java index e1467543a..977bf8786 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/jcr/JcrRepositoryBackup.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/jcr/JcrRepositoryBackup.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.jcr; import java.util.UUID; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/DefaultRedhatDeploymentData.java b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/DefaultRedhatDeploymentData.java index 641e40471..e93b99b8b 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/DefaultRedhatDeploymentData.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/DefaultRedhatDeploymentData.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.linux; import org.argeo.slc.core.deploy.MultiResourceSet; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/DefaultRpmDistribution.java b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/DefaultRpmDistribution.java index 0e51a236f..5722bc100 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/DefaultRpmDistribution.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/DefaultRpmDistribution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.linux; import java.util.List; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/RedhatDeploymentData.java b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/RedhatDeploymentData.java index e62bb1cbb..39592b7a7 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/RedhatDeploymentData.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/RedhatDeploymentData.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.linux; import org.argeo.slc.core.deploy.ResourceSet; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/RedhatHostManager.java b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/RedhatHostManager.java index a59b6645f..8b1c5e505 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/RedhatHostManager.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/RedhatHostManager.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.linux; import org.argeo.slc.SlcException; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/RpmDistribution.java b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/RpmDistribution.java index 6b4d9b5e5..66e796905 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/RpmDistribution.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/RpmDistribution.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.linux; import java.util.List; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/ScriptCall.java b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/ScriptCall.java index d4f664add..755fa0cf8 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/ScriptCall.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/ScriptCall.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.linux; import java.io.File; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/SimpleLinuxHost.java b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/SimpleLinuxHost.java index b25e9f40e..d51497a63 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/SimpleLinuxHost.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/SimpleLinuxHost.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.linux; import org.argeo.slc.build.Distribution; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/BuildInMock.java b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/BuildInMock.java index 1bafe8c77..44c4e0c94 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/BuildInMock.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/BuildInMock.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.linux.rpmfactory; import java.io.File; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/CreateSrpm.java b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/CreateSrpm.java index b5f7bd07d..04680df7b 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/CreateSrpm.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/CreateSrpm.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.linux.rpmfactory; import java.io.File; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/ImportSrpm.java b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/ImportSrpm.java index cd170e30d..e00560832 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/ImportSrpm.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/ImportSrpm.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.linux.rpmfactory; import java.io.File; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/RpmBuildEnvironment.java b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/RpmBuildEnvironment.java index a5c1fc7de..17a1f270b 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/RpmBuildEnvironment.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/RpmBuildEnvironment.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.linux.rpmfactory; import java.io.File; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/RpmSpecFile.java b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/RpmSpecFile.java index f2486549c..899603a7b 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/RpmSpecFile.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/linux/rpmfactory/RpmSpecFile.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.linux.rpmfactory; import java.io.IOException; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxMachine.java b/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxMachine.java index cf30bbb02..2b561b6a8 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxMachine.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxMachine.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.vbox; import org.argeo.slc.UnsupportedException; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxManager.java b/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxManager.java index 34e8993f8..9992d77f5 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxManager.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxManager.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.vbox; import java.io.IOException; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxNat.java b/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxNat.java index e69eba111..2661009ef 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxNat.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxNat.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.vbox; import java.util.Map; diff --git a/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxPortMapping.java b/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxPortMapping.java index dc9783fa6..64ec86636 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxPortMapping.java +++ b/org.argeo.slc.support/src/org/argeo/slc/lib/vbox/VBoxPortMapping.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.lib.vbox; /** The mapping of one port. */ diff --git a/org.argeo.slc.support/src/org/argeo/slc/log4j/SlcExecutionAppender.java b/org.argeo.slc.support/src/org/argeo/slc/log4j/SlcExecutionAppender.java index 6652fa0dc..2a9ea5f3d 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/log4j/SlcExecutionAppender.java +++ b/org.argeo.slc.support/src/org/argeo/slc/log4j/SlcExecutionAppender.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.log4j; import java.util.Date; diff --git a/org.argeo.slc.support/src/org/argeo/slc/mail/SendMail.java b/org.argeo.slc.support/src/org/argeo/slc/mail/SendMail.java index d2e2780ff..db4ab45f9 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/mail/SendMail.java +++ b/org.argeo.slc.support/src/org/argeo/slc/mail/SendMail.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.mail; import java.util.HashMap; diff --git a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdApplicationDeployment.java b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdApplicationDeployment.java index d7489ee32..804f2805d 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdApplicationDeployment.java +++ b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdApplicationDeployment.java @@ -1,83 +1,68 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.support.deploy; - -import java.io.File; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.slc.SlcException; -import org.argeo.slc.build.Distribution; -import org.argeo.slc.deploy.DeployEnvironment; -import org.argeo.slc.deploy.DeployedSystem; -import org.argeo.slc.deploy.Deployment; -import org.argeo.slc.deploy.DeploymentData; -import org.argeo.slc.deploy.TargetData; - -public class HttpdApplicationDeployment implements Deployment { - private static final Log log = LogFactory - .getLog(HttpdApplicationDeployment.class); - - private HttpdApplicationTargetData targetData; - private DeploymentData deploymentData; - private SimpleHttpdApplication deployedSystem; - private Distribution distribution; - - private DeployEnvironment deployEnvironment; - - public void run() { - try { - deployEnvironment.unpackTo(distribution, targetData - .getTargetRootLocation(), null); - - // FIXME: make it generic - String deployDataPath = targetData.getTargetRootLocation() - .getCanonicalPath(); - - deployEnvironment.unpackTo(deploymentData, - new File(deployDataPath), null); - deployedSystem = new SimpleHttpdApplication(); - deployedSystem.setTargetData(targetData); - - log.info("Deployed " + distribution + " to " + targetData); - } catch (Exception e) { - throw new SlcException("Cannot deploy " + distribution + " to " - + targetData, e); - } - - } - - public void setTargetData(TargetData targetData) { - this.targetData = (HttpdApplicationTargetData) targetData; - } - - public void setDeploymentData(DeploymentData deploymentData) { - this.deploymentData = deploymentData; - } - - public DeployedSystem getDeployedSystem() { - return deployedSystem; - } - - public void setDistribution(Distribution distribution) { - this.distribution = distribution; - } - - public void setDeployEnvironment(DeployEnvironment deployEnvironment) { - this.deployEnvironment = deployEnvironment; - } - -} +package org.argeo.slc.support.deploy; + +import java.io.File; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.argeo.slc.SlcException; +import org.argeo.slc.build.Distribution; +import org.argeo.slc.deploy.DeployEnvironment; +import org.argeo.slc.deploy.DeployedSystem; +import org.argeo.slc.deploy.Deployment; +import org.argeo.slc.deploy.DeploymentData; +import org.argeo.slc.deploy.TargetData; + +public class HttpdApplicationDeployment implements Deployment { + private static final Log log = LogFactory + .getLog(HttpdApplicationDeployment.class); + + private HttpdApplicationTargetData targetData; + private DeploymentData deploymentData; + private SimpleHttpdApplication deployedSystem; + private Distribution distribution; + + private DeployEnvironment deployEnvironment; + + public void run() { + try { + deployEnvironment.unpackTo(distribution, targetData + .getTargetRootLocation(), null); + + // FIXME: make it generic + String deployDataPath = targetData.getTargetRootLocation() + .getCanonicalPath(); + + deployEnvironment.unpackTo(deploymentData, + new File(deployDataPath), null); + deployedSystem = new SimpleHttpdApplication(); + deployedSystem.setTargetData(targetData); + + log.info("Deployed " + distribution + " to " + targetData); + } catch (Exception e) { + throw new SlcException("Cannot deploy " + distribution + " to " + + targetData, e); + } + + } + + public void setTargetData(TargetData targetData) { + this.targetData = (HttpdApplicationTargetData) targetData; + } + + public void setDeploymentData(DeploymentData deploymentData) { + this.deploymentData = deploymentData; + } + + public DeployedSystem getDeployedSystem() { + return deployedSystem; + } + + public void setDistribution(Distribution distribution) { + this.distribution = distribution; + } + + public void setDeployEnvironment(DeployEnvironment deployEnvironment) { + this.deployEnvironment = deployEnvironment; + } + +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdApplicationTargetData.java b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdApplicationTargetData.java index 3bc08c72d..7b052ec62 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdApplicationTargetData.java +++ b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdApplicationTargetData.java @@ -1,80 +1,65 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.support.deploy; - -import java.io.File; -import java.net.MalformedURLException; -import java.net.URL; - -import org.argeo.slc.SlcException; -import org.argeo.slc.deploy.TargetData; - -public class HttpdApplicationTargetData implements TargetData { - private HttpdServer webServer; - private String relativePath; - private String targetRootPath; - - public HttpdServer getWebServer() { - return webServer; - } - - public void setWebServer(HttpdServer webServer) { - this.webServer = webServer; - } - - public String getRelativePath() { - return relativePath; - } - - /** - * If targetRootLocation not set, used to build the targetRootLocation, - * relative to the webserver base. - */ - public void setRelativePath(String relativePath) { - this.relativePath = relativePath; - } - - public String getTargetRootPath() { - return targetRootPath; - } - - public void setTargetRootPath(String targetRootPath) { - this.targetRootPath = targetRootPath; - } - - public URL getTargetBaseUrl() { - try { - URL wsUrl = getWebServer().getBaseUrl(); - // TODO: use URI - return new URL(wsUrl, wsUrl.getFile() + '/' + relativePath); - } catch (MalformedURLException e) { - throw new SlcException("Cannot get base url for " + relativePath, e); - } - } - - public File getTargetRootLocation() { - if (targetRootPath != null && !targetRootPath.equals("")) { - return new File(targetRootPath); - } else { - HttpdServerTargetData targetData = (HttpdServerTargetData) getWebServer() - .getTargetData(); - String path = targetData.getServerRoot() + File.separator - + getRelativePath(); - return new File(path); - } - } - -} +package org.argeo.slc.support.deploy; + +import java.io.File; +import java.net.MalformedURLException; +import java.net.URL; + +import org.argeo.slc.SlcException; +import org.argeo.slc.deploy.TargetData; + +public class HttpdApplicationTargetData implements TargetData { + private HttpdServer webServer; + private String relativePath; + private String targetRootPath; + + public HttpdServer getWebServer() { + return webServer; + } + + public void setWebServer(HttpdServer webServer) { + this.webServer = webServer; + } + + public String getRelativePath() { + return relativePath; + } + + /** + * If targetRootLocation not set, used to build the targetRootLocation, + * relative to the webserver base. + */ + public void setRelativePath(String relativePath) { + this.relativePath = relativePath; + } + + public String getTargetRootPath() { + return targetRootPath; + } + + public void setTargetRootPath(String targetRootPath) { + this.targetRootPath = targetRootPath; + } + + public URL getTargetBaseUrl() { + try { + URL wsUrl = getWebServer().getBaseUrl(); + // TODO: use URI + return new URL(wsUrl, wsUrl.getFile() + '/' + relativePath); + } catch (MalformedURLException e) { + throw new SlcException("Cannot get base url for " + relativePath, e); + } + } + + public File getTargetRootLocation() { + if (targetRootPath != null && !targetRootPath.equals("")) { + return new File(targetRootPath); + } else { + HttpdServerTargetData targetData = (HttpdServerTargetData) getWebServer() + .getTargetData(); + String path = targetData.getServerRoot() + File.separator + + getRelativePath(); + return new File(path); + } + } + +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServer.java b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServer.java index 9416f2172..5fa4e9b59 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServer.java +++ b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServer.java @@ -1,65 +1,50 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.support.deploy; - -import java.io.IOException; -import java.net.URL; - -import org.argeo.slc.SlcException; -import org.argeo.slc.build.Distribution; -import org.argeo.slc.deploy.DeploymentData; -import org.argeo.slc.deploy.TargetData; - -public class HttpdServer implements WebServer { - private HttpdServerTargetData targetData; - private HttpdServerDeploymentData deploymentData; - - public URL getBaseUrl() { - try { - return new URL("http://localhost:" + targetData.getPort()); - } catch (IOException e) { - throw new SlcException("Cannot get url for Httpd server " - + getDeployedSystemId(), e); - } - } - - public String getDeployedSystemId() { - // TODO Auto-generated method stub - return null; - } - - public Distribution getDistribution() { - // TODO Auto-generated method stub - return null; - } - - public DeploymentData getDeploymentData() { - return deploymentData; - } - - public TargetData getTargetData() { - return targetData; - } - - public void setTargetData(TargetData targetData) { - this.targetData = (HttpdServerTargetData)targetData; - } - - public void setDeploymentData(DeploymentData deploymentData) { - this.deploymentData = (HttpdServerDeploymentData)deploymentData; - } - -} +package org.argeo.slc.support.deploy; + +import java.io.IOException; +import java.net.URL; + +import org.argeo.slc.SlcException; +import org.argeo.slc.build.Distribution; +import org.argeo.slc.deploy.DeploymentData; +import org.argeo.slc.deploy.TargetData; + +public class HttpdServer implements WebServer { + private HttpdServerTargetData targetData; + private HttpdServerDeploymentData deploymentData; + + public URL getBaseUrl() { + try { + return new URL("http://localhost:" + targetData.getPort()); + } catch (IOException e) { + throw new SlcException("Cannot get url for Httpd server " + + getDeployedSystemId(), e); + } + } + + public String getDeployedSystemId() { + // TODO Auto-generated method stub + return null; + } + + public Distribution getDistribution() { + // TODO Auto-generated method stub + return null; + } + + public DeploymentData getDeploymentData() { + return deploymentData; + } + + public TargetData getTargetData() { + return targetData; + } + + public void setTargetData(TargetData targetData) { + this.targetData = (HttpdServerTargetData)targetData; + } + + public void setDeploymentData(DeploymentData deploymentData) { + this.deploymentData = (HttpdServerDeploymentData)deploymentData; + } + +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerDeployment.java b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerDeployment.java index f7915d8a2..785510fe9 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerDeployment.java +++ b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerDeployment.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.support.deploy; import org.argeo.slc.build.Distribution; diff --git a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerDeploymentData.java b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerDeploymentData.java index fd9b681d9..668ee390e 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerDeploymentData.java +++ b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerDeploymentData.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.support.deploy; import org.argeo.slc.deploy.DeploymentData; diff --git a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerManager.java b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerManager.java index 3fd76ed9d..20b78591f 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerManager.java +++ b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerManager.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.support.deploy; import java.io.BufferedReader; diff --git a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerTargetData.java b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerTargetData.java index fa4e3f94d..e4f28ca3c 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerTargetData.java +++ b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/HttpdServerTargetData.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.support.deploy; import org.argeo.slc.deploy.InstalledExecutables; diff --git a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/SimpleHttpdApplication.java b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/SimpleHttpdApplication.java index 45c67f46e..b5157f60d 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/SimpleHttpdApplication.java +++ b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/SimpleHttpdApplication.java @@ -1,62 +1,47 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.support.deploy; - -import java.io.File; -import java.net.URL; - -import org.argeo.slc.build.Distribution; -import org.argeo.slc.deploy.DeploymentData; - -public class SimpleHttpdApplication implements WebApplication { - private HttpdApplicationTargetData targetData; - private Distribution distribution; - - public void setDistribution(Distribution distribution) { - this.distribution = distribution; - } - - public URL getBaseUrl() { - return targetData.getTargetBaseUrl(); - } - - public File getRootLocation() { - return targetData.getTargetRootLocation(); - } - - public String getDeployedSystemId() { - // TODO Auto-generated method stub - return null; - } - - public HttpdApplicationTargetData getTargetData() { - return targetData; - } - - public void setTargetData(HttpdApplicationTargetData targetData) { - this.targetData = targetData; - } - - public Distribution getDistribution() { - return distribution; - } - - public DeploymentData getDeploymentData() { - // TODO Auto-generated method stub - return null; - } - -} +package org.argeo.slc.support.deploy; + +import java.io.File; +import java.net.URL; + +import org.argeo.slc.build.Distribution; +import org.argeo.slc.deploy.DeploymentData; + +public class SimpleHttpdApplication implements WebApplication { + private HttpdApplicationTargetData targetData; + private Distribution distribution; + + public void setDistribution(Distribution distribution) { + this.distribution = distribution; + } + + public URL getBaseUrl() { + return targetData.getTargetBaseUrl(); + } + + public File getRootLocation() { + return targetData.getTargetRootLocation(); + } + + public String getDeployedSystemId() { + // TODO Auto-generated method stub + return null; + } + + public HttpdApplicationTargetData getTargetData() { + return targetData; + } + + public void setTargetData(HttpdApplicationTargetData targetData) { + this.targetData = targetData; + } + + public Distribution getDistribution() { + return distribution; + } + + public DeploymentData getDeploymentData() { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/WebApplication.java b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/WebApplication.java index 6d1b38d91..1d8275408 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/WebApplication.java +++ b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/WebApplication.java @@ -1,27 +1,12 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.support.deploy; - -import java.io.File; -import java.net.URL; - -import org.argeo.slc.deploy.DeployedSystem; - -public interface WebApplication extends DeployedSystem { - public URL getBaseUrl(); - - public File getRootLocation(); -} +package org.argeo.slc.support.deploy; + +import java.io.File; +import java.net.URL; + +import org.argeo.slc.deploy.DeployedSystem; + +public interface WebApplication extends DeployedSystem { + public URL getBaseUrl(); + + public File getRootLocation(); +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/WebServer.java b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/WebServer.java index f1dbc10c9..afce096c9 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/WebServer.java +++ b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/WebServer.java @@ -1,24 +1,9 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.support.deploy; - -import java.net.URL; - -import org.argeo.slc.deploy.DeployedSystem; - -public interface WebServer extends DeployedSystem { - public URL getBaseUrl(); -} +package org.argeo.slc.support.deploy; + +import java.net.URL; + +import org.argeo.slc.deploy.DeployedSystem; + +public interface WebServer extends DeployedSystem { + public URL getBaseUrl(); +} diff --git a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/db/DbModel.java b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/db/DbModel.java index 49f651b82..6140d7bc0 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/db/DbModel.java +++ b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/db/DbModel.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.support.deploy.db; import java.sql.Connection; diff --git a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/db/JdbcAware.java b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/db/JdbcAware.java index 5c1093998..0d4de5eae 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/db/JdbcAware.java +++ b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/db/JdbcAware.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.support.deploy.db; import javax.sql.DataSource; diff --git a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/db/SimpleJdbcDatabase.java b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/db/SimpleJdbcDatabase.java index 5ff7ab8ff..4f1520955 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/support/deploy/db/SimpleJdbcDatabase.java +++ b/org.argeo.slc.support/src/org/argeo/slc/support/deploy/db/SimpleJdbcDatabase.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.support.deploy.db; import javax.sql.DataSource; diff --git a/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResource.java b/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResource.java index 920fb8b49..7c0c7e9b0 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResource.java +++ b/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResource.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.vfs; import java.io.File; diff --git a/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResourceFactory.java b/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResourceFactory.java index 6a3b6cab2..ac92adfb5 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResourceFactory.java +++ b/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResourceFactory.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.vfs; import org.apache.commons.vfs2.CacheStrategy; diff --git a/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResourceSet.java b/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResourceSet.java index 8adb27629..a56b43140 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResourceSet.java +++ b/org.argeo.slc.support/src/org/argeo/slc/vfs/VfsResourceSet.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.vfs; import java.util.HashMap; diff --git a/pom.xml b/pom.xml index 468e7426c..16378dcca 100644 --- a/pom.xml +++ b/pom.xml @@ -67,6 +67,9 @@ scm:git:https://code.argeo.org/git/lgpl/argeo-slc.git HEAD + + Argeo GmbH + 2007 diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/DefaultNLS.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/DefaultNLS.java index 1d3cd29e8..fbb4fbf83 100644 --- a/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/DefaultNLS.java +++ b/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/DefaultNLS.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.eclipse.ui.specific; /** RCP specific {@link NLS} to be extended */ diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java index 7ed0a4f22..315aa3bbf 100644 --- a/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java +++ b/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.eclipse.ui.specific; import org.eclipse.jface.viewers.ColumnViewer; diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/OpenFile.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/OpenFile.java index 863082ac3..e22c95ed1 100644 --- a/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/OpenFile.java +++ b/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/OpenFile.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * 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.eclipse.ui.specific; import static org.argeo.eclipse.ui.util.SingleSourcingConstants.FILE_SCHEME; -- 2.39.2