Package com.jalios.jcms.share
Class ShareManager
- java.lang.Object
-
- com.jalios.jcms.share.ShareManager
-
public class ShareManager extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canBeShared(Data data, Member mbr)
static ShareManager
getInstance()
java.util.List<ShareOption>
getOptions(Data data, Member mbr)
java.lang.String
getShareLink(Data data, java.lang.String css, java.lang.String body, java.lang.String userLang, java.lang.String title)
Returns the link to share a datavoid
printShareLinkEnd(java.lang.StringBuilder sb)
Prints the end of the link for sharingvoid
printShareLinkStart(java.lang.StringBuilder sb, Data data, java.lang.String css, java.lang.String userLang, java.lang.String title)
Prints the start of the link for sharing
-
-
-
Method Detail
-
getInstance
public static ShareManager getInstance()
-
canBeShared
public boolean canBeShared(Data data, Member mbr)
- Parameters:
data
- the datambr
- the member- Returns:
- true if the given data can be shared by the given member.
- Since:
- jcms-10.0.7
-
getOptions
public java.util.List<ShareOption> getOptions(Data data, Member mbr)
- Parameters:
data
- the datambr
- the member- Returns:
- the sharing options on the given data for the given member
- Since:
- jcms-10.0.7
-
getShareLink
public java.lang.String getShareLink(Data data, java.lang.String css, java.lang.String body, java.lang.String userLang, java.lang.String title)
Returns the link to share a data- Parameters:
data
- theData
css
- optional classname to use in the linkbody
- the content in the linkuserLang
- the user languagetitle
- the title of the link- Returns:
- the link to share a data
- Since:
- jcms-10.0.7
-
printShareLinkStart
public void printShareLinkStart(java.lang.StringBuilder sb, Data data, java.lang.String css, java.lang.String userLang, java.lang.String title)
Prints the start of the link for sharing- Parameters:
sb
- theStringBuilder
data
- theData
css
- optional classname to use in the linkuserLang
- the user languagetitle
- the title- Since:
- jcms-10.0.7
-
printShareLinkEnd
public void printShareLinkEnd(java.lang.StringBuilder sb)
Prints the end of the link for sharing- Parameters:
sb
- the StringBuilder- Since:
- jcms-10.0.7
-
-