X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=plugins%2Forg.argeo.slc.client.ui.dist%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fdist%2Feditors%2FDistributionEditorInput.java;h=323e9ee65e03dae56a888df8eddbc2eb1e23d744;hb=b7ad99f6fc4414eeb82b9a4ae65aa20e02af66ce;hp=38d92549cc44f3d942d5cdb33dede5b8532d11d5;hpb=651d33e13bfa9a7b46464be412023ee747e612e8;p=gpl%2Fargeo-slc.git diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditorInput.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditorInput.java index 38d92549c..323e9ee65 100644 --- a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditorInput.java +++ b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditorInput.java @@ -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. @@ -15,9 +15,11 @@ */ 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