The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Set parameter as required
gabriel_nemeth
Member Posts: 5 Contributor II
Hi,
currently I have 2 parameters (URL_TEXT, LEVEL_TEXT):
public static final String URL_TEXT = "URL";
public static final String LEVEL_TEXT = "Depth of a crawl";
@Override
public List<ParameterType> getParameterTypes(){
List<ParameterType> types = super.getParameterTypes();
types.add(new ParameterTypeString(URL_TEXT, "", "", false));
types.add(new ParameterTypeString(LEVEL_TEXT, "", "", false));
return types;
}
How can I set these 2 parameters as required?
Tagged:
0
Best Answer
-
gabriel_nemeth Member Posts: 5 Contributor II
I found another implementation in core:
public ParameterTypeString(String key, String description, boolean optional) {
super(key, description);
this.defaultValue = null;
setOptional(optional);
}So in my case:
types.add(new ParameterTypeString(URL_TEXT, "Desc", false));
0