I want to make the PrivilegesEvaluator flexible so that any user can use his/her own implementation of PrivilegesEvaluator
This is the idea
Introduce a new property as to which evaluator is to be initialized
Create an abstract class Evaluator. // Parent class of any evaluator
PrivilegesEvaluator implements the abstract class (only override the evaluate() api)
create abstract class EvaluatorResponse // Parent class of any evaluatorResponse
Create a EvaluatorFactory which returns the specified evaluator to be used when invoked.
Here are the links for PrivilegesEvaluator and PrivilegesEvaluatorResponse classes :
Is this design viable to be contributed or if not, please suggest changes?