blob: a62853638f16ebf70f8ed1ca9fc4bf73460aa7b1 [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*/
package org.eclipse.osbp.infogrid.api;
import java.util.Map;
import org.eclipse.osbp.runtime.common.dispose.AbstractDisposable;
import org.eclipse.osbp.infogrid.model.gridsource.CxGridSource;
public abstract class AbstractGridSourceDescriptor extends AbstractDisposable
implements IGridSourceDescriptor, IGridSourceDescriptor.Internal {
protected final String id;
protected final CxGridSource source;
protected String label;
protected Map<String, Object> properties;
private Class<?> inputType;
public AbstractGridSourceDescriptor(Class<?> inputType, CxGridSource source) {
this.inputType = inputType;
this.id = source.getId();
this.source = source;
}
@Override
public String getId() {
return id;
}
@Override
public String getLabel() {
checkDisposed();
return label;
}
public Class<?> getInputType() {
return inputType;
}
public void setLabel(String label) {
checkDisposed();
this.label = label;
}
@Override
public CxGridSource getSource() {
checkDisposed();
return source;
}
@Override
public void setProperties(Map<String, Object> properties) {
this.properties = properties;
}
public Map<String, Object> getProperties() {
return properties;
}
}