X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Forg.argeo.slc.client.ui.dist%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fdist%2Feditors%2FDistributionEditorInput.java;fp=plugins%2Forg.argeo.slc.client.ui.dist%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fdist%2Feditors%2FDistributionEditorInput.java;h=0000000000000000000000000000000000000000;hb=bf13c278fb0bfbca721af35926a0bae5c57d0ed2;hp=323e9ee65e03dae56a888df8eddbc2eb1e23d744;hpb=1e6cf7254fb9f150251594cf0383b3b1c5210517;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 deleted file mode 100644 index 323e9ee65..000000000 --- a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/DistributionEditorInput.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * 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.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; - -/** - * An editor input pointing to a distribution - * */ -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, - 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, - 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) { - return null; - } - - public boolean exists() { - return true; - } - - public ImageDescriptor getImageDescriptor() { - return null; - } - - // Dummy compulsory methods - public String getToolTipText() { - return workspaceName; - } - - public String getName() { - return workspaceName; - } - - public IPersistableElement getPersistable() { - return null; - } - - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (!(obj instanceof DistributionEditorInput)) - return false; - - DistributionEditorInput other = (DistributionEditorInput) obj; - return getRepository().equals(other.getRepository()) - && getWorkspaceName().equals(other.getWorkspaceName()); - } - - public Repository getRepository() { - return repository; - } - - public String getWorkspaceName() { - return workspaceName; - } - - public String getArtifactsBase() { - return artifactsBase; - } - - public String getRepositoryName() { - return repositoryName; - } - - public String getRepositoryDescription() { - return repositoryDescription; - } - - public Credentials getCredentials() { - return credentials; - } -} \ No newline at end of file