Class SharingContext

    • Constructor Detail

      • SharingContext

        public SharingContext​(String baseURI,
                              String token)
    • Method Detail

      • getBaseURI

        public String getBaseURI()
      • setBaseURI

        public void setBaseURI​(String baseURI)
      • getToken

        public String getToken()
      • setToken

        public void setToken​(String token)
      • applyOn

        public String applyOn​(String text)
        This method reads a text content in order to identify all attachment URIs and to transform them into shared attachment URIs.
        Parameters:
        text - the text content to modify
        Returns:
        the text containing all attachment URI conversions.
      • getSharedUriOf

        public URI getSharedUriOf​(SimpleDocument attachment)
        Gets the shared URI of the given attachments according to the sharing context.
        Parameters:
        attachment - the attachment for which the shared URI will be computed.
        Returns:
        the shared URI of the given attachment.