Not sure if this capability is already in wirebox or if it’s been discussed, I’m hoping someone may point me in the right direction… I’ve been using ColdBox for a while now, but with ColdSpring. I’m looking to use Wirebox on this new project…
Thanks,
In ColdSpring, you have a feature for creating abstract bean definitions and call on them on the actual implementation bean, for example:
So all my SecurityService and any other XXXServices that inherits from AbstractService, I don’t have to inject these three properties over and over, I just set the parent=“abstractService” attribute like so:
I’m curious if this is possible in WireBox’s Binder definition, I’m looking to see if something like this already exists:
// abstract objects
map(“abstractService”).asAbstract()
.asSingleton()
.property(name:“systemUtil”, ref:“systemUtil”)
.property(name:“errorFactory”, ref:“errorFactory”)
.property(name:“securityFacade”, ref:“securityFacade”);
So for every services mapping I simply do this:
// service definition(s)
map(“securityService”).to(“gov.nvlap.system.security.SecurityService”)
.abstractParent(“abstractService”)
.property(name:“userManager”, ref:“userManager”)
.property(name:“roleManager”, ref:“roleManager”)
.property(name:“logManager”, ref:“logManager”);