io.rtdi.bigdata.connector.properties.atomic.PropertyText 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 PropertyText extends PropertyAbstract implements IPropertyValue {
protected String value;
public PropertyText() {
super();
}
public PropertyText(String name, String value) {
this(name, null, null, null, value, null);
}
public PropertyText(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 PropertyText) {
this.value = ((PropertyText) property).getValue();
} else {
throw new PropertiesException("PropertyText's value not of type PropertyText");
}
}
@Override
public String toString() {
return value;
}
@Override
public boolean hasValue() {
return value != null && value.length() != 0;
}
@Override
public IProperty clone(boolean ignorepasswords) {
return new PropertyText(this.getName(), this.getDisplayname(), this.getDescription(), this.getIcon(), this.getValue(), this.getMandatory());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy