Class AbstractRESTConfluenceService

    • Field Detail

      • client

        protected final okhttp3.OkHttpClient.Builder client
    • Constructor Detail

      • AbstractRESTConfluenceService

        public AbstractRESTConfluenceService()
    • Method Detail

      • urlBuilder

        protected abstract okhttp3.HttpUrl.Builder urlBuilder()
      • fromRequestAsync

        public CompletableFuture<okhttp3.Response> fromRequestAsync​(okhttp3.Request req)
        Parameters:
        req -
        description -
        Returns:
      • fromRequest

        public okhttp3.Response fromRequest​(okhttp3.Request req,
                                            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)
      • mapToObject

        protected javax.json.JsonObject mapToObject​(okhttp3.Response res)
      • findPageById

        protected Optional<javax.json.JsonObject> findPageById​(String id)
      • findPages

        protected List<javax.json.JsonObject> findPages​(String spaceKey,
                                                        String title)
      • descendantPages

        protected List<javax.json.JsonObject> descendantPages​(String id)
      • childrenPages

        protected List<javax.json.JsonObject> childrenPages​(String id)
      • findPage

        public Optional<javax.json.JsonObject> findPage​(String spaceKey,
                                                        String title)
        Parameters:
        spaceKey -
        title -
        Returns:
      • deletePageById

        protected boolean deletePageById​(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)
      • addLabels

        protected final void addLabels​(String id,
                                       String... labels)
        Parameters:
        inputData -
      • getAttachments

        protected List<javax.json.JsonObject> getAttachments​(String id)
      • getAttachment

        protected List<javax.json.JsonObject> getAttachment​(String id,
                                                            String fileName)