Hi,
I followed by ActiveObjects tutorial, and I have trouble with getting ActiveObjects object.
My atlassian plugin config file contains:
<component-import key="ao" name="Active Objects service" interface="com.atlassian.activeobjects.external.ActiveObjects"> <description>Component to access Active Objects functionality from the plugin</description> </component-import>
My pom.xml contains:
<dependency> <groupId>com.atlassian.activeobjects</groupId> <artifactId>activeobjects-plugin</artifactId> <version>${ao.version}</version> <scope>provided</scope> </dependency>
I've also created an entity interface, but I want to invoke the AO service inside my class. It means inside of:
public class ManageTemplates extends JiraWebActionSupport { ... }
I want to get an instance of ActiveObjects... How could I get it?
You will have to configure the AO module in your atlassian-plugin.xml:
<ao key="ao-module"> <description>The module configuring the Active Objects service used by this plugin</description> <entity>com.example.MyAoEntity</entity> </ao>
And to access this entity in your ManageTemplates class you will have to get the ActiveObjects service injected:
public class ManageTemplates extends JiraWebActionSupport { private final ActiveObjects ao; public ManageTemplates( JiraAuthenticationContext authenticationContext, SearchProvider searchProvider, ActiveObjects ao) { this.ao = ao; } ... }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.