WebExtension confusion

Hi there!

I'm currently investigating on how to create a TeamCity extension to mimic the "Workspace"-feature of Jenkins, so to display the contents of the checkout directory of the build, but I'm having a hard time working through the documentation. I think, there are multiple deprecated points, that are still covered in the documentation.

For example, I'd like to create a web ui with a custom controller, so I can handle AJAX-requests like "open directory" or "download file", but I can't find the starting point. The documentation tells me to register my controller in the WebControllerManager, but the constructor of BaseController isn't supplied with a webControllerManager parameter (anymore).

So how can I register a custom controller for a URL?

Thanks in advance.

Kind regards

Dennis

2 comments
Comment actions Permalink

Dennis,

I do not think the parts of the documentations you note are not up-to-date. If you do think so, please note the specific section and text.

> the constructor of BaseController isn't supplied with a webControllerManager parameter (anymore).

When you define your extension with the parameter to the constructor and register the extension class in Spring configuration, the parameter is injected automatically on the extensions class instantiation.

You can check our sample plugin or one of the open-sourced plugins as an example.

0
Comment actions Permalink

Hi Yegor,

thanks for the info. I guess, my Spring is a bit rusty. ;-)

Kind regards

Dennis

0

Please sign in to leave a comment.