Confluence Resolvers
API to find XWiki documents and spaces corresponding to Confluence space keys, document titles, page IDs |
Type | JAR |
Category | |
Developed by | Unknown |
Rating | |
License | GNU Lesser General Public License 2.1 |
Description
This extension provides:
- APIs to resolve Confluence entities in XWiki,
- a default implementation of these APIs that uses other implementations of the APIs present in the wiki
- an implementation based on the ConfluencePageClass objects, which can be optionally imported when using Confluence XML.
The following (@Role) interface are defined:
- ConfluencePageIdResolver to find a document by its Confluence ID
- ConfluencePageTitleResolver to find a document from a space key and a page title
- ConfluenceSpaceKeyResolver to find a XWiki space from the key of a Confluence space.
The definition of these interfaces, as well as their implementations which can be used as examples can be found at https://github.com/xwiki-contrib/confluence/tree/master/confluence-resolvers/src/main/java/org/xwiki/contrib/confluence/resolvers.
For convenience, we reproduce the interface here, without the imports and the license header (however, the definitive reference would be the source code).
public interface ConfluencePageIdResolver
{
/**
* @return the document in XWiki, or null if the document is not found.
* @param id the Confluence ID of the document
*/
EntityReference getDocumentById(long id) throws ConfluenceResolverException;
}
public interface ConfluenceSpaceKeyResolver
{
/**
* @return the space (EntityType.SPACE) in XWiki, or null if the space is not found.
* @param spaceKey the Confluence space key
*/
EntityReference getSpaceByKey(String spaceKey) throws ConfluenceResolverException;
}
public interface ConfluencePageTitleResolver
{
/**
* @return the document in XWiki, or null if the document is not found.
* @param spaceKey the Confluence space of the document
* @param title the Confluence title of the document
*/
EntityReference getDocumentByTitle(String spaceKey, String title) throws ConfluenceResolverException;
}
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).
You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.
Release Notes
v9.54.0
Initial release