I need to grab the ServiceDeskManager in my plugin, but am unclear on how to get it. Normally I'd use component accessor, but it lacks a method for it, and it's "getComponentOfType" returns null when trying to get anything Service Desk related. What is the proper way to get an instance of this object in a custom plugin?
Extra info:
My Service Desk classes do resolve in the project, I've imported with
import com.atlassian.servicedesk.internal.api.ServiceDeskManager;
and that seems to work fine.
A search of the Developer Community actually revealed what I needed (https://community.developer.atlassian.com/)
To import most Service Desk objects, don't use:
ServiceDeskObject sdObj = ComponentAccessor.getComponentOfType(ServiceDeskObject.class)
Rather, you need to use:
ServiceDeskObject sdObj = ComponentAccessor.getOSGiComponentInstanceOfType(ServiceDeskObject.class)
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.