Invoking Author Operation programatically
Posted: Fri Nov 13, 2009 12:06 pm
Hi,
I was wondering; is there a mechanism for invoking an AuthorOperation programatically from another AuthorOperation? I have a completed, tested and delivered AuthorOperation that I'm not partciuarly keen to modify. I have another, new operation, that, amongst other functions, needs to offer the user exactly them same behaviour as the first operation (essentailly two different routes to the same behaviour, required to support two different working practices). I can invoke the first operation simply by instantiating it and then calling doOperation() however the target operation has a large number of arguments (under normal circumstances tese are suipplied by Oxygen from the framework config). I cannot seem to find a way to access the arguments for one operation form another operation. The only two solutions I can think of are 1) replicate all the argumenst required to call the first operation and add them to the argumenst list for the seocnd operation, or 2) build a framework file parser to exract the operation argumens directly from the config file, with eitehr approach I could then construct my own ArgumenstMap instance to pass to the instatiated operation. Neither of this solutions are particuarly good, 1) for maintainence reasons, and 2) for complexity reasons.
Can you suggest anything?
Regards,
Simon.
I was wondering; is there a mechanism for invoking an AuthorOperation programatically from another AuthorOperation? I have a completed, tested and delivered AuthorOperation that I'm not partciuarly keen to modify. I have another, new operation, that, amongst other functions, needs to offer the user exactly them same behaviour as the first operation (essentailly two different routes to the same behaviour, required to support two different working practices). I can invoke the first operation simply by instantiating it and then calling doOperation() however the target operation has a large number of arguments (under normal circumstances tese are suipplied by Oxygen from the framework config). I cannot seem to find a way to access the arguments for one operation form another operation. The only two solutions I can think of are 1) replicate all the argumenst required to call the first operation and add them to the argumenst list for the seocnd operation, or 2) build a framework file parser to exract the operation argumens directly from the config file, with eitehr approach I could then construct my own ArgumenstMap instance to pass to the instatiated operation. Neither of this solutions are particuarly good, 1) for maintainence reasons, and 2) for complexity reasons.
Can you suggest anything?
Regards,
Simon.