hi,
Import com.atlassian.jira.component.ComponentAccessor
This could be a silly question, but could someone help to know what exactly this is and how does it work.
Community moderators have prevented the ability to post new answers.
You don't really need to know the deep detail of it, I suspect you are asking because you keep seeing it in scripts.
All it really does is give a script a way to create the "manager" type objects that they almost always need.
For example, if I want to do something with projects, like get a list of archived ones, I'll probably need a projectManager. So I'd call ComponentAccessor.getProjectManager to create one to work with in my script.
If you have a rummage through https://docs.atlassian.com/software/jira/docs/api/9.5.0/com/atlassian/jira/component/ComponentAccessor.html you'll see that almost all the calls are "get manager or factory object" or "get block of info that doesn't really have a manager" in a few cases.
@Nic Brough -Adaptavist- Hello,
Thanks for explaining above, as this is something new for me, I was bit not sure about my understanding on above, but your explanation clear my doubt.
Thanks
M.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.