Class ShareManager

java.lang.Object
com.jalios.jcms.share.ShareManager

public class ShareManager extends Object
  • Method Details

    • getInstance

      public static ShareManager getInstance()
    • 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 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 String getShareLink(Data data, String css, String body, String userLang, 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
    • getShareLink

      public String getShareLink(Data data, String css, String body, String userLang, String title, DataAttribute dataAttribute)
      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
      dataAttribute - optional data attributes to add to the link
      Returns:
      the link to share a data
      Since:
      jcms-11.0.0
    • printShareLinkStart

      public void printShareLinkStart(StringBuilder sb, Data data, String css, String userLang, 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
    • printShareLinkStart

      public void printShareLinkStart(StringBuilder sb, Data data, String css, String userLang, String title, DataAttribute dataAttribute)
      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
      dataAttribute - optional data attributes to add to the link
      Since:
      jcms-11.0.0
    • printShareLinkEnd

      public void printShareLinkEnd(StringBuilder sb)
      Prints the end of the link for sharing
      Parameters:
      sb - the StringBuilder
      Since:
      jcms-10.0.7