Package org.bsc.confluence
Interface ConfluenceService
-
- All Superinterfaces:
AutoCloseable
,Closeable
public interface ConfluenceService extends Closeable
- Author:
- bsorrentino
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ConfluenceService.Credentials
static interface
ConfluenceService.Model
static class
ConfluenceService.Protocol
static class
ConfluenceService.Storage
-
Field Summary
Fields Modifier and Type Field Description static String
connectTimeoutInSeconds
static String
readTimeoutInSeconds
static String
writeTimeoutInSeconds
-
Method Summary
-
-
-
Field Detail
-
connectTimeoutInSeconds
static final String connectTimeoutInSeconds
- See Also:
- Constant Field Values
-
writeTimeoutInSeconds
static final String writeTimeoutInSeconds
- See Also:
- Constant Field Values
-
readTimeoutInSeconds
static final String readTimeoutInSeconds
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConnectTimeout
static long getConnectTimeout(TimeUnit timeUnit)
-
getWriteTimeout
static long getWriteTimeout(TimeUnit timeUnit)
-
getReadTimeout
static long getReadTimeout(TimeUnit timeUnit)
-
setConnectTimeouts
static void setConnectTimeouts(long value, TimeUnit timeUnit)
-
setWriteTimeouts
static void setWriteTimeouts(long value, TimeUnit timeUnit)
-
setReadTimeouts
static void setReadTimeouts(long value, TimeUnit timeUnit)
-
getCredentials
ConfluenceService.Credentials getCredentials()
-
newPage
ConfluenceService.Model.Page newPage(ConfluenceService.Model.ID id, String space, String title, int version)
factory method Create a temporary in memory Model.Page with ID and Title set- Parameters:
id
-space
-title
-version
-- Returns:
-
getPageByTitle
CompletableFuture<Optional<? extends ConfluenceService.Model.PageSummary>> getPageByTitle(ConfluenceService.Model.ID parentPageId, String title)
-
removePage
CompletableFuture<Boolean> removePage(ConfluenceService.Model.Page parentPage, String title)
-
removePage
CompletableFuture<Boolean> removePage(ConfluenceService.Model.ID pageId)
-
createPage
CompletableFuture<ConfluenceService.Model.Page> createPage(ConfluenceService.Model.Page parentPage, String title, ConfluenceService.Storage content)
-
storePage
CompletableFuture<ConfluenceService.Model.Page> storePage(ConfluenceService.Model.Page page, ConfluenceService.Storage content)
-
storePage
CompletableFuture<ConfluenceService.Model.Page> storePage(ConfluenceService.Model.Page page)
-
getPage
CompletableFuture<Optional<ConfluenceService.Model.Page>> getPage(ConfluenceService.Model.ID pageId)
-
getPage
CompletableFuture<Optional<ConfluenceService.Model.Page>> getPage(String spaceKey, String pageTitle)
-
getDescendents
CompletableFuture<List<ConfluenceService.Model.PageSummary>> getDescendents(ConfluenceService.Model.ID pageId)
-
addLabelsByName
CompletableFuture<Void> addLabelsByName(ConfluenceService.Model.ID id, String[] labels)
-
addLabelsByName
default CompletableFuture<Void> addLabelsByName(ConfluenceService.Model.ID id, List<String> labels)
-
newAttachment
ConfluenceService.Model.Attachment newAttachment()
factory method- Returns:
-
getAttachment
CompletableFuture<Optional<ConfluenceService.Model.Attachment>> getAttachment(ConfluenceService.Model.ID pageId, String name, String version)
- Parameters:
pageId
-name
-version
-- Returns:
-
addAttachment
CompletableFuture<ConfluenceService.Model.Attachment> addAttachment(ConfluenceService.Model.Page page, ConfluenceService.Model.Attachment attachment, InputStream source)
- Parameters:
page
-attachment
-source
-- Returns:
-
createBlogpost
ConfluenceService.Model.Blogpost createBlogpost(String space, String title, ConfluenceService.Storage content, int version)
factory method- Parameters:
space
- space idtitle
- post's titlecontent
- post's content- Returns:
-
addBlogpost
CompletableFuture<ConfluenceService.Model.Blogpost> addBlogpost(ConfluenceService.Model.Blogpost blogpost)
- Parameters:
blogpost
-- Returns:
-
getOrCreatePage
default CompletableFuture<ConfluenceService.Model.Page> getOrCreatePage(String spaceKey, String parentPageTitle, String title)
- Parameters:
spaceKey
-parentPageTitle
-title
-- Returns:
-
retry
default <T> CompletableFuture<T> retry(int times, long delay, TimeUnit timeUnit, Optional<CompletableFuture<T>> resultHandler, Supplier<CompletableFuture<T>> action)
- Type Parameters:
T
-- Parameters:
times
-delay
-timeUnit
-resultHandler
-action
-- Returns:
- See Also:
- "https://gist.github.com/gitplaneta/5065bbba980b2858a55f"
-
-