org.silverpeas.sharing
Class SharingContext

java.lang.Object
  extended by org.silverpeas.sharing.SharingContext

public class SharingContext
extends Object


Constructor Summary
SharingContext(String baseURI, String token)
           
 
Method Summary
 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.
 String getBaseURI()
           
 URI getSharedUriOf(SimpleDocument attachment)
          Gets the shared URI of the given attachments according to the sharing context.
 String getToken()
           
 void setBaseURI(String baseURI)
           
 void setToken(String token)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.


Copyright © 2016 Silverpeas. All Rights Reserved.