Here is my quesion,
I have a feature switch with a custom strategy named "UserActivationStrategy". All it does is, it has a hard coded value as 'user' in Id field and a 'IpAddress' as param and some logic to return true/false in isActive(state,user).
So strategy to be invoked is determined based on hard coded Id. Here is my application.properties with those defined
CustomFeature = true
CustomFeature.strategy= user
CustomFeature.param.IpAddress= xx.xx.xxx
The above tells that ....UserActivationStrategy is invoked based on Id('user') which is hard coded in strategy. In UserActivationStrategy I am verfying the Ipaddress and returning true/false.
So what if I need to perform same logic on different users with different IpAddress. Its like combinations. Certain user's have access to certain IpAddress.
I cannot create feature switch for each user or for each IPAddress. It would creates many feature switches.
If I add users and IPAddress as params in a strategy. I end up creating many params in single strategy which is not good.
Any solution to this is appreciated. Thanks.