Package org.bsc.confluence.rest
Class AbstractRESTConfluenceService
- java.lang.Object
-
- org.bsc.confluence.rest.AbstractRESTConfluenceService
-
- Direct Known Subclasses:
RESTConfluenceServiceImpl
public abstract class AbstractRESTConfluenceService extends Object
- Author:
- softphone
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractRESTConfluenceService.ServiceException
-
Constructor Summary
Constructors Constructor Description AbstractRESTConfluenceService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected List<javax.json.JsonObject>addAttachment(String id, Attachment att, InputStream data)protected List<javax.json.JsonObject>childrenPages(String id)Optional<javax.json.JsonObject>createPage(javax.json.JsonObject inputData)protected voiddebugBody(okhttp3.Response res)Optional<javax.json.JsonObject>findPage(String spaceKey, String title)protected Optional<javax.json.JsonObject>findPageById(String id)protected okhttp3.ResponsefromRequest(okhttp3.Request req, String description)protected java.util.stream.Stream<okhttp3.Response>fromUrlDELETE(okhttp3.HttpUrl url, String description)protected java.util.stream.Stream<okhttp3.Response>fromUrlGET(okhttp3.HttpUrl url, String description)protected java.util.stream.Stream<okhttp3.Response>fromUrlPOST(okhttp3.HttpUrl url, okhttp3.RequestBody inputBody, String description)protected java.util.stream.Stream<okhttp3.Response>fromUrlPUT(okhttp3.HttpUrl url, okhttp3.RequestBody inputBody, String description)protected List<javax.json.JsonObject>getAttachment(String id, String fileName)protected List<javax.json.JsonObject>getAttachments(String id)abstract ConfluenceService.CredentialsgetCredentials()protected javax.json.JsonObjectmapToObject(okhttp3.Response res)protected java.util.stream.Stream<javax.json.JsonObject>mapToStream(okhttp3.Response res)protected voidrxAddLabels(String id, String... labels)protected booleanrxDeletePageById(String id)protected List<javax.json.JsonObject>rxDescendantPages(String id)protected List<javax.json.JsonObject>rxfindPages(String spaceKey, String title)protected Optional<javax.json.JsonObject>updatePage(String pageId, javax.json.JsonObject inputData)protected abstract okhttp3.HttpUrl.BuilderurlBuilder()
-
-
-
Method Detail
-
getCredentials
public abstract ConfluenceService.Credentials getCredentials()
-
urlBuilder
protected abstract okhttp3.HttpUrl.Builder urlBuilder()
-
fromRequest
protected okhttp3.Response fromRequest(okhttp3.Request req, String description)
-
fromUrlGET
protected java.util.stream.Stream<okhttp3.Response> fromUrlGET(okhttp3.HttpUrl url, String description)
-
fromUrlDELETE
protected java.util.stream.Stream<okhttp3.Response> fromUrlDELETE(okhttp3.HttpUrl url, String description)
-
fromUrlPOST
protected java.util.stream.Stream<okhttp3.Response> fromUrlPOST(okhttp3.HttpUrl url, okhttp3.RequestBody inputBody, String description)
-
fromUrlPUT
protected java.util.stream.Stream<okhttp3.Response> fromUrlPUT(okhttp3.HttpUrl url, okhttp3.RequestBody inputBody, String description)
-
debugBody
protected void debugBody(okhttp3.Response res)
-
mapToStream
protected java.util.stream.Stream<javax.json.JsonObject> mapToStream(okhttp3.Response res)
-
mapToObject
protected javax.json.JsonObject mapToObject(okhttp3.Response res)
-
findPage
public Optional<javax.json.JsonObject> findPage(String spaceKey, String title)
- Parameters:
spaceKey-title-- Returns:
-
rxDeletePageById
protected boolean rxDeletePageById(String id)
-
createPage
public final Optional<javax.json.JsonObject> createPage(javax.json.JsonObject inputData)
- Parameters:
inputData-- Returns:
-
updatePage
protected Optional<javax.json.JsonObject> updatePage(String pageId, javax.json.JsonObject inputData)
-
addAttachment
protected List<javax.json.JsonObject> addAttachment(String id, Attachment att, InputStream data)
-
-