]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/commands/NormalizeDistribution.java
Remove old license headers
[gpl/argeo-slc.git] / org.argeo.slc.client.ui.dist / src / org / argeo / slc / client / ui / dist / commands / NormalizeDistribution.java
index 6b849f9eecc14b99c87807086a6ef4187e1fff88..e35b9bc2366b652ecc136d53d1d15c2819d73679 100644 (file)
@@ -1,18 +1,3 @@
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF 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;
@@ -31,22 +16,24 @@ 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.api.security.Keyring;
+import org.argeo.eclipse.ui.EclipseJcrMonitor;
+import org.argeo.jcr.JcrMonitor;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.slc.NameVersion;
 import org.argeo.slc.SlcException;
-import org.argeo.slc.aether.AetherUtils;
+import org.argeo.slc.SlcNames;
+import org.argeo.slc.SlcTypes;
 import org.argeo.slc.client.ui.dist.DistPlugin;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
 import org.argeo.slc.repo.ArtifactIndexer;
 import org.argeo.slc.repo.JarFileIndexer;
 import org.argeo.slc.repo.RepoConstants;
 import org.argeo.slc.repo.RepoUtils;
+import org.argeo.slc.repo.maven.AetherUtils;
 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;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -69,15 +56,14 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.aether.artifact.Artifact;
-import org.eclipse.aether.artifact.DefaultArtifact;
 
 /** Legacy - Make sure than Maven and OSGi metadata are consistent */
 public class NormalizeDistribution extends AbstractHandler implements SlcNames {
        private final static Log log = LogFactory
                        .getLog(NormalizeDistribution.class);
 
-       public final static String ID = DistPlugin.ID + ".normalizeDistribution";
+       public final static String ID = DistPlugin.PLUGIN_ID
+                       + ".normalizeDistribution";
        public final static String DEFAULT_LABEL = "Legacy Normalization...";
        public final static ImageDescriptor DEFAULT_ICON = DistPlugin
                        .getImageDescriptor("icons/normalize.gif");
@@ -206,7 +192,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()
@@ -237,7 +223,7 @@ public class NormalizeDistribution extends AbstractHandler implements SlcNames {
                                                        overridePoms, monitor);
                                }
                        } catch (Exception e) {
-                               return new Status(IStatus.ERROR, DistPlugin.ID,
+                               return new Status(IStatus.ERROR, DistPlugin.PLUGIN_ID,
                                                "Cannot normalize distribution "
                                                                + session.getWorkspace().getName(), e);
                        } finally {
@@ -249,9 +235,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;
                }
@@ -302,6 +288,8 @@ public class NormalizeDistribution extends AbstractHandler implements SlcNames {
        }
 
        public class NormalizationDialog extends TitleAreaDialog {
+               private static final long serialVersionUID = -3103886455862638580L;
+
                private Text versionT;
                private String version;
                private Button overridePomsC;