@Component public class ConfluenceRestServiceImpl extends Object implements ConfluenceRestService, CachingComponent
Constructor and Description |
---|
ConfluenceRestServiceImpl(ConfluenceRpcService confluenceRpcService,
com.atlassian.cache.CacheManager cacheManager) |
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clear the cache within the component.
|
RemoteResponse<ConfluencePage> |
getPage(com.atlassian.applinks.api.ApplicationLink applicationLink,
String pageId)
Gets the page with the given id, on the Confluence server given by the application link.
|
RemoteResponse<List<ConfluenceSpace>> |
getSpaces(com.atlassian.applinks.api.ApplicationLink applicationLink)
Get the list of spaces for the Confluence instance matching the given ApplicationLink.
|
void |
onAppLinkIdChangeEvent(com.atlassian.applinks.api.event.ApplicationLinksIDChangedEvent e) |
void |
onClearCacheEvent(ClearCacheEvent e) |
RemoteResponse<List<ConfluenceSearchResult>> |
search(com.atlassian.applinks.api.ApplicationLink applicationLink,
String query,
int maxResults,
String spaceKey)
Search the Confluence instance matching the given ApplicationLink.
|
@Autowired public ConfluenceRestServiceImpl(ConfluenceRpcService confluenceRpcService, com.atlassian.cache.CacheManager cacheManager)
@EventListener public void onClearCacheEvent(ClearCacheEvent e)
@EventListener public void onAppLinkIdChangeEvent(com.atlassian.applinks.api.event.ApplicationLinksIDChangedEvent e)
@Internal public void clearCache()
CachingComponent
clearCache
in interface CachingComponent
public RemoteResponse<ConfluencePage> getPage(com.atlassian.applinks.api.ApplicationLink applicationLink, String pageId) throws com.atlassian.applinks.api.CredentialsRequiredException, com.atlassian.sal.api.net.ResponseException
ConfluenceRemoteService
getPage
in interface ConfluenceRemoteService
applicationLink
- the application link of the Confluence serverpageId
- the page idRemoteResponse
containing a ConfluencePage
and properties of the HTTP responsecom.atlassian.applinks.api.CredentialsRequiredException
- thrown if authentication is requiredcom.atlassian.sal.api.net.ResponseException
- thrown if the response cannot be retrievedpublic RemoteResponse<List<ConfluenceSpace>> getSpaces(com.atlassian.applinks.api.ApplicationLink applicationLink) throws com.atlassian.applinks.api.CredentialsRequiredException, com.atlassian.sal.api.net.ResponseException
ConfluenceRemoteService
getSpaces
in interface ConfluenceRemoteService
applicationLink
- the link to the Confluence instanceRemoteResponse
containing a List of ConfluenceSpace
s and properties of the HTTP responsecom.atlassian.applinks.api.CredentialsRequiredException
- thrown if authentication is requiredcom.atlassian.sal.api.net.ResponseException
- thrown if the response cannot be retrievedpublic RemoteResponse<List<ConfluenceSearchResult>> search(com.atlassian.applinks.api.ApplicationLink applicationLink, String query, int maxResults, @Nullable String spaceKey) throws com.atlassian.applinks.api.CredentialsRequiredException, com.atlassian.sal.api.net.ResponseException
ConfluenceRemoteService
search
in interface ConfluenceRemoteService
applicationLink
- the link to the Confluence instancequery
- the search termmaxResults
- the maximum number of results to returnspaceKey
- the space to search within, or if null, search all spacesRemoteResponse
containing a List of ConfluenceSearchResult
s and properties of the HTTP responsecom.atlassian.applinks.api.CredentialsRequiredException
- thrown if authentication is requiredcom.atlassian.sal.api.net.ResponseException
- thrown if the response cannot be retrievedCopyright © 2002-2022 Atlassian. All Rights Reserved.