io.rtdi.bigdata.connector.properties.atomic.PropertyString Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pipelinefoundation Show documentation
Show all versions of pipelinefoundation Show documentation
The abstraction of an Apache Kafka-like Pipeline and common classes/interfaces.
package io.rtdi.bigdata.connector.properties.atomic;
import io.rtdi.bigdata.connector.pipeline.foundation.exceptions.PropertiesException;
public class PropertyString extends PropertyAbstract implements IPropertyValue {
protected String value;
public PropertyString() {
super();
}
public PropertyString(String name, String value) {
this(name, null, null, null, value, null);
}
public PropertyString(String name, String displayname, String description, String icon, String defaultvalue, Boolean mandatory) {
super(name, displayname, description, icon, mandatory);
setValue(defaultvalue);
}
public void setValue(String value) {
this.value = value;
}
@Override
public String getValue() {
return value;
}
@Override
public void parseValue(IProperty property, boolean ignorepasswords) throws PropertiesException {
if (property instanceof PropertyString) {
this.value = ((PropertyString) property).getValue();
} else {
throw new PropertiesException("PropertyString's value not of type PropertyString");
}
}
@Override
public String toString() {
return value;
}
@Override
public boolean hasValue() {
return value != null && value.length() != 0;
}
@Override
public IProperty clone(boolean ignorepasswords) {
return new PropertyString(this.getName(), this.getDisplayname(), this.getDescription(), this.getIcon(), this.getValue(), this.getMandatory());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy