|
Hi folks,
for JENKINS-14902 I would like Jenkins.createProjectFromXML to be part of ModifiableItemGroup interface side effect is that adding such a method to an interface would break backward compatibility for plugins that implement this interface (even I don't know such a plugin but cloudbees folders)
option 1 : use "duck typing" style and call createProjectFromXML by reflexion on ItemGroup if such a method exists option 2 : create a new interface to extend ModifiableItemGroup and add createProjectFromXML
option 3 : add method to ModifiableItemGroup wdyt ?
|
|
On 08/23/2012 05:28 AM, nicolas de loof wrote:
> option 2 : > create a new interface to extend ModifiableItemGroup and add createProjectFromXML Seems safest. ModifiableItemGroup2 perhaps. It probably need not even extend ModifiableItemGroup, since if someone is actually assigning something to a variable of type ModifiableItemGroup2 they are not likely to want the old HTTP-based method too. While you are at it, consider making the interface specify some related things, e.g.: <T extends TopLevelItem> T copy(T src, String name) throws IOException; TopLevelItem createProject(TopLevelItemDescriptor type, String name, boolean notify) throws IOException; though these are less likely to be useful from the CLI. BTW a ModifiableViewGroup might also be useful at some point. |
|
In reply to this post by nicolas de loof-2
Option 2 I’m a safety first kind of guy J /B From: [hidden email] [mailto:[hidden email]] On Behalf Of nicolas de loof Hi folks, for JENKINS-14902 I would like Jenkins.createProjectFromXML to be part of ModifiableItemGroup interface side effect is that adding such a method to an interface would break backward compatibility for plugins that implement this interface (even I don't know such a plugin but cloudbees folders) option 1 : use "duck typing" style and call createProjectFromXML by reflexion on ItemGroup if such a method exists option 2 : create a new interface to extend ModifiableItemGroup and add createProjectFromXML option 3 : add method to ModifiableItemGroup wdyt ? |
|
done, created ModifiableTopLevelItemGroup interface.
2012/8/24 Sandell, Robert <[hidden email]>
|
| Powered by Nabble | Edit this page |
