Work in progress - work on modular distributions.
authorBruno Sinou <bsinou@argeo.org>
Fri, 7 Mar 2014 10:38:04 +0000 (10:38 +0000)
committerBruno Sinou <bsinou@argeo.org>
Fri, 7 Mar 2014 10:38:04 +0000 (10:38 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@6887 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/OpenModuleEditor.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/controllers/DistTreeDoubleClickListener.java
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ArtifactEditor.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ModuleEditorInput.java [new file with mode: 0644]
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ModuleListPage.java
plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/model/ModularDistVersionElem.java
runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/DistributionBundleIndexer.java
runtime/org.argeo.slc.repo/src/main/resources/org/argeo/slc/repo/repo.cnd
runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/SlcNames.java
runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/SlcTypes.java

diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/OpenModuleEditor.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/commands/OpenModuleEditor.java
new file mode 100644 (file)
index 0000000..26d32e7
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.commands;
+
+import javax.jcr.Node;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.RepositoryFactory;
+import javax.jcr.Session;
+
+import org.argeo.jcr.ArgeoNames;
+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.editors.ArtifactEditor;
+import org.argeo.slc.client.ui.dist.editors.ModuleEditorInput;
+import org.argeo.slc.client.ui.dist.editors.DistributionEditor;
+import org.argeo.slc.jcr.SlcTypes;
+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;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Open the relevant editor for a given module node of a given repository
+ * workspace. For the time being, modules can be artifacts or
+ * modularDistributions
+ */
+public class OpenModuleEditor extends AbstractHandler {
+       public final static String ID = DistPlugin.ID + ".openModuleEditor";
+       public final static String DEFAULT_LABEL = "Open relevant editor";
+
+       // use local node repo and repository factory to retrieve and log to
+       // relevant repository
+       public final static String PARAM_REPO_NODE_PATH = "param.repoNodePath";
+       // use URI and repository factory to retrieve and ANONYMOUSLY log in
+       // relevant repository
+       public final static String PARAM_REPO_URI = "param.repoUri";
+       public final static String PARAM_WORKSPACE_NAME = "param.workspaceName";
+       public final static String PARAM_ARTIFACT_PATH = "param.artifactPath";
+
+       /* DEPENDENCY INJECTION */
+       private Repository localRepository;
+       // We must log in the corresponding repository to get the node and be able
+       // to decide which editor to open depending on its mixin
+       private RepositoryFactory repositoryFactory;
+       private Keyring keyring;
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               String repoNodePath = event.getParameter(PARAM_REPO_NODE_PATH);
+               String repoUri = event.getParameter(PARAM_REPO_URI);
+               String workspaceName = event.getParameter(PARAM_WORKSPACE_NAME);
+               String artifactPath = event.getParameter(PARAM_ARTIFACT_PATH);
+
+               Session localSession = null;
+               Session businessSession = null;
+               Node repoNode = null;
+
+               try {
+                       if (repoNodePath != null && repoUri == null) {
+                               try {
+                                       localSession = localRepository.login();
+                                       if (repoNodePath != null
+                                                       && localSession.nodeExists(repoNodePath))
+                                               repoNode = localSession.getNode(repoNodePath);
+
+                                       businessSession = RepoUtils.getCorrespondingSession(
+                                                       repositoryFactory, keyring, repoNode, repoUri,
+                                                       workspaceName);
+                                       repoUri = repoNode.getProperty(ArgeoNames.ARGEO_URI)
+                                                       .getString();
+
+                               } catch (RepositoryException e) {
+                                       throw new SlcException("Cannot log to workspace "
+                                                       + workspaceName + " for repo defined in "
+                                                       + repoNodePath, e);
+                               } finally {
+                                       JcrUtils.logoutQuietly(localSession);
+                               }
+
+                       }
+
+                       ModuleEditorInput wei = new ModuleEditorInput(repoNodePath,
+                                       repoUri, workspaceName, artifactPath);
+                       Node artifact = businessSession.getNode(artifactPath);
+
+                       // Choose correct editor based on the artifact mixin
+                       if (artifact.isNodeType(SlcTypes.SLC_MODULAR_DISTRIBUTION))
+                               HandlerUtil.getActiveWorkbenchWindow(event).getActivePage()
+                                               .openEditor(wei, DistributionEditor.ID);
+                       else
+                               HandlerUtil.getActiveWorkbenchWindow(event).getActivePage()
+                                               .openEditor(wei, ArtifactEditor.ID);
+               } catch (RepositoryException e) {
+                       throw new SlcException("Unexpected error while "
+                                       + "getting repoNode info for repoNode at path "
+                                       + repoNodePath, e);
+               } catch (PartInitException e) {
+                       throw new SlcException("Unexpected error while "
+                                       + "opening editor for workspace " + workspaceName
+                                       + " with URI " + repoUri + " and repoNode at path "
+                                       + repoNodePath, e);
+               }
+               return null;
+       }
+
+       /* DEPENDENCY INJECTION */
+       public void setLocalRepository(Repository localRepository) {
+               this.localRepository = localRepository;
+       }
+
+       public void setRepositoryFactory(RepositoryFactory repositoryFactory) {
+               this.repositoryFactory = repositoryFactory;
+       }
+
+       public void setKeyring(Keyring keyring) {
+               this.keyring = keyring;
+       }
+
+}
\ No newline at end of file
index 6e8d53734ce0b3ec64a58b47b3df83e805bad441..449bdf319ea05bd9a3e203bf1b8f6ae8eac5ceaf 100644 (file)
@@ -8,7 +8,9 @@ import javax.jcr.RepositoryException;
 
 import org.argeo.eclipse.ui.utils.CommandUtils;
 import org.argeo.slc.SlcException;
+import org.argeo.slc.client.ui.dist.commands.OpenModuleEditor;
 import org.argeo.slc.client.ui.dist.commands.OpenWorkspaceEditor;
+import org.argeo.slc.client.ui.dist.model.ModularDistVersionElem;
 import org.argeo.slc.client.ui.dist.model.RepoElem;
 import org.argeo.slc.client.ui.dist.model.WorkspaceElem;
 import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -39,16 +41,17 @@ public class DistTreeDoubleClickListener implements IDoubleClickListener {
                        }
                } else if (obj instanceof WorkspaceElem) {
                        WorkspaceElem wn = (WorkspaceElem) obj;
-                       if (!wn.isConnected())
+                       if (!wn.isConnected()) {
                                wn.login();
-                       else {
+                               treeViewer.refresh(obj);
+                       } else {
                                WorkspaceElem we = (WorkspaceElem) obj;
-
+                               Node repoNode = null;
                                try {
                                        RepoElem repoElem = we.getRepoElem();
                                        Map<String, String> params = new HashMap<String, String>();
 
-                                       Node repoNode = repoElem.getRepoNode();
+                                       repoNode = repoElem.getRepoNode();
                                        if (repoNode != null)
                                                params.put(OpenWorkspaceEditor.PARAM_REPO_NODE_PATH,
                                                                repoNode.getPath());
@@ -58,13 +61,36 @@ public class DistTreeDoubleClickListener implements IDoubleClickListener {
                                                        we.getWorkspaceName());
                                        CommandUtils.callCommand(OpenWorkspaceEditor.ID, params);
                                } catch (RepositoryException re) {
-                                       throw new SlcException(
-                                                       "Cannot get path for node while "
-                                                                       + "setting parameters of command OpenWorkspaceEditor",
-                                                       re);
+                                       throw new SlcException("Cannot get path for node "
+                                                       + repoNode + " while "
+                                                       + "setting parameters of command "
+                                                       + "OpenWorkspaceEditor", re);
                                }
                        }
-                       treeViewer.refresh(obj);
+               } else if (obj instanceof ModularDistVersionElem) {
+                       ModularDistVersionElem modDistElem = (ModularDistVersionElem) obj;
+                       WorkspaceElem wkspElem = modDistElem.getWorkspaceElem();
+                       Node repoNode = null;
+                       Node moduleNode = modDistElem.getModularDistVersionNode();
+                       try {
+                               RepoElem repoElem = wkspElem.getRepoElem();
+                               Map<String, String> params = new HashMap<String, String>();
+                               repoNode = repoElem.getRepoNode();
+                               if (repoNode != null)
+                                       params.put(OpenModuleEditor.PARAM_REPO_NODE_PATH,
+                                                       repoNode.getPath());
+                               params.put(OpenModuleEditor.PARAM_REPO_URI, repoElem.getUri());
+                               params.put(OpenModuleEditor.PARAM_WORKSPACE_NAME,
+                                               wkspElem.getWorkspaceName());
+                               params.put(OpenModuleEditor.PARAM_ARTIFACT_PATH,
+                                               moduleNode.getPath());
+                               CommandUtils.callCommand(OpenModuleEditor.ID, params);
+                       } catch (RepositoryException re) {
+                               throw new SlcException("Cannot get path for node " + repoNode
+                                               + " or " + moduleNode
+                                               + " while setting parameters for "
+                                               + "command OpenModuleEditor", re);
+                       }
                }
        }
 }
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ArtifactEditor.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ArtifactEditor.java
new file mode 100644 (file)
index 0000000..db5849e
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.editors;
+
+import javax.jcr.Node;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.RepositoryFactory;
+import javax.jcr.Session;
+
+import org.argeo.ArgeoException;
+import org.argeo.jcr.JcrUtils;
+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;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/**
+ * Base editor to manage an artifact in a multirepository environment
+ */
+public class ArtifactEditor extends FormEditor implements SlcNames {
+       // private final static Log log =
+       // LogFactory.getLog(ArtifactEditor.class);
+       public final static String ID = DistPlugin.ID + ".artifactEditor";
+
+       private ModuleEditorInput editorInput;
+
+       /* DEPENDENCY INJECTION */
+       private RepositoryFactory repositoryFactory;
+       private Repository localRepository;
+       private Keyring keyring;
+
+       // Business objects
+       private Node repoNode;
+       // Session that provides the node in the home of the local repository
+       private Session localSession = null;
+       // The business Session on an optionally remote repository
+       private Session businessSession;
+       private Node artifact;
+
+       @Override
+       public void init(IEditorSite site, IEditorInput input)
+                       throws PartInitException {
+               editorInput = (ModuleEditorInput) input;
+               try {
+                       localSession = localRepository.login();
+                       if (editorInput.getRepoNodePath() != null
+                                       && localSession.nodeExists(editorInput.getRepoNodePath()))
+                               repoNode = localSession.getNode(editorInput.getRepoNodePath());
+                       businessSession = RepoUtils.getCorrespondingSession(
+                                       repositoryFactory, keyring, repoNode, editorInput.getUri(),
+                                       editorInput.getWorkspaceName());
+                       artifact = businessSession.getNode(editorInput.getModulePath());
+               } catch (RepositoryException e) {
+                       throw new PartInitException(
+                                       "Unable to initialise editor for artifact "
+                                                       + editorInput.getModulePath() + " in workspace "
+                                                       + editorInput.getWorkspaceName()
+                                                       + " of repository " + editorInput.getUri(), e);
+               }
+               setPartName(editorInput.getWorkspaceName());
+               super.init(site, input);
+       }
+
+       @Override
+       protected void addPages() {
+               try {
+                       addPage(new DistributionOverviewPage(this, "Overview",
+                                       businessSession));
+                       addPage(new ArtifactsBrowserPage(this, "Browser", businessSession));
+               } catch (PartInitException e) {
+                       throw new ArgeoException("Cannot add distribution editor pages", e);
+               }
+       }
+
+       @Override
+       public void doSave(IProgressMonitor arg0) {
+       }
+
+       @Override
+       public void dispose() {
+               JcrUtils.logoutQuietly(businessSession);
+               JcrUtils.logoutQuietly(localSession);
+               super.dispose();
+       }
+
+       @Override
+       public void doSaveAs() {
+       }
+
+       @Override
+       public boolean isSaveAsAllowed() {
+               return false;
+       }
+
+       protected Node getRepoNode() {
+               return repoNode;
+       }
+
+       protected Node getArtifact() {
+               return artifact;
+       }
+
+       /* DEPENDENCY INJECTION */
+       public void setRepositoryFactory(RepositoryFactory repositoryFactory) {
+               this.repositoryFactory = repositoryFactory;
+       }
+
+       public void setKeyring(Keyring keyring) {
+               this.keyring = keyring;
+       }
+
+       public void setLocalRepository(Repository localRepository) {
+               this.localRepository = localRepository;
+       }
+}
\ No newline at end of file
diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ModuleEditorInput.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ModuleEditorInput.java
new file mode 100644 (file)
index 0000000..bc15959
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.slc.client.ui.dist.editors;
+
+import org.argeo.jcr.JcrUtils;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.jcr.SlcNames;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+
+/**
+ * An editor input for a JCR node object in a multi-repository environment.
+ */
+public class ModuleEditorInput implements IEditorInput, SlcNames {
+
+       // Define relevant workspace on a given repository
+       private String repoNodePath;
+       private String uri;
+       private String workspaceName;
+       private String modulePath;
+
+       public ModuleEditorInput(String repoNodePath, String uri,
+                       String workspaceName, String artifactPath) {
+               if (workspaceName == null)
+                       throw new SlcException("Workspace name cannot be null");
+               if (uri == null)
+                       throw new SlcException("URI for repository cannot be null");
+               if (artifactPath == null)
+                       throw new SlcException("Module path cannot be null");
+               this.repoNodePath = repoNodePath;
+               this.uri = uri;
+               this.workspaceName = workspaceName;
+               this.modulePath = artifactPath;
+       }
+
+       public String getModulePath() {
+               return modulePath;
+       }
+
+       public String getWorkspaceName() {
+               return workspaceName;
+       }
+
+       public String getRepoNodePath() {
+               return repoNodePath;
+       }
+
+       public String getUri() {
+               return uri;
+       }
+
+       public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+               return null;
+       }
+
+       public boolean exists() {
+               return true;
+       }
+
+       public ImageDescriptor getImageDescriptor() {
+               return null;
+       }
+
+       // Dummy compulsory methods
+       public String getToolTipText() {
+               return getModulePath();
+       }
+
+       public String getName() {
+               return JcrUtils.lastPathElement(modulePath);
+       }
+
+       public IPersistableElement getPersistable() {
+               return null;
+       }
+
+       /**
+        * equals method based on coordinates
+        */
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+
+               ModuleEditorInput other = (ModuleEditorInput) obj;
+
+               if (!modulePath.equals(other.getModulePath()))
+                       return false;
+               if (!workspaceName.equals(other.getWorkspaceName()))
+                       return false;
+               if (!uri.equals(other.getUri()))
+                       return false;
+
+               if (repoNodePath == null)
+                       return other.getRepoNodePath() == null;
+               else
+                       return repoNodePath.equals(other.getRepoNodePath());
+       }
+}
\ No newline at end of file
index 04fee41ec753f2d72a5eac64bf9d602d1958de32..31909590be8e6c26a3d0e7a1e75d8f9c7bb44ba8 100644 (file)
@@ -151,11 +151,11 @@ public class ModuleListPage extends FormPage implements SlcNames {
                        // Create a dynamic operand for each property on which we want to
                        // filter
                        DynamicOperand catDO = factory.propertyValue(
-                                       source.getSelectorName(), SlcNames.SLC_MODULE_CATEGORY);
+                                       source.getSelectorName(), SlcNames.SLC_CATEGORY);
                        DynamicOperand nameDO = factory.propertyValue(
-                                       source.getSelectorName(), SlcNames.SLC_MODULE_NAME);
+                                       source.getSelectorName(), SlcNames.SLC_NAME);
                        DynamicOperand versionDO = factory.propertyValue(
-                                       source.getSelectorName(), SlcNames.SLC_MODULE_VERSION);
+                                       source.getSelectorName(), SlcNames.SLC_VERSION);
 
                        String path = modularDistribution.getPath() + "/"
                                        + SlcNames.SLC_MODULES;
index 8199f6901b0e9582c7710998bbcdb15c194cc8da..54a82e812d161ad50b06fdb50457cb76e236cf25 100644 (file)
@@ -25,6 +25,10 @@ public class ModularDistVersionElem extends DistParentElem {
                return getName();
        }
 
+       public WorkspaceElem getWorkspaceElem() {
+               return (WorkspaceElem) getParent().getParent();
+       }
+
        public Node getModularDistVersionNode() {
                return modularDistVersionNode;
        }
index 7441490bcbad0f3c145543a51b2815dad73fc4ca..7dfefc2a1ed9ca4f4fde3c2669004473684f512d 100644 (file)
@@ -136,14 +136,13 @@ public class DistributionBundleIndexer implements NodeIndexer {
                                                Node moduleCoord = modules.addNode(
                                                                artifact.getArtifactId(),
                                                                SlcTypes.SLC_MODULE_COORDINATES);
-                                               moduleCoord.setProperty(SlcNames.SLC_MODULE_NAME,
+                                               moduleCoord.setProperty(SlcNames.SLC_NAME,
                                                                artifact.getArtifactId());
-                                               moduleCoord.setProperty(SlcNames.SLC_MODULE_VERSION,
+                                               moduleCoord.setProperty(SlcNames.SLC_VERSION,
                                                                artifact.getVersion());
                                                String groupId = artifact.getGroupId();
                                                if (groupId != null && !"".equals(groupId.trim()))
-                                                       moduleCoord.setProperty(
-                                                                       SlcNames.SLC_MODULE_CATEGORY,
+                                                       moduleCoord.setProperty(SlcNames.SLC_CATEGORY,
                                                                        artifact.getGroupId());
                                        }
                                }
@@ -188,8 +187,10 @@ public class DistributionBundleIndexer implements NodeIndexer {
                        while ((line = reader.readLine()) != null) {
 
                                StringTokenizer st = new StringTokenizer(line, separator);
-                               String moduleName = st.nextToken();
-                               String moduleVersion = st.nextToken();
+                               // String moduleName =
+                               st.nextToken();
+                               // String moduleVersion =
+                               st.nextToken();
                                String relativeUrl = st.nextToken();
 
                                //
@@ -208,17 +209,17 @@ public class DistributionBundleIndexer implements NodeIndexer {
                return artifacts;
        }
 
-       /** Relative path to the directories where the files will be stored */
-       private String getCategoryFromRelativeUrl(String relativeUrl,
-                       String moduleName) {
-               int index = relativeUrl.indexOf("moduleName");
-               if (index < 1)
-                       throw new SlcException("Unvalid relative URL: " + relativeUrl
-                                       + " for module " + moduleName);
-               // Remove trailing /
-               String result = relativeUrl.substring(0, index - 1);
-               return result.replace('/', '.');
-       }
+       // /** Relative path to the directories where the files will be stored */
+       // private String getCategoryFromRelativeUrl(String relativeUrl,
+       // String moduleName) {
+       // int index = relativeUrl.indexOf("moduleName");
+       // if (index < 1)
+       // throw new SlcException("Unvalid relative URL: " + relativeUrl
+       // + " for module " + moduleName);
+       // // Remove trailing /
+       // String result = relativeUrl.substring(0, index - 1);
+       // return result.replace('/', '.');
+       // }
 
        /**
         * List full URLs of the bundles, based on base URL, usable directly for
index 798046887e8cd1890b8959cd067708f49d675668..33d4444a4c8dbfb16afa1972deddfdb14d8799f1 100644 (file)
@@ -26,10 +26,18 @@ mixin
 // so using groupId would conflict 
 - slc:groupBaseId (STRING) m
 
+// Mark a given group base as relevant to create modular distribution in the current workspace  
+[slc:category]
+mixin
+
 [slc:distribution] > slc:artifactVersion
 mixin
 + slc:artifactVersions (argeo:references) m
 
+
+[slc:modularDistributionBase]
+mixin
+
 [slc:modularDistribution]
 mixin
 + slc:modules (nt:unstructured) m
index a68144a255e58f13d259ed4393034228011e6050..bc3300515f4a8c1a400b16fdc4c293606c145f07 100644 (file)
@@ -34,6 +34,7 @@ public interface SlcNames {
        public final static String SLC_AGGREGATED_STATUS = "slc:aggregatedStatus";
 
        public final static String SLC_TYPE = "slc:type";
+       public final static String SLC_CATEGORY = "slc:category";
        public final static String SLC_NAME = "slc:name";
        public final static String SLC_VERSION = "slc:version";
        public final static String SLC_VALUE = "slc:value";
@@ -118,11 +119,6 @@ public interface SlcNames {
        // slc:modularDistribution
        public final static String SLC_MODULES = "slc:modules";
 
-       // slc:moduleCoordinates
-       public final static String SLC_MODULE_CATEGORY = "slc:category";
-       public final static String SLC_MODULE_NAME = "slc:name";
-       public final static String SLC_MODULE_VERSION = "slc:version";
-
        // RPM
        // slc:rpm
        public final static String SLC_RPM_VERSION = "slc:rpmVersion";
index 0d647af8d0f34db2f27db06cc0496c3a1e1c393e..35f971dccc344a2f7a6e34fc70374ffa354c59da 100644 (file)
@@ -65,6 +65,9 @@ public interface SlcTypes {
        public final static String SLC_REQUIRED_BUNDLE = "slc:requiredBundle";
        public final static String SLC_FRAGMENT_HOST = "slc:fragmentHost";
        
+       // Distribution management
+       public final static String SLC_RELEVANT_CATEGORY = "slc:category";      
+       public final static String SLC_MODULAR_DISTRIBUTION_BASE = "slc:modularDistributionBase";
        public final static String SLC_MODULAR_DISTRIBUTION = "slc:modularDistribution";
        public final static String SLC_MODULE_COORDINATES = "slc:moduleCoordinates";