The developer documentation is for people who want to use SAL when developing plugins for the Atlassian applications.
The Shared Access Layer, or SAL for short, provides a consistent, cohesive API to common plugin tasks, regardless of the Atlassian application into which your plugin is deployed. SAL is most useful for cross-application plugin development. If you are developing your plugin for a single application only, you can simply use the application's own API. If your plugin will run in two applications or more, you will find SAL's services useful. These common services include, but are not limited to:
SAL is one of the ingredients in the Atlassian plugin development platform, along with the Atlassian Plugin Framework version 2.
The diagram below gives a conceptual overview of SAL as a layer between a plugin and the applications (Jira, Confluence and FishEye). Let's assume that the plugin provides a portal on a Jira dashboard, and that it needs to store a user preference setting.
The dashboard plugin sends a request to SAL, asking for the preference to be saved in Jira. SAL communicates with Jira via the SAL Jira plugin.
Alternatively, the dashboard plugin may need to save the preference in Confluence. The dashboard plugin will use the same SAL API call, specifying Confluence as the application. SAL will handle the communications with Confluence.
Here is another diagram, giving more detail of SAL in action. Again, let's assume that the dashboard plugin allows users to save a preference to Jira.
To use a SAL service, you will need to declare a component import module in your atlassian-plugin.xml
. For example, if you want to get the UserManager, the component import would look like this:
1 2<component-import key="userManager" interface="com.atlassian.sal.api.user.UserManager" />
You also need to update you project's pom.xml
to include SAL:
1 2<dependency> <groupId>com.atlassian.sal</groupId> <artifactId>sal-api</artifactId> <version>2.0.0</version> <scope>provided</scope> </dependency>
Please refer to the list of available SAL services.
Rate this page: