使用代碼實現confluence blueprint創建定製頁面(多級)

使用場景:

在confluence中一鍵創建定製頁面,包含兩級頁面,每個頁面的內容有固定格式,這些頁面用作某類文檔的模板。

現狀:

confluence原生功能就支持自定義模板實現定製,然而無法實現多級頁面自動生成。

方案:

基本思路

使用插件增加一種blueprint(藍圖),該blueprint出現的“創建”的dialog中;

用戶可以根據blueprint的提示完成文檔模板的創建;

blueprint根據xml模板生成內容,xml支持參數化設置。

具體實現

官方示例:

標題 URL 實用性
write-a-simple-confluence-space-blueprint

https://developer.atlassian.com/server/confluence/write-a-simple-confluence-space-blueprint/#step-4--create-a-home-page-for-your-space-blueprint

 

write-an-intermediate-blueprint-plugin https://developer.atlassian.com/server/confluence/write-an-intermediate-blueprint-plugin/#step-1--add-a-variable-and-some-instructional-text-to-the-template  
write-an-advanced-blueprint-plugin

https://developer.atlassian.com/server/confluence/write-an-advanced-blueprint-plugin/#before-you-begin

 

 

 

 

 

 

 

網上找的升級版示例:

標題 URL 實用性
hello-blueprint

https://bitbucket.org/atlassian/hello-blueprint/src/master/

 

 

 

 

 

 

 

 

其他輔助資料:

https://developer.atlassian.com/server/confluence/blueprint-module/

https://developer.atlassian.com/server/confluence/content-template-module/

confluence-create-content plugin的jar包、源碼下載地址

https://packages.atlassian.com/maven-public/com/atlassian/confluence/plugins/

實際過程:

space-blueprint可以使用多級模板,直接創建子頁面。

但是blueprint無法使用,因此不能通過blueprint直接創建子頁面,最後在onBlueprintCreateEvent中通過Java代碼添加的子頁面。


 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章