]> 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
Fix bug 28 (https://www.argeo.org/bugzilla/show_bug.cgi?id=28)
[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..323e9ee65e03dae56a888df8eddbc2eb1e23d744 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2012 Mathieu Baudier
+ * Copyright (C) 2007-2012 Argeo GmbH
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 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;
@@ -28,19 +30,31 @@ import org.eclipse.ui.IPersistableElement;
 public class DistributionEditorInput implements IEditorInput, SlcNames {
 
        private Repository repository;
+       private Credentials credentials;
+       private String repositoryName;
+       private String repositoryDescription;
        private String workspaceName;
-       private String artifactsBase = "/";
 
-       public DistributionEditorInput(Repository repository, String workspaceName,
+       private String artifactsBase;
+
+       public DistributionEditorInput(Repository repository,
+                       Credentials credentials, String repositoryName,
+                       String repositoryDescription, String workspaceName,
                        String artifactsBase) {
                super();
                this.repository = repository;
+               this.repositoryName = repositoryName;
+               this.repositoryDescription = repositoryDescription;
                this.workspaceName = workspaceName;
                this.artifactsBase = artifactsBase;
+               this.credentials = credentials;
        }
 
-       public DistributionEditorInput(Repository repository, String workspaceName) {
-               this(repository, workspaceName, "/");
+       public DistributionEditorInput(Repository repository,
+                       Credentials credentials, String repositoryName,
+                       String repositoryDescription, String workspaceName) {
+               this(repository, credentials, repositoryName, repositoryDescription,
+                               workspaceName, RepoConstants.DEFAULT_ARTIFACTS_BASE_PATH);
        }
 
        public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
@@ -93,4 +107,15 @@ public class DistributionEditorInput implements IEditorInput, SlcNames {
                return artifactsBase;
        }
 
-}
+       public String getRepositoryName() {
+               return repositoryName;
+       }
+
+       public String getRepositoryDescription() {
+               return repositoryDescription;
+       }
+
+       public Credentials getCredentials() {
+               return credentials;
+       }
+}
\ No newline at end of file