-
Improvement
-
Resolution: Fixed
-
Critical
-
None
parameter filter can only filter by StringParameterValue, BooleanParameterValue and FileParameterValue. So we can't filter by custom parameters.
I can't understand why can't we change ParameterFilter class getStringValue function to something like this:
protected String getStringValue(ParameterValue value) { if (value instanceof StringParameterValue) { return ((StringParameterValue) value).value; } else if (value instanceof BooleanParameterValue) { boolean bval = ((BooleanParameterValue) value).value; return String.valueOf(bval); } else if (value instanceof FileParameterValue) { // not the full path - just the name // this is the only public value available to us String file = ((FileParameterValue) value).getOriginalFileName(); return file; } else { return value.toString(); } }
mine difference is return value.toString(); not return null;
This would be easy to implement, but I don't know of any parameters that use "toString". If you just mean your own company's custom parameters, then it can still be implemented, it just won't really be easy to test before releasing. It would be more helpful if you could give an example parameter plugin that I could install and test against. I tried a couple, but they don't use "toString", so it didn't work.