Unfortunately, create a !define inside a !deflinelong will not work.
Really sorry about that, but you are trying to do something too complex for the preprocessor.
There is a discussion to add some scripting facilities within PlantUML. See
http://wiki.plantuml.net/site/plantumlshell
I think that this would be the right way of doing what you want to do. However, this is far from beeing implemented.
You can still put your ideas there so that one day it will be available.
Regards,