From 8a01e42cd1a963be1f37d444f15e09512dc7d07f Mon Sep 17 00:00:00 2001 From: Bruno Sinou Date: Thu, 15 Sep 2016 15:00:45 +0000 Subject: [PATCH] Adapt refactoring (remove APIs from argeo.util) git-svn-id: https://svn.argeo.org/slc/trunk@9167 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- org.argeo.slc.client.rap/META-INF/spring/osgi.xml | 2 +- .../org/argeo/slc/client/rap/OpenJcrFileService.java | 3 +-- .../argeo/slc/client/ui/specific/OpenJcrFile.java | 1 - .../META-INF/spring/osgi.xml | 2 +- .../ui/dist/commands/CopyLocalJavaWorkspace.java | 12 ++++++------ .../slc/client/ui/dist/commands/CopyWorkspace.java | 12 ++++++------ .../slc/client/ui/dist/commands/CreateWorkspace.java | 2 +- .../slc/client/ui/dist/commands/DeleteArtifacts.java | 4 ++-- .../slc/client/ui/dist/commands/DeleteWorkspace.java | 2 +- .../org/argeo/slc/client/ui/dist/commands/Fetch.java | 2 +- .../client/ui/dist/commands/ManageWorkspaceAuth.java | 4 ++-- .../slc/client/ui/dist/commands/MergeWorkspaces.java | 8 ++++---- .../ui/dist/commands/NormalizeDistribution.java | 12 ++++++------ .../client/ui/dist/commands/NormalizeWorkspace.java | 12 ++++++------ .../client/ui/dist/commands/PublishWorkspace.java | 6 +++--- .../client/ui/dist/commands/RegisterRepository.java | 2 +- .../argeo/slc/client/ui/dist/commands/RunInOsgi.java | 2 +- .../ui/dist/controllers/ArtifactLabelProvider.java | 4 ++-- .../controllers/ArtifactsTreeContentProvider.java | 6 +++--- .../ui/dist/controllers/DistSessionFactory.java | 2 +- .../ui/dist/controllers/DistTreeContentProvider.java | 2 +- .../ui/dist/editors/ArtifactVersionEditor.java | 3 +-- .../slc/client/ui/dist/editors/BundleDetailPage.java | 3 +-- .../slc/client/ui/dist/editors/BundleRawPage.java | 10 +++++----- .../client/ui/dist/editors/DistWkspSearchPage.java | 8 ++++---- .../client/ui/dist/editors/DistWorkspaceEditor.java | 6 +++--- .../dist/editors/ModularDistVersionDetailPage.java | 3 +-- .../dist/editors/ModularDistVersionOverviewPage.java | 2 +- .../ui/dist/model/ModularDistVersionBaseElem.java | 3 +-- .../org/argeo/slc/client/ui/dist/model/RepoElem.java | 2 +- .../slc/client/ui/dist/model/WkspGroupElem.java | 4 ++-- .../slc/client/ui/dist/model/WorkspaceElem.java | 6 +++--- .../ui/dist/utils/ArtifactsTableConfigurer.java | 10 +++++----- .../slc/client/ui/dist/utils/CommandHelpers.java | 4 ++-- .../ui/dist/utils/DistNodeViewerComparator.java | 6 +++--- .../slc/client/ui/dist/utils/DistUiHelpers.java | 4 ++-- .../ui/dist/views/AbstractQueryArtifactsView.java | 4 ++-- .../slc/client/ui/dist/views/ArtifactsBrowser.java | 8 ++++---- .../slc/client/ui/dist/views/QueryArtifactsForm.java | 4 ++-- .../slc/client/ui/dist/views/QueryBundlesForm.java | 4 ++-- .../client/ui/dist/wizards/ChangeRightsWizard.java | 6 +++--- .../slc/client/ui/dist/wizards/FetchWizard.java | 8 ++++---- .../ui/dist/wizards/GenerateBinariesWizard.java | 10 +++++----- .../client/ui/dist/wizards/RegisterRepoWizard.java | 2 +- .../slc/client/ui/editors/ProcessBuilderPage.java | 7 +++---- .../slc/client/ui/views/JcrExecutionModulesView.java | 3 +-- .../argeo/slc/client/ui/views/JcrResultTreeView.java | 9 ++++----- .../src/org/argeo/slc/core/deploy/DigestCheck.java | 7 ++++--- .../org/argeo/slc/core/test/SimpleTestResult.java | 1 - .../slc/core/test/context/SimpleContextAware.java | 3 +-- .../argeo/slc/jcr/execution/JcrProcessThread.java | 4 ++-- .../org/argeo/slc/osgi/OsgiExecutionResources.java | 4 ++-- .../src/org/argeo/slc/osgi/OsgiRuntime.java | 2 +- .../osgi/build/AbstractOsgiModularDistribution.java | 2 +- .../osgi/build/OsgiRuntimeModularDistribution.java | 2 +- .../org/argeo/slc/osgi/deploy/OsgiResourceSet.java | 6 +++--- .../src/org/argeo/slc/repo/ArtifactIndexer.java | 2 +- .../argeo/slc/repo/ModularDistributionFactory.java | 2 +- .../argeo/slc/repo/ModularDistributionIndexer.java | 2 +- .../src/org/argeo/slc/repo/RepoSync.java | 6 +++--- .../src/org/argeo/slc/repo/RepoUtils.java | 6 +++--- .../src/org/argeo/slc/repo/core/RepoServiceImpl.java | 2 +- .../org/argeo/slc/repo/maven/GenerateBinaries.java | 12 ++++++------ .../slc/repo/maven/ImportMavenDependencies.java | 2 +- .../org/argeo/slc/repo/maven/Migration_01_03.java | 2 +- .../src/org/argeo/slc/repo/osgi/BndWrapper.java | 2 +- .../src/org/argeo/slc/repo/osgi/MavenWrapper.java | 1 - .../src/org/argeo/slc/repo/osgi/NormalizeGroup.java | 10 +++++----- .../org/argeo/slc/repo/osgi/ProcessDistribution.java | 1 - .../test/org/argeo/slc/aether/AetherUtilsTest.java | 4 ++-- .../src/org/argeo/slc/aether/AetherUtils.java | 2 +- .../equinox/unit/AbstractOsgiRuntimeTestCase.java | 4 ++-- .../src/org/argeo/slc/unit/UnitUtils.java | 8 ++++---- 73 files changed, 164 insertions(+), 176 deletions(-) diff --git a/org.argeo.slc.client.rap/META-INF/spring/osgi.xml b/org.argeo.slc.client.rap/META-INF/spring/osgi.xml index 557350b8e..96cd21505 100644 --- a/org.argeo.slc.client.rap/META-INF/spring/osgi.xml +++ b/org.argeo.slc.client.rap/META-INF/spring/osgi.xml @@ -14,6 +14,6 @@ filter="(argeo.jcr.repository.alias=node)" /> - + \ No newline at end of file diff --git a/org.argeo.slc.client.rap/src/org/argeo/slc/client/rap/OpenJcrFileService.java b/org.argeo.slc.client.rap/src/org/argeo/slc/client/rap/OpenJcrFileService.java index dda158a5e..1a1f1dcca 100644 --- a/org.argeo.slc.client.rap/src/org/argeo/slc/client/rap/OpenJcrFileService.java +++ b/org.argeo.slc.client.rap/src/org/argeo/slc/client/rap/OpenJcrFileService.java @@ -9,13 +9,12 @@ import javax.jcr.RepositoryException; import javax.jcr.Session; import javax.jcr.nodetype.NodeType; import javax.servlet.ServletException; -import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import org.apache.commons.io.IOUtils; import org.argeo.jcr.JcrUtils; import org.argeo.slc.SlcException; -import org.eclipse.rap.rwt.RWT; //import org.eclipse.rap.rwt.service.IServiceHandler; /** 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 78cebc972..79450b042 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 @@ -23,7 +23,6 @@ import javax.jcr.Session; import org.argeo.slc.SlcException; import org.argeo.slc.client.rap.OpenJcrFileService; -import org.argeo.slc.client.rap.SlcRapPlugin; import org.argeo.slc.repo.RepoService; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; diff --git a/org.argeo.slc.client.ui.dist/META-INF/spring/osgi.xml b/org.argeo.slc.client.ui.dist/META-INF/spring/osgi.xml index bacb25cd9..dec9c603c 100644 --- a/org.argeo.slc.client.ui.dist/META-INF/spring/osgi.xml +++ b/org.argeo.slc.client.ui.dist/META-INF/spring/osgi.xml @@ -12,7 +12,7 @@ filter="(argeo.jcr.repository.alias=java)" /> - + 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 7ad91f3ed..285d37a08 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 @@ -23,13 +23,13 @@ import javax.jcr.security.Privilege; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoException; -import org.argeo.ArgeoMonitor; -import org.argeo.eclipse.ui.EclipseArgeoMonitor; +import org.argeo.eclipse.ui.EclipseJcrMonitor; +import org.argeo.jcr.JcrMonitor; import org.argeo.jcr.JcrUtils; +import org.argeo.security.ui.PrivilegedJob; import org.argeo.slc.SlcConstants; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; -import org.argeo.security.ui.PrivilegedJob; import org.argeo.slc.client.ui.dist.utils.CommandHelpers; import org.argeo.slc.repo.JavaRepoManager; import org.argeo.slc.repo.RepoUtils; @@ -120,7 +120,7 @@ public class CopyLocalJavaWorkspace extends AbstractHandler { protected IStatus doRun(IProgressMonitor progressMonitor) { long begin = System.currentTimeMillis(); - ArgeoMonitor monitor = new EclipseArgeoMonitor(progressMonitor); + JcrMonitor monitor = new EclipseJcrMonitor(progressMonitor); monitor.beginTask("Copy workspace", -1); monitor.subTask("Copying nodes"); @@ -150,7 +150,7 @@ public class CopyLocalJavaWorkspace extends AbstractHandler { }); } catch (RepositoryException re) { - throw new ArgeoException( + throw new SlcException( "Unexpected error while creating the new workspace.", re); } finally { 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 3805e0daa..fe250682e 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 @@ -25,16 +25,16 @@ import javax.jcr.security.Privilege; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoException; -import org.argeo.ArgeoMonitor; -import org.argeo.eclipse.ui.EclipseArgeoMonitor; +import org.argeo.eclipse.ui.EclipseJcrMonitor; +import org.argeo.jcr.JcrMonitor; import org.argeo.jcr.JcrUtils; +import org.argeo.node.security.Keyring; import org.argeo.security.ui.PrivilegedJob; import org.argeo.slc.SlcConstants; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; import org.argeo.slc.client.ui.dist.utils.CommandHelpers; import org.argeo.slc.repo.RepoUtils; -import org.argeo.util.security.Keyring; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; @@ -127,7 +127,7 @@ public class CopyWorkspace extends AbstractHandler { protected IStatus doRun(IProgressMonitor progressMonitor) { long begin = System.currentTimeMillis(); - ArgeoMonitor monitor = new EclipseArgeoMonitor(progressMonitor); + JcrMonitor monitor = new EclipseJcrMonitor(progressMonitor); monitor.beginTask("Copy workspace", -1); monitor.subTask("Copying nodes"); @@ -163,7 +163,7 @@ public class CopyWorkspace extends AbstractHandler { monitor.worked(1); } catch (RepositoryException re) { - throw new ArgeoException( + throw new SlcException( "Unexpected error while creating the new workspace.", re); } finally { 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 b4a8d98b5..2b27f96da 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 @@ -27,11 +27,11 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.argeo.eclipse.ui.dialogs.ErrorFeedback; import org.argeo.jcr.JcrUtils; +import org.argeo.node.security.Keyring; import org.argeo.slc.SlcConstants; import org.argeo.slc.client.ui.dist.DistPlugin; import org.argeo.slc.client.ui.dist.utils.CommandHelpers; import org.argeo.slc.repo.RepoUtils; -import org.argeo.util.security.Keyring; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; 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 58d11b5d5..61a7c9b7f 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 @@ -20,7 +20,7 @@ import java.util.Iterator; import javax.jcr.Node; import javax.jcr.RepositoryException; -import org.argeo.ArgeoException; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; import org.argeo.slc.jcr.SlcTypes; import org.eclipse.core.commands.AbstractHandler; @@ -79,7 +79,7 @@ public class DeleteArtifacts extends AbstractHandler { } // CommandHelpers.callCommand(RefreshDistributionOverviewPage.ID); } catch (RepositoryException re) { - throw new ArgeoException( + throw new SlcException( "Unexpected error while deleting artifacts.", re); } return null; 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 cffa453cd..1369aeb3b 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 @@ -25,11 +25,11 @@ import javax.jcr.Session; import javax.jcr.nodetype.NodeType; import org.argeo.jcr.JcrUtils; +import org.argeo.node.security.Keyring; import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; import org.argeo.slc.client.ui.dist.utils.CommandHelpers; import org.argeo.slc.repo.RepoUtils; -import org.argeo.util.security.Keyring; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/Fetch.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/Fetch.java index c42fa7a29..a54423634 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/Fetch.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/Fetch.java @@ -7,11 +7,11 @@ import javax.jcr.RepositoryFactory; import javax.jcr.Session; import org.argeo.jcr.JcrUtils; +import org.argeo.node.security.Keyring; import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; import org.argeo.slc.client.ui.dist.utils.CommandHelpers; import org.argeo.slc.client.ui.dist.wizards.FetchWizard; -import org.argeo.util.security.Keyring; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; 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 b7910ca88..9e499b53f 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 @@ -19,8 +19,8 @@ import javax.jcr.Repository; import javax.jcr.RepositoryException; import javax.jcr.Session; -import org.argeo.ArgeoException; import org.argeo.jcr.JcrUtils; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; import org.argeo.slc.client.ui.dist.wizards.ChangeRightsWizard; import org.eclipse.core.commands.AbstractHandler; @@ -57,7 +57,7 @@ public class ManageWorkspaceAuth extends AbstractHandler { dialog.open(); return null; } catch (RepositoryException re) { - throw new ArgeoException("Cannot log in the repository " + throw new SlcException("Cannot log in the repository " + repository + " in workspace " + workspaceName, re); } finally { JcrUtils.logoutQuietly(session); 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 e31900726..965e5348f 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 @@ -27,13 +27,13 @@ import javax.jcr.query.QueryResult; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoMonitor; -import org.argeo.eclipse.ui.EclipseArgeoMonitor; +import org.argeo.eclipse.ui.EclipseJcrMonitor; +import org.argeo.jcr.JcrMonitor; import org.argeo.jcr.JcrUtils; +import org.argeo.node.security.Keyring; import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; import org.argeo.slc.repo.RepoUtils; -import org.argeo.util.security.Keyring; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; @@ -150,7 +150,7 @@ public class MergeWorkspaces extends AbstractHandler { if (log.isDebugEnabled()) log.debug("Will copy " + expectedCount + " files..."); - ArgeoMonitor monitor = new EclipseArgeoMonitor(eclipseMonitor); + JcrMonitor monitor = new EclipseJcrMonitor(eclipseMonitor); eclipseMonitor .beginTask("Copy files", expectedCount.intValue()); 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 d42fd7adc..c55efb65d 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 @@ -31,9 +31,10 @@ import javax.jcr.util.TraversingItemVisitor; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoMonitor; -import org.argeo.eclipse.ui.EclipseArgeoMonitor; +import org.argeo.eclipse.ui.EclipseJcrMonitor; +import org.argeo.jcr.JcrMonitor; import org.argeo.jcr.JcrUtils; +import org.argeo.node.security.Keyring; import org.argeo.slc.NameVersion; import org.argeo.slc.SlcException; import org.argeo.slc.aether.AetherUtils; @@ -46,7 +47,6 @@ import org.argeo.slc.repo.RepoConstants; import org.argeo.slc.repo.RepoUtils; import org.argeo.slc.repo.maven.MavenConventionsUtils; import org.argeo.slc.repo.osgi.NormalizeGroup; -import org.argeo.util.security.Keyring; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; import org.eclipse.core.commands.AbstractHandler; @@ -207,7 +207,7 @@ public class NormalizeDistribution extends AbstractHandler implements SlcNames { protected IStatus run(IProgressMonitor progressMonitor) { try { - ArgeoMonitor monitor = new EclipseArgeoMonitor(progressMonitor); + JcrMonitor monitor = new EclipseJcrMonitor(progressMonitor); // normalize artifacts Query countQuery = session .getWorkspace() @@ -250,9 +250,9 @@ public class NormalizeDistribution extends AbstractHandler implements SlcNames { } private class NormalizingTraverser extends TraversingItemVisitor { - ArgeoMonitor monitor; + JcrMonitor monitor; - public NormalizingTraverser(ArgeoMonitor monitor) { + public NormalizingTraverser(JcrMonitor monitor) { super(); this.monitor = monitor; } 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 d2628f7fe..db87371ea 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 @@ -29,9 +29,10 @@ import javax.jcr.util.TraversingItemVisitor; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoMonitor; -import org.argeo.eclipse.ui.EclipseArgeoMonitor; +import org.argeo.eclipse.ui.EclipseJcrMonitor; +import org.argeo.jcr.JcrMonitor; import org.argeo.jcr.JcrUtils; +import org.argeo.node.security.Keyring; import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; import org.argeo.slc.jcr.SlcNames; @@ -41,7 +42,6 @@ import org.argeo.slc.repo.ModularDistributionIndexer; import org.argeo.slc.repo.PdeSourcesIndexer; import org.argeo.slc.repo.RepoConstants; import org.argeo.slc.repo.RepoUtils; -import org.argeo.util.security.Keyring; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; @@ -130,7 +130,7 @@ public class NormalizeWorkspace extends AbstractHandler implements SlcNames { @Override protected IStatus run(IProgressMonitor progressMonitor) { try { - ArgeoMonitor monitor = new EclipseArgeoMonitor(progressMonitor); + JcrMonitor monitor = new EclipseJcrMonitor(progressMonitor); // Normalize artifacts Query countQuery = session .getWorkspace() @@ -162,9 +162,9 @@ public class NormalizeWorkspace extends AbstractHandler implements SlcNames { } private class NormalizingTraverser extends TraversingItemVisitor { - ArgeoMonitor monitor; + JcrMonitor monitor; - public NormalizingTraverser(ArgeoMonitor monitor) { + public NormalizingTraverser(JcrMonitor monitor) { super(); this.monitor = monitor; } 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 8eb371c34..51f7fd64f 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 @@ -23,12 +23,12 @@ import javax.jcr.RepositoryFactory; import javax.jcr.Session; import javax.jcr.security.Privilege; -import org.argeo.ArgeoException; import org.argeo.jcr.JcrUtils; +import org.argeo.node.security.Keyring; import org.argeo.slc.SlcConstants; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; import org.argeo.slc.repo.RepoUtils; -import org.argeo.util.security.Keyring; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; @@ -84,7 +84,7 @@ public class PublishWorkspace extends AbstractHandler { // CommandHelpers.callCommand(RefreshDistributionsView.ID); } } catch (RepositoryException re) { - throw new ArgeoException( + throw new SlcException( "Unexpected error while publishing workspace " + workspaceName, re); } finally { 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 b141e659a..fc9124d50 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 @@ -19,11 +19,11 @@ import javax.jcr.Repository; import javax.jcr.RepositoryFactory; import org.argeo.node.ArgeoNames; +import org.argeo.node.security.Keyring; import org.argeo.slc.client.ui.dist.DistPlugin; import org.argeo.slc.client.ui.dist.utils.CommandHelpers; import org.argeo.slc.client.ui.dist.wizards.RegisterRepoWizard; import org.argeo.slc.jcr.SlcNames; -import org.argeo.util.security.Keyring; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; 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 66e4414d4..21cb95ca0 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 @@ -39,6 +39,7 @@ import org.argeo.slc.core.execution.tasks.JvmProcess; import org.argeo.slc.jcr.SlcNames; import org.argeo.slc.repo.RepoUtils; import org.argeo.slc.repo.maven.MavenConventionsUtils; +import org.eclipse.aether.artifact.Artifact; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; @@ -47,7 +48,6 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.aether.artifact.Artifact; /** UNDER DEVELOPMENT. Download and prepare an OSGi runtime */ public class RunInOsgi extends AbstractHandler implements SlcNames { 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 7e3a1db1c..728407f66 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 @@ -22,8 +22,8 @@ import javax.jcr.Node; import javax.jcr.Property; import javax.jcr.RepositoryException; -import org.argeo.ArgeoException; import org.argeo.jcr.JcrUtils; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistConstants; import org.argeo.slc.client.ui.dist.DistImages; import org.argeo.slc.jcr.SlcTypes; @@ -103,7 +103,7 @@ public class ArtifactLabelProvider extends ColumnLabelProvider implements } } } catch (RepositoryException re) { - throw new ArgeoException( + throw new SlcException( "Unexepected error while getting property values", re); } return null; 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 9591ac0c2..ac3459e95 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 @@ -23,8 +23,8 @@ import javax.jcr.Node; import javax.jcr.NodeIterator; import javax.jcr.RepositoryException; -import org.argeo.ArgeoException; import org.argeo.eclipse.ui.jcr.utils.JcrItemsComparator; +import org.argeo.slc.SlcException; import org.argeo.slc.jcr.SlcTypes; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.Viewer; @@ -66,7 +66,7 @@ public class ArtifactsTreeContentProvider implements ITreeContentProvider, } } catch (RepositoryException e) { - throw new ArgeoException( + throw new SlcException( "Unexpected exception while listing node properties", e); } return elements; @@ -83,7 +83,7 @@ public class ArtifactsTreeContentProvider implements ITreeContentProvider, return true; } } catch (RepositoryException e) { - throw new ArgeoException( + throw new SlcException( "Unexpected exception while checking if property is multiple", e); } diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/DistSessionFactory.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/DistSessionFactory.java index 0587cd728..38203d8ba 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/DistSessionFactory.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/DistSessionFactory.java @@ -9,9 +9,9 @@ import javax.jcr.RepositoryFactory; import javax.jcr.Session; import org.argeo.jcr.JcrUtils; +import org.argeo.node.security.Keyring; import org.argeo.slc.SlcException; import org.argeo.slc.repo.RepoUtils; -import org.argeo.util.security.Keyring; /** * Provide shortcuts to retrieve sessions, repositories and workspaces that are diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/DistTreeContentProvider.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/DistTreeContentProvider.java index e83ca22da..1dd322864 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/DistTreeContentProvider.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/controllers/DistTreeContentProvider.java @@ -17,10 +17,10 @@ import org.argeo.jcr.JcrUtils; import org.argeo.node.ArgeoNames; import org.argeo.node.ArgeoTypes; import org.argeo.node.NodeUtils; +import org.argeo.node.security.Keyring; import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.model.RepoElem; import org.argeo.slc.repo.RepoConstants; -import org.argeo.util.security.Keyring; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.Viewer; 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 5612fa97f..1db366126 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 @@ -19,7 +19,6 @@ import javax.jcr.Node; import javax.jcr.RepositoryException; import javax.jcr.Session; -import org.argeo.ArgeoException; import org.argeo.jcr.JcrUtils; import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; @@ -93,7 +92,7 @@ public class ArtifactVersionEditor extends FormEditor implements SlcNames { addPage(new BundleDependencyPage(this, "Dependencies ", artifact)); addPage(new BundleRawPage(this, "Raw Meta-Data ", artifact)); } catch (PartInitException e) { - throw new ArgeoException("Cannot add distribution editor pages", e); + throw new SlcException("Cannot add distribution editor pages", e); } } 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 512e67e55..c73e16eb3 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 @@ -22,7 +22,6 @@ import javax.jcr.RepositoryException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoException; import org.argeo.slc.SlcException; import org.argeo.slc.build.License; import org.argeo.slc.client.ui.dist.DistConstants; @@ -514,7 +513,7 @@ public class BundleDetailPage extends FormPage implements SlcNames { sb.append(""); return sb.toString(); } catch (RepositoryException re) { - throw new ArgeoException( + throw new SlcException( "unexpected error while generating maven snippet"); } } 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 2853912db..5001886f3 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 @@ -26,7 +26,7 @@ import javax.jcr.RepositoryException; import javax.jcr.Value; import javax.jcr.nodetype.NodeType; -import org.argeo.ArgeoException; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistImages; import org.argeo.slc.client.ui.dist.utils.DistUiHelpers; import org.argeo.slc.jcr.SlcNames; @@ -197,7 +197,7 @@ public class BundleRawPage extends FormPage implements SlcNames, SlcTypes { } } } catch (RepositoryException e) { - throw new ArgeoException( + throw new SlcException( "unexpected error while getting artifact information", e); } @@ -245,7 +245,7 @@ public class BundleRawPage extends FormPage implements SlcNames, SlcTypes { } } catch (RepositoryException e) { - throw new ArgeoException( + throw new SlcException( "Unexpected exception while listing node properties", e); } return elements.toArray(); @@ -305,7 +305,7 @@ public class BundleRawPage extends FormPage implements SlcNames, SlcTypes { return elements.toArray(); } } catch (RepositoryException e) { - throw new ArgeoException( + throw new SlcException( "Unexpected error getting multiple values property.", e); } return result; @@ -324,7 +324,7 @@ public class BundleRawPage extends FormPage implements SlcNames, SlcTypes { return true; } } catch (RepositoryException e) { - throw new ArgeoException( + throw new SlcException( "Unexpected exception while checking if property is multiple", e); } 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 4270e93f0..e7dbb7360 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 @@ -37,14 +37,14 @@ import javax.jcr.query.qom.QueryObjectModelFactory; import javax.jcr.query.qom.Selector; import javax.jcr.query.qom.StaticOperand; -import org.argeo.ArgeoMonitor; -import org.argeo.eclipse.ui.EclipseArgeoMonitor; +import org.argeo.eclipse.ui.EclipseJcrMonitor; import org.argeo.eclipse.ui.workbench.CommandUtils; +import org.argeo.jcr.JcrMonitor; import org.argeo.jcr.JcrUtils; +import org.argeo.security.ui.PrivilegedJob; import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistConstants; import org.argeo.slc.client.ui.dist.DistPlugin; -import org.argeo.security.ui.PrivilegedJob; import org.argeo.slc.client.ui.dist.commands.DeleteArtifacts; import org.argeo.slc.client.ui.dist.commands.OpenModuleEditor; import org.argeo.slc.client.ui.dist.utils.DistNodeViewerComparator; @@ -135,7 +135,7 @@ public class DistWkspSearchPage extends FormPage implements SlcNames { @Override protected IStatus doRun(IProgressMonitor progressMonitor) { try { - ArgeoMonitor monitor = new EclipseArgeoMonitor(progressMonitor); + JcrMonitor monitor = new EclipseJcrMonitor(progressMonitor); monitor.beginTask("Getting bundle list", -1); final List result = JcrUtils .nodeIteratorToList(listBundleArtifacts(session, filter)); 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 de233bcf0..06e892f02 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 @@ -21,12 +21,12 @@ import javax.jcr.RepositoryException; import javax.jcr.RepositoryFactory; import javax.jcr.Session; -import org.argeo.ArgeoException; import org.argeo.jcr.JcrUtils; +import org.argeo.node.security.Keyring; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; import org.argeo.slc.jcr.SlcNames; import org.argeo.slc.repo.RepoUtils; -import org.argeo.util.security.Keyring; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorSite; @@ -83,7 +83,7 @@ public class DistWorkspaceEditor extends FormEditor implements SlcNames { addPage(new WkspCategoryBaseListPage(this, "Groups ", businessSession)); } catch (PartInitException e) { - throw new ArgeoException("Cannot add distribution editor pages", e); + throw new SlcException("Cannot add distribution editor pages", e); } } 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 1c29abc4a..396950498 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 @@ -18,7 +18,6 @@ package org.argeo.slc.client.ui.dist.editors; import javax.jcr.Node; import javax.jcr.RepositoryException; -import org.argeo.ArgeoException; import org.argeo.slc.SlcException; import org.argeo.slc.jcr.SlcNames; import org.eclipse.swt.SWT; @@ -125,7 +124,7 @@ public class ModularDistVersionDetailPage extends FormPage implements SlcNames { sb.append(""); return sb.toString(); } catch (RepositoryException re) { - throw new ArgeoException( + throw new SlcException( "unexpected error while generating maven snippet"); } } 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 2329bd49e..a1545bf0c 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 @@ -44,8 +44,8 @@ import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistConstants; import org.argeo.slc.client.ui.dist.DistImages; import org.argeo.slc.client.ui.dist.commands.OpenModuleEditor; -import org.argeo.slc.client.ui.dist.utils.HyperlinkAdapter; import org.argeo.slc.client.ui.dist.utils.DistNodeViewerComparator; +import org.argeo.slc.client.ui.dist.utils.HyperlinkAdapter; //import org.argeo.slc.client.ui.specific.OpenJcrFile; //import org.argeo.slc.client.ui.specific.OpenJcrFileCmdId; import org.argeo.slc.jcr.SlcNames; diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/ModularDistVersionBaseElem.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/ModularDistVersionBaseElem.java index af42d8744..1040e2c4e 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/ModularDistVersionBaseElem.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/ModularDistVersionBaseElem.java @@ -10,7 +10,6 @@ import javax.jcr.query.qom.QueryObjectModel; import javax.jcr.query.qom.QueryObjectModelFactory; import javax.jcr.query.qom.Selector; -import org.argeo.ArgeoException; import org.argeo.slc.SlcException; import org.argeo.slc.jcr.SlcNames; import org.argeo.slc.jcr.SlcTypes; @@ -85,7 +84,7 @@ public class ModularDistVersionBaseElem extends DistParentElem { } return super.getChildren(); } catch (RepositoryException re) { - throw new ArgeoException("Unable to retrieve children for " + throw new SlcException("Unable to retrieve children for " + modularDistVersionBase, re); } } diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/RepoElem.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/RepoElem.java index ed659457f..85ae4c266 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/RepoElem.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/RepoElem.java @@ -12,10 +12,10 @@ import javax.jcr.Session; import org.argeo.jcr.JcrUtils; import org.argeo.node.ArgeoNames; import org.argeo.node.NodeUtils; +import org.argeo.node.security.Keyring; import org.argeo.slc.SlcException; import org.argeo.slc.repo.RepoConstants; import org.argeo.slc.repo.RepoUtils; -import org.argeo.util.security.Keyring; /** * Abstract a repository. It might be persisted by a node in the current user diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/WkspGroupElem.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/WkspGroupElem.java index 66434d71a..0c10777ea 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/WkspGroupElem.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/WkspGroupElem.java @@ -3,8 +3,8 @@ package org.argeo.slc.client.ui.dist.model; import javax.jcr.RepositoryException; import javax.jcr.Session; -import org.argeo.ArgeoException; import org.argeo.jcr.JcrUtils; +import org.argeo.slc.SlcException; /** * Abstract set of similar workspaces, that is a bunch of workspaces with same @@ -30,7 +30,7 @@ public class WkspGroupElem extends DistParentElem { wkpName)); } } catch (RepositoryException e) { - throw new ArgeoException("Cannot retrieve workspace names", e); + throw new SlcException("Cannot retrieve workspace names", e); } } diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/WorkspaceElem.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/WorkspaceElem.java index 3be73b5e5..40409dc84 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/WorkspaceElem.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/model/WorkspaceElem.java @@ -10,8 +10,8 @@ import javax.jcr.query.qom.QueryObjectModel; import javax.jcr.query.qom.QueryObjectModelFactory; import javax.jcr.query.qom.Selector; -import org.argeo.ArgeoException; import org.argeo.jcr.JcrUtils; +import org.argeo.slc.SlcException; import org.argeo.slc.jcr.SlcNames; import org.argeo.slc.jcr.SlcTypes; @@ -60,7 +60,7 @@ public class WorkspaceElem extends DistParentElem { else return true; } catch (RepositoryException re) { - throw new ArgeoException( + throw new SlcException( "Unexpected error while checking children node existence", re); } @@ -140,7 +140,7 @@ public class WorkspaceElem extends DistParentElem { } return super.getChildren(); } catch (RepositoryException e) { - throw new ArgeoException( + throw new SlcException( "Cannot initialize WorkspaceNode UI object." + getName(), e); } 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 d6f60c640..a8a321cf4 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 @@ -25,8 +25,8 @@ import javax.jcr.RepositoryException; import javax.jcr.Value; import javax.jcr.query.Row; -import org.argeo.ArgeoException; import org.argeo.eclipse.ui.GenericTableComparator; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistConstants; import org.argeo.slc.jcr.SlcNames; import org.argeo.slc.jcr.SlcTypes; @@ -165,7 +165,7 @@ public class ArtifactsTableConfigurer implements SlcNames, SlcTypes, try { return row.getValue(columnName).getString(); } catch (RepositoryException e) { - throw new ArgeoException("Cannot display row " + row, e); + throw new SlcException("Cannot display row " + row, e); } } @@ -200,13 +200,13 @@ public class ArtifactsTableConfigurer implements SlcNames, SlcTypes, else if (v1.getType() == PropertyType.DATE) rc = v1.getDate().compareTo(v2.getDate()); else - throw new ArgeoException("comparator for object type " + throw new SlcException("comparator for object type " + v1.getType() + " is not yet implemented"); } catch (Exception e) { - throw new ArgeoException("rows cannot be compared ", e); + throw new SlcException("rows cannot be compared ", e); } } else - throw new ArgeoException("Unsupported row type"); + throw new SlcException("Unsupported row type"); // If descending order, flip the direction if (direction == DESCENDING) { rc = -rc; 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 ad2cfdb58..fcc0f5e9f 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 @@ -19,7 +19,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.Map; -import org.argeo.ArgeoException; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; import org.eclipse.core.commands.Command; import org.eclipse.core.commands.Parameterization; @@ -151,7 +151,7 @@ public class CommandHelpers { // execute the command handlerService.executeCommand(pc, null); } catch (Exception e) { - throw new ArgeoException( + throw new SlcException( "Unexepected exception while opening node editor", e); } } 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 de22ac302..2f0e3a03b 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 @@ -27,8 +27,8 @@ import javax.jcr.ValueFormatException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoException; import org.argeo.eclipse.ui.GenericTableComparator; +import org.argeo.slc.SlcException; import org.eclipse.jface.viewers.Viewer; /** Add ability to order by name version and version */ @@ -149,7 +149,7 @@ public class DistNodeViewerComparator extends GenericTableComparator { rc = bd1.compareTo(bd2); break; default: - throw new ArgeoException( + throw new SlcException( "Unimplemented comparaison for PropertyType " + propertyType); } @@ -160,7 +160,7 @@ public class DistNodeViewerComparator extends GenericTableComparator { } } catch (RepositoryException re) { - throw new ArgeoException("Unexpected error " + throw new SlcException("Unexpected error " + "while comparing nodes", re); } return rc; 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 4291c713e..2820d9294 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 @@ -25,7 +25,7 @@ import javax.jcr.Value; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoException; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistConstants; import org.argeo.slc.jcr.SlcNames; import org.argeo.slc.jcr.SlcTypes; @@ -130,7 +130,7 @@ public class DistUiHelpers implements DistConstants, SlcTypes, SlcNames { strValue = value.getString(); return strValue; } catch (RepositoryException e) { - throw new ArgeoException("unexpected error while formatting value", + throw new SlcException("unexpected error while formatting value", e); } } 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 65879a672..ceff72d10 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 @@ -30,8 +30,8 @@ import javax.jcr.query.RowIterator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoException; import org.argeo.eclipse.ui.GenericTableComparator; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.utils.ArtifactsTableConfigurer; import org.argeo.slc.jcr.SlcTypes; import org.eclipse.core.runtime.IStatus; @@ -157,7 +157,7 @@ public abstract class AbstractQueryArtifactsView extends ViewPart implements } viewer.setInput(rows); } catch (RepositoryException e) { - throw new ArgeoException("Cannot read query result", e); + throw new SlcException("Cannot read query result", e); } } catch (RepositoryException e) { 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 9ae713e85..6f6171436 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 @@ -23,8 +23,8 @@ import javax.jcr.Property; import javax.jcr.RepositoryException; import javax.jcr.Session; -import org.argeo.ArgeoException; import org.argeo.jcr.JcrUtils; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistConstants; import org.argeo.slc.client.ui.dist.DistImages; import org.argeo.slc.client.ui.dist.DistPlugin; @@ -98,7 +98,7 @@ public class ArtifactsBrowser extends ViewPart implements DistConstants, rootNode = jcrSession.getNode(DEFAULT_ARTIFACTS_BASE_PATH); artifactTreeViewer.setInput(rootNode); } catch (RepositoryException e) { - throw new ArgeoException("Cannot load base artifact nodes", e); + throw new SlcException("Cannot load base artifact nodes", e); } } } @@ -245,7 +245,7 @@ public class ArtifactsBrowser extends ViewPart implements DistConstants, } } } catch (RepositoryException re) { - throw new ArgeoException( + throw new SlcException( "Unexepected error while getting property values", re); } return null; @@ -264,7 +264,7 @@ public class ArtifactsBrowser extends ViewPart implements DistConstants, // strValue = value.getString(); // return strValue; // } catch (RepositoryException e) { - // throw new ArgeoException( + // throw new SlcException( // "unexpected error while formatting value", e); // } // } 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 a698e1a61..1db52456d 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 @@ -15,7 +15,7 @@ */ package org.argeo.slc.client.ui.dist.views; -import org.argeo.ArgeoException; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; import org.argeo.slc.jcr.SlcNames; import org.eclipse.swt.SWT; @@ -159,7 +159,7 @@ public class QueryArtifactsForm extends AbstractQueryArtifactsView implements return sb.toString(); } catch (Exception e) { - throw new ArgeoException( + throw new SlcException( "Cannot generate where statement to get artifacts", e); } } 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 6494c0752..ee5fbdb64 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 @@ -15,7 +15,7 @@ */ package org.argeo.slc.client.ui.dist.views; -import org.argeo.ArgeoException; +import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; import org.argeo.slc.jcr.SlcNames; import org.argeo.slc.jcr.SlcTypes; @@ -177,7 +177,7 @@ public class QueryBundlesForm extends AbstractQueryArtifactsView implements } return sb.toString(); } catch (Exception e) { - throw new ArgeoException( + throw new SlcException( "Cannot generate where statement to get artifacts", e); } } 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 99dd8e143..a3e70b9c3 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 @@ -18,8 +18,8 @@ package org.argeo.slc.client.ui.dist.wizards; import javax.jcr.RepositoryException; import javax.jcr.Session; -import org.argeo.ArgeoException; import org.argeo.jcr.JcrUtils; +import org.argeo.slc.SlcException; import org.eclipse.jface.wizard.Wizard; /** @@ -44,7 +44,7 @@ public class ChangeRightsWizard extends Wizard { page = new ChooseRightsPage(); addPage(page); } catch (Exception e) { - throw new ArgeoException("Cannot add page to wizard ", e); + throw new SlcException("Cannot add page to wizard ", e); } } @@ -56,7 +56,7 @@ public class ChangeRightsWizard extends Wizard { JcrUtils.addPrivilege(currentSession, "/", page.getGroupName(), page.getAuthTypeStr()); } catch (RepositoryException re) { - throw new ArgeoException( + throw new SlcException( "Unexpected error while setting privileges", re); } return true; 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 a4e9dda18..4e29e48e4 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 @@ -28,12 +28,13 @@ import javax.jcr.RepositoryException; import javax.jcr.RepositoryFactory; import javax.jcr.Session; -import org.argeo.ArgeoMonitor; -import org.argeo.eclipse.ui.EclipseArgeoMonitor; +import org.argeo.eclipse.ui.EclipseJcrMonitor; +import org.argeo.jcr.JcrMonitor; import org.argeo.jcr.JcrUtils; import org.argeo.node.ArgeoNames; import org.argeo.node.ArgeoTypes; import org.argeo.node.NodeUtils; +import org.argeo.node.security.Keyring; import org.argeo.security.ui.PrivilegedJob; import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; @@ -41,7 +42,6 @@ import org.argeo.slc.client.ui.dist.utils.ViewerUtils; import org.argeo.slc.repo.RepoConstants; import org.argeo.slc.repo.RepoSync; import org.argeo.slc.repo.RepoUtils; -import org.argeo.util.security.Keyring; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -529,7 +529,7 @@ public class FetchWizard extends Wizard { @Override protected IStatus doRun(IProgressMonitor progressMonitor) { try { - ArgeoMonitor monitor = new EclipseArgeoMonitor(progressMonitor); + JcrMonitor monitor = new EclipseJcrMonitor(progressMonitor); repoSync.setMonitor(monitor); repoSync.run(); } catch (Exception e) { 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 24d13282a..1f77e825c 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 @@ -25,18 +25,19 @@ import javax.jcr.Session; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoMonitor; -import org.argeo.eclipse.ui.EclipseArgeoMonitor; +import org.argeo.eclipse.ui.EclipseJcrMonitor; +import org.argeo.jcr.JcrMonitor; import org.argeo.jcr.JcrUtils; +import org.argeo.security.ui.PrivilegedJob; import org.argeo.slc.SlcException; import org.argeo.slc.client.ui.dist.DistPlugin; -import org.argeo.security.ui.PrivilegedJob; import org.argeo.slc.client.ui.dist.utils.ViewerUtils; import org.argeo.slc.jcr.SlcTypes; import org.argeo.slc.repo.RepoConstants; import org.argeo.slc.repo.RepoService; import org.argeo.slc.repo.RepoUtils; import org.argeo.slc.repo.maven.GenerateBinaries; +import org.eclipse.aether.artifact.Artifact; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -59,7 +60,6 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.Text; -import org.eclipse.aether.artifact.Artifact; /** * Define parameters to asynchronously generate binaries, sources and sdk pom @@ -310,7 +310,7 @@ public class GenerateBinariesWizard extends Wizard { protected IStatus doRun(IProgressMonitor progressMonitor) { Session session = null; try { - ArgeoMonitor monitor = new EclipseArgeoMonitor(progressMonitor); + JcrMonitor monitor = new EclipseJcrMonitor(progressMonitor); session = repoService.getRemoteSession(repoNodePath, null, wkspName); Node groupBaseNode = session.getNode(groupNodePath); 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 ac6c473a5..a59fd8d5b 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 @@ -31,9 +31,9 @@ import org.argeo.jcr.JcrUtils; import org.argeo.node.ArgeoNames; import org.argeo.node.ArgeoTypes; import org.argeo.node.NodeUtils; +import org.argeo.node.security.Keyring; import org.argeo.slc.SlcException; import org.argeo.slc.repo.RepoConstants; -import org.argeo.util.security.Keyring; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.wizard.Wizard; 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 07817cc2a..a38a87f5c 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 @@ -32,7 +32,6 @@ import javax.jcr.observation.ObservationManager; import javax.jcr.query.Query; import javax.jcr.query.QueryManager; -import org.argeo.ArgeoException; import org.argeo.eclipse.ui.jcr.AsyncUiEventListener; import org.argeo.jcr.JcrUtils; import org.argeo.slc.SlcException; @@ -151,7 +150,7 @@ public class ProcessBuilderPage extends FormPage implements SlcNames { addInitialFlows(); } catch (RepositoryException e) { - throw new ArgeoException("Cannot create form content", e); + throw new SlcException("Cannot create form content", e); } } @@ -415,7 +414,7 @@ public class ProcessBuilderPage extends FormPage implements SlcNames { try { node.remove(); } catch (RepositoryException e) { - throw new ArgeoException("Cannot remove " + node, e); + throw new SlcException("Cannot remove " + node, e); } } flowsViewer.refresh(); @@ -432,7 +431,7 @@ public class ProcessBuilderPage extends FormPage implements SlcNames { flowsViewer.refresh(); formPart.markDirty(); } catch (RepositoryException e) { - throw new ArgeoException("Cannot remove flows from " + processNode, + throw new SlcException("Cannot remove flows from " + processNode, e); } } 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 4340f93f2..697433fe7 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 @@ -36,7 +36,6 @@ import javax.jcr.query.QueryManager; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoException; import org.argeo.eclipse.ui.jcr.AsyncUiEventListener; import org.argeo.eclipse.ui.jcr.DefaultNodeLabelProvider; import org.argeo.eclipse.ui.jcr.NodeElementComparer; @@ -202,7 +201,7 @@ public class JcrExecutionModulesView extends ViewPart implements SlcTypes, SlcNa } } } catch (RepositoryException e) { - throw new ArgeoException("Cannot compare " + o1 + " and " + o2, e); + throw new SlcException("Cannot compare " + o1 + " and " + o2, e); } return 0; } 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 1b1f85d40..b38d96af6 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 @@ -33,7 +33,6 @@ import javax.jcr.observation.Event; import javax.jcr.observation.EventListener; import javax.jcr.observation.ObservationManager; -import org.argeo.ArgeoException; import org.argeo.eclipse.ui.jcr.AsyncUiEventListener; import org.argeo.eclipse.ui.workbench.CommandUtils; import org.argeo.jcr.JcrUtils; @@ -281,7 +280,7 @@ public class JcrResultTreeView extends ViewPart { value = "Error"; return value; } catch (RepositoryException e) { - throw new ArgeoException( + throw new SlcException( "Unexpected exception in label provider", e); } } @@ -316,7 +315,7 @@ public class JcrResultTreeView extends ViewPart { } return value; } catch (RepositoryException e) { - throw new ArgeoException( + throw new SlcException( "Unexpected exception in label provider", e); } } @@ -475,7 +474,7 @@ public class JcrResultTreeView extends ViewPart { "All results"); return roots; } catch (RepositoryException re) { - throw new ArgeoException( + throw new SlcException( "Unexpected error while initializing ResultTree.", re); } } @@ -903,7 +902,7 @@ public class JcrResultTreeView extends ViewPart { return new Object[] {}; } catch (RepositoryException e) { - throw new ArgeoException("Cannot get element for " + throw new SlcException("Cannot get element for " + inputElement, e); } } diff --git a/org.argeo.slc.core/src/org/argeo/slc/core/deploy/DigestCheck.java b/org.argeo.slc.core/src/org/argeo/slc/core/deploy/DigestCheck.java index 5df54232c..be8355fe3 100644 --- a/org.argeo.slc.core/src/org/argeo/slc/core/deploy/DigestCheck.java +++ b/org.argeo.slc.core/src/org/argeo/slc/core/deploy/DigestCheck.java @@ -19,18 +19,19 @@ import java.io.File; import java.io.IOException; import org.argeo.slc.SlcException; -import org.argeo.util.security.DigestUtils; import org.springframework.core.io.Resource; +import org.springframework.util.DigestUtils; /** Add Spring capabilities to {@link DigestUtils} */ public class DigestCheck extends DigestUtils { public static String digest(String algorithm, Resource resource) { try { File file = resource.getFile(); - return digest(algorithm, file); + return org.argeo.util.DigestUtils.digest(algorithm, file); } catch (IOException e) { try { - return digest(algorithm, resource.getInputStream()); + return org.argeo.util.DigestUtils.digest(algorithm, + resource.getInputStream()); } catch (IOException e1) { throw new SlcException("Cannot digest " + resource + " with algorithm " + algorithm, e); diff --git a/org.argeo.slc.core/src/org/argeo/slc/core/test/SimpleTestResult.java b/org.argeo.slc.core/src/org/argeo/slc/core/test/SimpleTestResult.java index 5fca5a9d7..93306a5b4 100644 --- a/org.argeo.slc.core/src/org/argeo/slc/core/test/SimpleTestResult.java +++ b/org.argeo.slc.core/src/org/argeo/slc/core/test/SimpleTestResult.java @@ -24,7 +24,6 @@ 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; diff --git a/org.argeo.slc.core/src/org/argeo/slc/core/test/context/SimpleContextAware.java b/org.argeo.slc.core/src/org/argeo/slc/core/test/context/SimpleContextAware.java index 8ed38720c..f10be5659 100644 --- a/org.argeo.slc.core/src/org/argeo/slc/core/test/context/SimpleContextAware.java +++ b/org.argeo.slc.core/src/org/argeo/slc/core/test/context/SimpleContextAware.java @@ -18,11 +18,10 @@ package org.argeo.slc.core.test.context; import java.util.Map; import java.util.TreeMap; -import org.springframework.beans.factory.InitializingBean; - import org.argeo.slc.SlcException; 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; diff --git a/org.argeo.slc.core/src/org/argeo/slc/jcr/execution/JcrProcessThread.java b/org.argeo.slc.core/src/org/argeo/slc/jcr/execution/JcrProcessThread.java index 8755829e7..9daeb4033 100644 --- a/org.argeo.slc.core/src/org/argeo/slc/jcr/execution/JcrProcessThread.java +++ b/org.argeo.slc.core/src/org/argeo/slc/jcr/execution/JcrProcessThread.java @@ -22,8 +22,8 @@ import javax.jcr.Node; import javax.jcr.RepositoryException; import javax.jcr.Session; -import org.argeo.ArgeoException; import org.argeo.jcr.JcrUtils; +import org.argeo.slc.SlcException; import org.argeo.slc.core.execution.ProcessThread; import org.argeo.slc.execution.ExecutionModulesManager; import org.argeo.slc.execution.ExecutionProcess; @@ -74,7 +74,7 @@ public class JcrProcessThread extends ProcessThread implements SlcNames { } } } catch (RepositoryException e) { - throw new ArgeoException("Cannot process " + throw new SlcException("Cannot process " + getJcrExecutionProcess().getNodePath(), e); } finally { JcrUtils.logoutQuietly(session); diff --git a/org.argeo.slc.core/src/org/argeo/slc/osgi/OsgiExecutionResources.java b/org.argeo.slc.core/src/org/argeo/slc/osgi/OsgiExecutionResources.java index 57f33cfc6..306ad07a8 100644 --- a/org.argeo.slc.core/src/org/argeo/slc/osgi/OsgiExecutionResources.java +++ b/org.argeo.slc.core/src/org/argeo/slc/osgi/OsgiExecutionResources.java @@ -22,10 +22,10 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.argeo.slc.SlcException; import org.argeo.slc.core.execution.FileExecutionResources; -import org.osgi.framework.BundleContext; -import org.springframework.core.io.Resource; import org.eclipse.gemini.blueprint.context.BundleContextAware; import org.eclipse.gemini.blueprint.io.OsgiBundleResource; +import org.osgi.framework.BundleContext; +import org.springframework.core.io.Resource; /** Write access to resources in an OSGi context */ public class OsgiExecutionResources extends FileExecutionResources implements diff --git a/org.argeo.slc.core/src/org/argeo/slc/osgi/OsgiRuntime.java b/org.argeo.slc.core/src/org/argeo/slc/osgi/OsgiRuntime.java index 2414649cd..8286eccd5 100644 --- a/org.argeo.slc.core/src/org/argeo/slc/osgi/OsgiRuntime.java +++ b/org.argeo.slc.core/src/org/argeo/slc/osgi/OsgiRuntime.java @@ -28,13 +28,13 @@ import org.argeo.slc.core.build.VersionedResourceDistribution; import org.argeo.slc.deploy.DeploymentData; import org.argeo.slc.deploy.DynamicRuntime; import org.argeo.slc.deploy.TargetData; +import org.eclipse.gemini.blueprint.context.BundleContextAware; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.BundleException; import org.springframework.context.ResourceLoaderAware; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; -import org.eclipse.gemini.blueprint.context.BundleContextAware; public class OsgiRuntime implements BundleContextAware, ResourceLoaderAware, DynamicRuntime { diff --git a/org.argeo.slc.core/src/org/argeo/slc/osgi/build/AbstractOsgiModularDistribution.java b/org.argeo.slc.core/src/org/argeo/slc/osgi/build/AbstractOsgiModularDistribution.java index a38adadcc..c76659f09 100644 --- a/org.argeo.slc.core/src/org/argeo/slc/osgi/build/AbstractOsgiModularDistribution.java +++ b/org.argeo.slc.core/src/org/argeo/slc/osgi/build/AbstractOsgiModularDistribution.java @@ -31,10 +31,10 @@ import org.argeo.slc.SlcException; import org.argeo.slc.UnsupportedException; import org.argeo.slc.build.Distribution; import org.argeo.slc.build.ModularDistribution; +import org.eclipse.gemini.blueprint.context.BundleContextAware; import org.osgi.framework.BundleContext; import org.osgi.framework.Constants; import org.springframework.beans.factory.InitializingBean; -import org.eclipse.gemini.blueprint.context.BundleContextAware; public abstract class AbstractOsgiModularDistribution implements ModularDistribution, BundleContextAware, InitializingBean { diff --git a/org.argeo.slc.core/src/org/argeo/slc/osgi/build/OsgiRuntimeModularDistribution.java b/org.argeo.slc.core/src/org/argeo/slc/osgi/build/OsgiRuntimeModularDistribution.java index 434ef0e09..5523e6efe 100644 --- a/org.argeo.slc.core/src/org/argeo/slc/osgi/build/OsgiRuntimeModularDistribution.java +++ b/org.argeo.slc.core/src/org/argeo/slc/osgi/build/OsgiRuntimeModularDistribution.java @@ -24,11 +24,11 @@ import org.argeo.slc.NameVersion; import org.argeo.slc.build.Distribution; import org.argeo.slc.core.build.VersionedResourceDistribution; import org.argeo.slc.osgi.OsgiBundle; +import org.eclipse.gemini.blueprint.util.OsgiBundleUtils; import org.osgi.framework.Bundle; import org.springframework.context.ResourceLoaderAware; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; -import org.eclipse.gemini.blueprint.util.OsgiBundleUtils; public class OsgiRuntimeModularDistribution extends AbstractOsgiModularDistribution implements ResourceLoaderAware { diff --git a/org.argeo.slc.core/src/org/argeo/slc/osgi/deploy/OsgiResourceSet.java b/org.argeo.slc.core/src/org/argeo/slc/osgi/deploy/OsgiResourceSet.java index d95137e23..2414788c8 100644 --- a/org.argeo.slc.core/src/org/argeo/slc/osgi/deploy/OsgiResourceSet.java +++ b/org.argeo.slc.core/src/org/argeo/slc/osgi/deploy/OsgiResourceSet.java @@ -16,13 +16,13 @@ package org.argeo.slc.osgi.deploy; import org.argeo.slc.core.deploy.DefaultResourceSet; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.springframework.core.io.ResourceLoader; import org.eclipse.gemini.blueprint.context.BundleContextAware; import org.eclipse.gemini.blueprint.io.OsgiBundleResourceLoader; import org.eclipse.gemini.blueprint.io.OsgiBundleResourcePatternResolver; import org.eclipse.gemini.blueprint.util.OsgiBundleUtils; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; +import org.springframework.core.io.ResourceLoader; /** * Retrieves ressources from an OSGi bundle either the active one or another one 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 377b35a75..be4075119 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 @@ -27,8 +27,8 @@ import org.argeo.slc.SlcException; import org.argeo.slc.aether.AetherUtils; import org.argeo.slc.jcr.SlcNames; import org.argeo.slc.jcr.SlcTypes; -import org.osgi.framework.Constants; import org.eclipse.aether.artifact.Artifact; +import org.osgi.framework.Constants; /** * Add {@link Artifact} properties to a {@link Node}. Does nothing if the node diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/ModularDistributionFactory.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/ModularDistributionFactory.java index af96f232d..efd64aec5 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/ModularDistributionFactory.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/ModularDistributionFactory.java @@ -22,9 +22,9 @@ import org.argeo.jcr.JcrUtils; import org.argeo.slc.CategorizedNameVersion; import org.argeo.slc.NameVersion; import org.argeo.slc.SlcException; -import org.osgi.framework.Constants; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; +import org.osgi.framework.Constants; /** * Creates a jar bundle from an ArgeoOsgiDistribution. This jar is then diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/ModularDistributionIndexer.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/ModularDistributionIndexer.java index 7b445345b..0b2ecfb77 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/ModularDistributionIndexer.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/ModularDistributionIndexer.java @@ -28,9 +28,9 @@ import org.argeo.slc.aether.AetherUtils; import org.argeo.slc.build.Distribution; import org.argeo.slc.jcr.SlcNames; import org.argeo.slc.jcr.SlcTypes; -import org.osgi.framework.Constants; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; +import org.osgi.framework.Constants; /** * Create or update JCR meta-data for an SLC Modular Distribution 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 0bdf6740f..b3acaf4fd 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 @@ -44,7 +44,7 @@ import javax.jcr.query.QueryResult; import org.apache.commons.io.IOUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoMonitor; +import org.argeo.jcr.JcrMonitor; import org.argeo.jcr.JcrUtils; import org.argeo.node.NodeUtils; import org.argeo.slc.SlcException; @@ -84,7 +84,7 @@ public class RepoSync implements Runnable { private RepositoryFactory repositoryFactory; - private ArgeoMonitor monitor; + private JcrMonitor monitor; private Map workspaceMap; // TODO fix monitor @@ -578,7 +578,7 @@ public class RepoSync implements Runnable { this.workspaceMap = null; } - public void setMonitor(ArgeoMonitor monitor) { + public void setMonitor(JcrMonitor monitor) { this.monitor = monitor; } 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 3ac2f0b0b..e09f80cba 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 @@ -51,11 +51,12 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoMonitor; +import org.argeo.jcr.JcrMonitor; import org.argeo.jcr.JcrUtils; import org.argeo.node.ArgeoNames; import org.argeo.node.ArgeoTypes; import org.argeo.node.NodeUtils; +import org.argeo.node.security.Keyring; import org.argeo.slc.DefaultNameVersion; import org.argeo.slc.NameVersion; import org.argeo.slc.SlcException; @@ -63,7 +64,6 @@ import org.argeo.slc.aether.ArtifactIdComparator; import org.argeo.slc.jcr.SlcNames; import org.argeo.slc.jcr.SlcTypes; import org.argeo.slc.repo.maven.MavenConventionsUtils; -import org.argeo.util.security.Keyring; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; import org.osgi.framework.Constants; @@ -552,7 +552,7 @@ public class RepoUtils implements ArgeoNames, SlcNames { copy(fromNode, toNode, null); } - public static void copy(Node fromNode, Node toNode, ArgeoMonitor monitor) { + public static void copy(Node fromNode, Node toNode, JcrMonitor monitor) { try { String fromPath = fromNode.getPath(); if (monitor != null) diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/core/RepoServiceImpl.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/core/RepoServiceImpl.java index 45ea83ab7..f3be31693 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/core/RepoServiceImpl.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/core/RepoServiceImpl.java @@ -4,9 +4,9 @@ import javax.jcr.Repository; import javax.jcr.RepositoryFactory; import javax.jcr.Session; +import org.argeo.node.security.Keyring; import org.argeo.slc.repo.RepoService; import org.argeo.slc.repo.RepoUtils; -import org.argeo.util.security.Keyring; /** * Work in Progress - enhance this. First implementation of a service that 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 a745bb22e..bfba8d01c 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 @@ -30,7 +30,7 @@ import javax.jcr.Session; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoMonitor; +import org.argeo.jcr.JcrMonitor; import org.argeo.jcr.JcrUtils; import org.argeo.slc.SlcException; import org.argeo.slc.aether.ArtifactIdComparator; @@ -39,9 +39,9 @@ import org.argeo.slc.jcr.SlcTypes; import org.argeo.slc.repo.ArtifactIndexer; import org.argeo.slc.repo.RepoConstants; import org.argeo.slc.repo.RepoUtils; -import org.osgi.framework.Version; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; +import org.osgi.framework.Version; /** * Generates binaries-, sources- and sdk-version.pom artifacts for a given @@ -101,7 +101,7 @@ public class GenerateBinaries implements Runnable, SlcNames { * indexed. */ public static void processGroupNode(Node groupNode, String version, - ArgeoMonitor monitor) throws RepositoryException { + JcrMonitor monitor) throws RepositoryException { // TODO set artifactsBase based on group node GenerateBinaries gb = new GenerateBinaries(); String groupId = groupNode.getProperty(SlcNames.SLC_GROUP_BASE_ID) @@ -115,7 +115,7 @@ public class GenerateBinaries implements Runnable, SlcNames { /** Only builds local indexes. Does not change anything in the local Session */ public static GenerateBinaries preProcessGroupNode(Node groupNode, - ArgeoMonitor monitor) throws RepositoryException { + JcrMonitor monitor) throws RepositoryException { // TODO set artifactsBase based on group node GenerateBinaries gb = new GenerateBinaries(); String groupId = groupNode.getProperty(SlcNames.SLC_GROUP_BASE_ID) @@ -148,7 +148,7 @@ public class GenerateBinaries implements Runnable, SlcNames { * methods build the binaries {@code Set} and other indexes. It * does not impact the */ - protected void internalPreProcessing(Node groupNode, ArgeoMonitor monitor) + protected void internalPreProcessing(Node groupNode, JcrMonitor monitor) throws RepositoryException { if (monitor != null) monitor.subTask("Pre processing group " + groupId); @@ -187,7 +187,7 @@ public class GenerateBinaries implements Runnable, SlcNames { } /** Does the real job : writes JCR META-DATA and generates binaries */ - protected void internalProcessing(Node groupNode, ArgeoMonitor monitor) + protected void internalProcessing(Node groupNode, JcrMonitor monitor) throws RepositoryException { if (monitor != null) monitor.subTask("Processing group " + groupId); diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/ImportMavenDependencies.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/ImportMavenDependencies.java index c2b420374..009d1f9ed 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/ImportMavenDependencies.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/maven/ImportMavenDependencies.java @@ -42,8 +42,8 @@ import org.argeo.slc.repo.JarFileIndexer; import org.argeo.slc.repo.RepoConstants; import org.argeo.slc.repo.RepoUtils; import org.eclipse.aether.artifact.Artifact; -import org.eclipse.aether.graph.DependencyNode; import org.eclipse.aether.artifact.DefaultArtifact; +import org.eclipse.aether.graph.DependencyNode; /** * Import all the dependencies listed in a POM and their dependency graphs to a 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 7eb2e523e..1be5a8086 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 @@ -49,9 +49,9 @@ import org.argeo.slc.repo.ArtifactIndexer; import org.argeo.slc.repo.JarFileIndexer; import org.argeo.slc.repo.RepoUtils; import org.argeo.slc.repo.osgi.OsgiProfile; -import org.osgi.framework.Constants; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; +import org.osgi.framework.Constants; /** * Migrate the distribution from 1.2 to 1.4 by cleaning naming and dependencies. diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/BndWrapper.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/BndWrapper.java index 3f4dbea67..17bdbe117 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/BndWrapper.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/BndWrapper.java @@ -13,9 +13,9 @@ import org.argeo.slc.CategorizedNameVersion; import org.argeo.slc.SlcException; import org.argeo.slc.build.Distribution; import org.argeo.slc.build.License; -import org.osgi.framework.Version; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; +import org.osgi.framework.Version; import org.springframework.beans.factory.BeanNameAware; import aQute.lib.osgi.Builder; diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/MavenWrapper.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/MavenWrapper.java index a00a2bd4f..a5b6ec934 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/MavenWrapper.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/MavenWrapper.java @@ -5,7 +5,6 @@ import java.io.InputStream; import javax.jcr.Node; import javax.jcr.Property; -import javax.jcr.RepositoryException; import javax.jcr.Session; import org.apache.commons.io.IOUtils; 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 ef61bf11c..c7a3bcd53 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 @@ -32,7 +32,7 @@ import javax.jcr.Session; import org.apache.commons.io.FilenameUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoMonitor; +import org.argeo.jcr.JcrMonitor; import org.argeo.jcr.JcrUtils; import org.argeo.slc.SlcException; import org.argeo.slc.aether.ArtifactIdComparator; @@ -42,10 +42,10 @@ import org.argeo.slc.repo.ArtifactIndexer; import org.argeo.slc.repo.RepoConstants; import org.argeo.slc.repo.RepoUtils; import org.argeo.slc.repo.maven.MavenConventionsUtils; -import org.osgi.framework.Constants; -import org.osgi.framework.Version; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; +import org.osgi.framework.Constants; +import org.osgi.framework.Version; /** * Make sure that all JCR metadata and Maven metadata are consistent for this @@ -100,7 +100,7 @@ public class NormalizeGroup implements Runnable, SlcNames { } public static void processGroupNode(Node groupNode, String version, - Boolean overridePoms, ArgeoMonitor monitor) + Boolean overridePoms, JcrMonitor monitor) throws RepositoryException { // TODO set artifactsBase based on group node NormalizeGroup ng = new NormalizeGroup(); @@ -112,7 +112,7 @@ public class NormalizeGroup implements Runnable, SlcNames { ng.processGroupNode(groupNode, monitor); } - protected void processGroupNode(Node groupNode, ArgeoMonitor monitor) + protected void processGroupNode(Node groupNode, JcrMonitor monitor) throws RepositoryException { if (monitor != null) monitor.subTask("Group " + groupId); diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ProcessDistribution.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ProcessDistribution.java index 74c542528..7f5999037 100644 --- a/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ProcessDistribution.java +++ b/org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ProcessDistribution.java @@ -9,7 +9,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.argeo.jcr.JcrUtils; import org.argeo.slc.CategorizedNameVersion; -import org.argeo.slc.DefaultNameVersion; import org.argeo.slc.NameVersion; import org.argeo.slc.SlcException; import org.argeo.slc.repo.ArgeoOsgiDistribution; diff --git a/org.argeo.slc.support/ext/test/org/argeo/slc/aether/AetherUtilsTest.java b/org.argeo.slc.support/ext/test/org/argeo/slc/aether/AetherUtilsTest.java index ba22397bd..6f1370187 100644 --- a/org.argeo.slc.support/ext/test/org/argeo/slc/aether/AetherUtilsTest.java +++ b/org.argeo.slc.support/ext/test/org/argeo/slc/aether/AetherUtilsTest.java @@ -15,11 +15,11 @@ */ package org.argeo.slc.aether; +import junit.framework.TestCase; + import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; -import junit.framework.TestCase; - public class AetherUtilsTest extends TestCase { public void testConvertPathToArtifact() throws Exception { checkPathConversion("my.group.id:my-artifactId:pom:1.2.3", diff --git a/org.argeo.slc.support/src/org/argeo/slc/aether/AetherUtils.java b/org.argeo.slc.support/src/org/argeo/slc/aether/AetherUtils.java index 8da332b57..873ddcbfd 100644 --- a/org.argeo.slc.support/src/org/argeo/slc/aether/AetherUtils.java +++ b/org.argeo.slc.support/src/org/argeo/slc/aether/AetherUtils.java @@ -22,8 +22,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.argeo.slc.SlcException; import org.eclipse.aether.artifact.Artifact; -import org.eclipse.aether.graph.DependencyNode; import org.eclipse.aether.artifact.DefaultArtifact; +import org.eclipse.aether.graph.DependencyNode; /** Utilities related to Aether */ public class AetherUtils { diff --git a/org.argeo.slc.unit/src/org/argeo/slc/equinox/unit/AbstractOsgiRuntimeTestCase.java b/org.argeo.slc.unit/src/org/argeo/slc/equinox/unit/AbstractOsgiRuntimeTestCase.java index b5bd8aa62..2bcf96029 100644 --- a/org.argeo.slc.unit/src/org/argeo/slc/equinox/unit/AbstractOsgiRuntimeTestCase.java +++ b/org.argeo.slc.unit/src/org/argeo/slc/equinox/unit/AbstractOsgiRuntimeTestCase.java @@ -24,15 +24,15 @@ import junit.framework.TestCase; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.slc.SlcException; import org.argeo.osgi.boot.OsgiBoot; +import org.argeo.slc.SlcException; import org.eclipse.core.runtime.adaptor.EclipseStarter; +import org.eclipse.gemini.blueprint.util.OsgiStringUtils; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.ServiceReference; import org.springframework.context.ApplicationContext; -import org.eclipse.gemini.blueprint.util.OsgiStringUtils; @SuppressWarnings("restriction") public abstract class AbstractOsgiRuntimeTestCase extends TestCase { diff --git a/org.argeo.slc.unit/src/org/argeo/slc/unit/UnitUtils.java b/org.argeo.slc.unit/src/org/argeo/slc/unit/UnitUtils.java index 765ec70d8..75cc578e5 100644 --- a/org.argeo.slc.unit/src/org/argeo/slc/unit/UnitUtils.java +++ b/org.argeo.slc.unit/src/org/argeo/slc/unit/UnitUtils.java @@ -15,14 +15,14 @@ */ package org.argeo.slc.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; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNull; -import static junit.framework.Assert.assertNotNull; - public abstract class UnitUtils { public static void assertDateSec(Date expected, Date reached) { if (expected == null) { -- 2.39.2