Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Manager objects from a macro

Wig Shire July 12, 2022

I'm using the Datacenter version of confluence, trying to do clever stuff with macros...

Can anyone help to instantiate 'Manager' objects in a macro. I can't seem to get code like this to produce anything:

#set( $containerManagerClass=$content.class.forName('com.atlassian.spring.container.ContainerManager') )
#set( $getInstanceMethod=$containerManagerClass.getDeclaredMethod('getInstance',null) )
#set( $containerManager=$getInstanceMethod.invoke(null,null) )
#set( $containerContext=$containerManager.containerContext )
#set( $pageManager=$containerContext.getComponent('pageManager') )
#set( $likeManager=$containerContext.getComponent('likeManager') )

 Ideally I want to do the same with Jira Manager objects from a confluence macro as well, is this possible?

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events