Hi there,
Is it possible to inject a ColdBox setting into a Transfer Decorator
when that object is first called?
The scenario I have is this ....
I've got a Transfer "Login" object - in the Decorator I have a method
called "isUnlocked()" which checks to see if the internal counter of
login attempts has hit the limit and returns true / false for the
result.
The actually limit just now is 6 but what I don't like is the fact
this setting is hardcoded into the top of my Decorator.
What I would like ideally is to have ColdBox / Lightwire inject this
into the object when I make a call like so:
var objLogin = super.getTransfer().readByPropertyMap('login',propMap);
Where an instance of Transfer is coming from my Base Service & then
I'm making a save to objLogin from the call to readByPropertyMap()
Is that possible as I don't really want to have to do something like
this everytime I call for this object -
var objLogin = super.getTransfer().readByPropertyMap('login',propMap);
objLogin.setLockLimit(super.getColdBox().getSetting('lockLimit');