building content-centric add-ons for confluence
TRANSCRIPT
![Page 1: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/1.jpg)
![Page 2: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/2.jpg)
NIRAJ BHAWNANI • CONFLUENCE DEVELOPER • ATLASS IAN • @NIRAJBHAWNANI
Building Content-centric Add-ons for Confluence
![Page 3: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/3.jpg)
What is a “content-centric add-on?”
![Page 4: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/4.jpg)
Types of content-centric add-ons
Macros Blueprints SpaceBlueprints
![Page 5: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/5.jpg)
Ok, but why do I care?
![Page 6: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/6.jpg)
• Confluence guru
• introduced Confluence to BigCorp
• talented plugin developer
Bob, Senior Developer
![Page 7: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/7.jpg)
• not very tech savvy
• “How can I create an event page?”
• Bob writes him an “Event” macro
Jason, Events Coordinator
![Page 8: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/8.jpg)
Creating an event page from scratch
![Page 9: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/9.jpg)
Creating an event page from scratch
![Page 10: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/10.jpg)
![Page 11: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/11.jpg)
• Confluence power user
• discovers a new use-case for Bob’s new macro
Alice, Project Manager
![Page 12: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/12.jpg)
![Page 13: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/13.jpg)
• Event macro has 2 use-cases:
• company event
• team demo meeting
Bob writes some blueprints
![Page 14: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/14.jpg)
Creating an event page using blueprints
![Page 15: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/15.jpg)
Creating an event page using blueprints
![Page 16: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/16.jpg)
And everyone’s happy!
Thanks, Bob!
![Page 17: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/17.jpg)
... but Bob’s not done yet!• Writes 2 space
blueprints:
• team space
• project space
![Page 18: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/18.jpg)
Creating a team space
![Page 19: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/19.jpg)
Now everyone’s really happy!
Great work, Bob!
![Page 20: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/20.jpg)
DEVELOPMENT
FEATURES
OVERVIEW
Blueprints
![Page 21: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/21.jpg)
OVERVIEW
• Blueprints allow you to surface your macros for a specific use case.
• Confluence 5.1+
• Examples - Decisions, meeting notes, file lists
When should you use blueprints?
![Page 22: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/22.jpg)
The “blank page” problem
![Page 23: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/23.jpg)
DEVELOPMENT
OVERVIEW
FEATURES
Blueprints
![Page 24: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/24.jpg)
“How to” guide
1
2
Edit
meeting
label
Label Report
Wizard View/Index
@@@@@@
Page Properties
Custom
Blueprint features
Guidance
Create
Flow
ABC
Content
![Page 25: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/25.jpg)
FEATURES
OVERVIEW
DEVELOPMENT
Blueprints
![Page 26: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/26.jpg)
DEVELOPMENT
With the Atlassian SDK$ atlas-update
$ atlas-create-confluence-plugin-module
![Page 27: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/27.jpg)
atlassian-plugin.xml
DEVELOPMENT
Code structure
<web-item>
<blueprint>
<content-template>
...
content-template.xml
ContextProvider.java
![Page 28: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/28.jpg)
atlassian-plugin.xml
DEVELOPMENT
Code structure
<web-item>
<blueprint>
<content-template>
...
content-template.xml
ContextProvider.java
![Page 29: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/29.jpg)
DEVELOPMENT
Create dialog web-item<web-item key="file-list-item" i18n-name-key="file.list.blueprint.name" section="system.create.dialog/content">
<description key="file.list.blueprint.description"/>
<resource name="icon" type="download" location="images/icon-filelist.png"/>
<param name="blueprintKey" value="file-list-blueprint"/>
</web-item>
![Page 30: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/30.jpg)
atlassian-plugin.xml
DEVELOPMENT
Code structure
<web-item>
<blueprint>
<content-template>
...
content-template.xml
ContextProvider.java
![Page 31: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/31.jpg)
DEVELOPMENT
Blueprint descriptor<blueprint key="file-list-blueprint" name="File List Blueprint" i18n-name-key="file.list.title" create-result="view" index-key="file-list" index-template-key="file-list-index-page" i18n-index-title-key= "file.list.index.page.title">
<content-template ref="file-list-page"/>
<dialog-wizard key="file-list-blueprint-wizard"> <dialog-page id="file-list-page1" template-key="Confluence.Templates.FileList.dialogForm" title-key="file.list.wizard.title" description-header-link-key="file.list.wizard.about.link" description-header-key="file.list.wizard.about.heading" description-content-key="file.list.wizard.about.description"/> </dialog-wizard>
</blueprint>
![Page 32: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/32.jpg)
atlassian-plugin.xml
DEVELOPMENT
Code structure
<web-item>
<blueprint>
<content-template>
...
content-template.xml
ContextProvider.java
![Page 33: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/33.jpg)
DEVELOPMENT
Content-template descriptor<content-template key="file-list-page" i18n-name-key="file.list.content.template.name">
<description key="file.list.content.template.description"/>
<resource name="template" type="download" location="xml/content-template.xml"/>
<context-provider class="com.atlassian.examples.FileListContextProvider"/>
</content-template>
![Page 34: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/34.jpg)
atlassian-plugin.xml
DEVELOPMENT
Code structure
<web-item>
<blueprint>
<content-template>
content-template.xml
ContextProvider.java
...
![Page 35: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/35.jpg)
DEVELOPMENT
Blueprint context providerpublic class FileListContextProvider implements ContextProvider{ public FileListContextProvider(...) { }
@Override public void init(Map<String, String> params) throws PluginParseException { }
@Override public Map<String, Object> getContextMap(Map<String, Object> context) { context.put("simpleVariable", "Hello world!"); context.put("rawXhtmlVariable", "<ac:structured-macro ac:name="cheese" />"); return context; }
}
![Page 36: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/36.jpg)
atlassian-plugin.xml
DEVELOPMENT
Code structure
<web-item>
<blueprint>
<content-template>
...
content-template.xml
ContextProvider.java
![Page 37: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/37.jpg)
DEVELOPMENT
Content template XML<at:var at:name="simpleVariable"></at:var>
<at:var at:name="rawXhtmlVariable" at:rawxhtml="true"></at:var>
Hello World!
<at:var at:name="rawXhtmlVariable" at:rawxhtml="true"></at:var>
Hello World!
<ac:structured-macro ac:name="cheese" />
![Page 38: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/38.jpg)
DEVELOPMENT
Developer resourceshttp://go.atlassian.com/dev-
blueprints
http://go.atlassian.com/storage-format
![Page 39: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/39.jpg)
• Blueprints package an entire use-case into a single create experience.
• Blueprints more than templates
• Easily created with the Atlassian SDK
Blueprints summary
![Page 40: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/40.jpg)
DEVELOPMENT
FEATURES
OVERVIEW
Space Blueprints
![Page 41: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/41.jpg)
OVERVIEW
• When you want to create a type of space with:
• prepackaged content
• certain blueprints promoted
• a custom homepage tying everything together
• Confluence 5.3+
• Examples - team space, knowledge base space
When should you use space blueprints?
![Page 42: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/42.jpg)
OVERVIEW
How does it work?
![Page 43: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/43.jpg)
DEVELOPMENT
OVERVIEW
FEATURES
Space Blueprints
![Page 44: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/44.jpg)
“How to” guide
1
2
Wizard
Space blueprint features
Guidance
Custom
SpaceSettings
ABC
Content
Page hierarchy
HomepagePromoted Blueprints
team
project
SpaceCategories
![Page 45: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/45.jpg)
FEATURES
OVERVIEW
DEVELOPMENT
Space Blueprints
![Page 46: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/46.jpg)
atlassian-plugin.xml
DEVELOPMENT
Code structure
<web-item>
<space-blueprint>
<content-template>
...
content-template.xml
ContextProvider.java
![Page 47: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/47.jpg)
atlassian-plugin.xml
DEVELOPMENT
Code structure
<web-item>
<space-blueprint>
<content-template>
...
content-template.xml
ContextProvider.java
![Page 48: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/48.jpg)
<web-item key='team-space-blueprint-item' i18n-name-key='confluence.team.space.name' section='system.create.space.dialog/content'>
<resource name='icon' type='download' location='/images/icon-space-team-48.png'/>
<description key='confluence.team.space.description'/>
<param name='blueprintKey' value='team-space-blueprint'/>
</web-item>
DEVELOPMENT
Create space dialog web-item
![Page 49: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/49.jpg)
atlassian-plugin.xml
DEVELOPMENT
Code structure
<web-item>
<space-blueprint>
<content-template>
...
content-template.xml
ContextProvider.java
![Page 50: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/50.jpg)
DEVELOPMENT
Space blueprint descriptor<space-blueprint key="team-space-blueprint" i18n-name-key="confluence.team.space.name" category="teams">
<content-template ref="team-space-homepage-template"/>
<promoted-blueprints> ... <blueprint ref="com.atlassian.confluence.plugins.confluence-create-content-plugin:create-blank-page"/> <blueprint ref="com.atlassian.confluence.plugins.confluence-create-content-plugin:create-blog-post"/> </promoted-blueprints>
<dialog-wizard key="team-space-blueprint-wizard"> <dialog-page id="teamSpaceId" template-key="Confluence.SpaceBlueprints.Team.dialogForm" title-key="confluence.team.space.create.title" description-header-key="confluence.team.space.create.heading" description-content-key="confluence.team.space.create.description" last="true"/> </dialog-wizard>
</space-blueprint>
![Page 51: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/51.jpg)
atlassian-plugin.xml
DEVELOPMENT
Code structure
<web-item>
<space-blueprint>
<content-template>
...
content-template.xml
ContextProvider.java
![Page 52: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/52.jpg)
DEVELOPMENT
Content template descriptor<content-template key="team-space-homepage-template" i18n-name-key="confluence.team.space.homepage.name"> <description key="confluence.team.space.homepage.desc"/> <resource name="template" type="download" location="xml/team-space-home.xml"/>
<content-template key="team-space-child-page" i18n-name-key="confluence.team.space.homepage.name"> <description key="confluence.team.space.childpage.desc"/> <resource name="template" type="download" location="xml/team-space-child.xml"/> </content-template>
</content-template>
![Page 53: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/53.jpg)
DEVELOPMENT
Developer resourceshttp://go.atlassian.com/dev-space-
blueprints
![Page 54: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/54.jpg)
• Like blueprints, they package a use-case but at the space level.
• Space blueprints let you create a type of space with:
• a custom homepage
• prepackaged content
• promoted blueprints
Space blueprints summary
![Page 55: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/55.jpg)
Where to go from here?
![Page 56: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/56.jpg)
• Grab the Atlassian SDK
• Check out our developer documentation:
• Write your own! Submit them to the Marketplace.
Where to go from here?
http://go.atlassian.com/sdk
http://go.atlassian.com/dev-macros
http://go.atlassian.com/dev-blueprints
http://go.atlassian.com/dev-space-blueprints
![Page 57: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/57.jpg)
• Think of use-cases in your organization
• Write Blueprints to solve them!
Be like Bob!
![Page 58: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/58.jpg)
Thank you!
NIRAJ BHAWNANI • CONFLUENCE DEVELOPER • ATLASS IAN • @NIRAJBHAWNANI
![Page 59: Building Content-centric Add-ons for Confluence](https://reader034.vdocument.in/reader034/viewer/2022042700/5557f439d8b42ae31c8b4655/html5/thumbnails/59.jpg)
Text code below to 22333or visit http://bit.ly/19dVZcc
Building Content-Centric Add-ons for Confluence
To join this session, send text 136888 to
AWESOME = 16
PRETTY GOOD = 15
NOT BAD = 14
MEH = 13
Rate this Talk