Class ShareManager


  • public class ShareManager
    extends java.lang.Object
    • Method Detail

      • canBeShared

        public boolean canBeShared​(Data data,
                                   Member mbr)
        Parameters:
        data - the data
        mbr - 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 data
        mbr - 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 - the Data
        css - optional classname to use in the link
        body - the content in the link
        userLang - the user language
        title - 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 - the StringBuilder
        data - the Data
        css - optional classname to use in the link
        userLang - the user language
        title - 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