]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditorInput.java
Improve dist UI
[gpl/argeo-slc.git] / plugins / org.argeo.slc.client.ui.dist / src / main / java / org / argeo / slc / client / ui / dist / editors / DistributionEditorInput.java
index 38d92549cc44f3d942d5cdb33dede5b8532d11d5..883a20974546ab5bc51dd00c189586dcbe0f0e63 100644 (file)
  */
 package org.argeo.slc.client.ui.dist.editors;
 
+import javax.jcr.Credentials;
 import javax.jcr.Repository;
 
 import org.argeo.slc.jcr.SlcNames;
+import org.argeo.slc.repo.RepoConstants;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IPersistableElement;
@@ -27,20 +29,27 @@ import org.eclipse.ui.IPersistableElement;
  * */
 public class DistributionEditorInput implements IEditorInput, SlcNames {
 
+       private String repositoryName;
        private Repository repository;
        private String workspaceName;
-       private String artifactsBase = "/";
+       private String artifactsBase = RepoConstants.DEFAULT_ARTIFACTS_BASE_PATH;
+       private Credentials credentials;
 
-       public DistributionEditorInput(Repository repository, String workspaceName,
-                       String artifactsBase) {
+       public DistributionEditorInput(String repositoryName,
+                       Repository repository, String workspaceName, String artifactsBase,
+                       Credentials credentials) {
                super();
                this.repository = repository;
+               this.repositoryName = repositoryName;
                this.workspaceName = workspaceName;
                this.artifactsBase = artifactsBase;
+               this.credentials = credentials;
        }
 
-       public DistributionEditorInput(Repository repository, String workspaceName) {
-               this(repository, workspaceName, "/");
+       public DistributionEditorInput(String repositoryName,
+                       Repository repository, String workspaceName, Credentials credentials) {
+               this(repositoryName, repository, workspaceName,
+                               RepoConstants.DEFAULT_ARTIFACTS_BASE_PATH, credentials);
        }
 
        public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
@@ -93,4 +102,12 @@ public class DistributionEditorInput implements IEditorInput, SlcNames {
                return artifactsBase;
        }
 
+       public String getRepositoryName() {
+               return repositoryName;
+       }
+
+       public Credentials getCredentials() {
+               return credentials;
+       }
+
 }