Class SharingContext
- java.lang.Object
-
- org.silverpeas.core.contribution.attachment.util.SharingContext
-
- All Implemented Interfaces:
Serializable
public class SharingContext extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SharingContext(String baseURI, String token)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
-
-
-
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.
-
-