Library that makes developing Atlassian apps easier.
Add the atlassian-applib dependency to your pom.xml
.
<dependency>
<groupId>de.scandio</groupId>
<artifactId>atlassian-applib</artifactId>
<version>0.4.0</version>
</dependency>
Add the Scandio Maven repository to your pom.xml
.
<repositories>
<repository>
<id>scandio-public-releases</id>
<name>Scandio Public Releases Repository</name>
<url>https://github.com/scandio/mvn-repo/raw/master/releases</url>
</repository>
<repository>
<id>scandio-public-snapshots</id>
<name>Scandio Public Snapshots Repository</name>
<url>https://github.com/scandio/mvn-repo/raw/master/snapshots</url>
</repository>
</repositories>
Services are added as components to the atlassian-plugin.xml
.
Confluence:
Loads the DateFormatter for a given user.
<component key="formatter-service" name="Formatter Service"
class="de.scandio.atlassian.applib.services.confluence.impl.FormatterServiceImpl">
<interface>de.scandio.atlassian.applib.services.confluence.FormatterService</interface>
</component>
Loads the I18nBean object for a given user.
<component key="i18n-bean-service" name="I18n Bean Service"
class="de.scandio.atlassian.applib.services.confluence.impl.I18nBeanServiceImpl">
<interface>de.scandio.atlassian.applib.services.confluence.I18nBeanService</interface>
</component>
Finds pages with a specific macro and/or with a specific parameter and value.
<component key="page-finder-service" name="Page Finder Service"
class="de.scandio.atlassian.applib.services.confluence.impl.PageFinderServiceImpl">
<interface>de.scandio.atlassian.applib.services.confluence.PageFinderService</interface>
</component>
Renders XHTML to HTML.
<component key="render-service" name="Render Service"
class="de.scandio.atlassian.applib.services.confluence.impl.RenderServiceImpl">
<interface>de.scandio.atlassian.applib.services.confluence.RenderService</interface>
</component>
Confluence:
- HybridMacro - By extending this class, a macro can added as both an old
macro
module and axhtml-macro
module.
- CommaUtils - Joins and splits comma separated lists.
- VersionUtils - Compares versions.
Confluence:
- ContextUtils - Gets stuff from the conversion context.
- CurrentSpaceUtils - Gets the current space.
- JsoupUtils - Parses and serializes XHTML with Jsoup.
Use conditions in your web items and web resources.
Applies when a plugin is enabled.
<condition class="de.scandio.atlassian.applib.conditions.PluginIsEnabledCondition">
<param name="themeKey">de.scandio.confluence.plugins.lively-theme</param>
</condition>
Confluence:
Applies when a theme is enabled.
<condition class="de.scandio.atlassian.applib.conditions.confluence.ThemeIsEnabledCondition">
<param name="themeKey">de.scandio.confluence.plugins.lively-theme:lively-theme</param>
</condition>
Applies when a theme is enabled globally.
<condition class="de.scandio.atlassian.applib.conditions.confluence.ThemeIsGloballyEnabledCondition">
<param name="themeKey">de.scandio.confluence.plugins.lively-theme:lively-theme</param>
</condition>