/** * @deprecated Use {@link #requiredSingleValueSelection(Label, List)} instead. * @param internalId * @param label * @param description * @param options * @return */ public BU requiredSingleValueSelection(String internalId, String label, String description, List<Option> options) { OneOfStaticProperty osp = new OneOfStaticProperty(internalId, label, description); osp.setOptions(options); this.staticProperties.add(osp); return me(); }
/** * Defines a configuration parameter that lets pipeline developers select from a list of pre-defined configuration * options. The parameter will be rendered as a RadioGroup in the StreamPipes UI. * @param label The {@link org.streampipes.sdk.helpers.Label} that describes why this parameter is needed in a * user-friendly manner. * @param options A list of {@link org.streampipes.model.staticproperty.Option} elements. Use * {@link org.streampipes.sdk.helpers.Options} to create option elements from string values. * @return this */ public BU requiredSingleValueSelection(Label label, List<Option> options) { OneOfStaticProperty osp = new OneOfStaticProperty(label.getInternalId(), label.getLabel(), label.getDescription()); osp.setOptions(options); this.staticProperties.add(osp); return me(); }
public StaticProperty staticProperty(StaticProperty o) { if (o instanceof FreeTextStaticProperty) { return new FreeTextStaticProperty((FreeTextStaticProperty) o); } else if (o instanceof OneOfStaticProperty) { return new OneOfStaticProperty((OneOfStaticProperty) o); } else if (o instanceof RemoteOneOfStaticProperty) { return new RemoteOneOfStaticProperty((RemoteOneOfStaticProperty) o); } else if (o instanceof MappingPropertyNary) { return new MappingPropertyNary((MappingPropertyNary) o); } else if (o instanceof DomainStaticProperty) { return new DomainStaticProperty((DomainStaticProperty) o); } else if (o instanceof AnyStaticProperty) { return new AnyStaticProperty((AnyStaticProperty) o); } else if (o instanceof CollectionStaticProperty) { return new CollectionStaticProperty((CollectionStaticProperty) o); } else if (o instanceof MatchingStaticProperty) { return new MatchingStaticProperty((MatchingStaticProperty) o); } else if (o instanceof RuntimeResolvableOneOfStaticProperty) { return new RuntimeResolvableOneOfStaticProperty((RuntimeResolvableOneOfStaticProperty) o); } else if (o instanceof RuntimeResolvableAnyStaticProperty) { return new RuntimeResolvableAnyStaticProperty((RuntimeResolvableAnyStaticProperty) o); } else { return new MappingPropertyUnary((MappingPropertyUnary) o); } }