Class LargeTextHelper

java.lang.Object
fr.becpg.repo.helper.LargeTextHelper

public class LargeTextHelper extends Object

LargeTextHelper class.

Version:
$Id: $Id
Author:
matthieu
  • Field Details

    • TEXT_SIZE_LIMIT

      public static final int TEXT_SIZE_LIMIT
      Constant TEXT_SIZE_LIMIT=50000
      See Also:
  • Constructor Details

    • LargeTextHelper

      private LargeTextHelper()

      Constructor for LargeTextHelper.

  • Method Details

    • elipse

      public static final String elipse(String textBefore)

      elipse.

      Parameters:
      textBefore - a String object
      Returns:
      a String object
    • elipse

      public static final String elipse(String textBefore, int textLength)

      elipse.

      Parameters:
      textBefore - a String object
      textLength - a int
      Returns:
      a String object
    • elipseHtml

      public static final String elipseHtml(String value, int textLength)

      HTML-aware truncation. When the value is an HTML table, the cut is done after the last complete row (</tr>) and the table is closed, so the rendered output stays valid instead of being broken mid-tag. Otherwise falls back to elipse(String, int).

      Parameters:
      value - a String object
      textLength - a int
      Returns:
      a String object
    • createTextDiffs

      public static org.alfresco.util.Pair<String,String> createTextDiffs(String string1, String string2)

      createTextDiffs.

      Parameters:
      string1 - a String object
      string2 - a String object
      Returns:
      a Pair object
    • elipse

      public static void elipse(org.alfresco.service.cmr.repository.MLText mlText)

      elipse.

      Parameters:
      mlText - a MLText object
    • htmlDiff

      public static String htmlDiff(String text1, String text2)

      htmlDiff.

      Parameters:
      text1 - a String object
      text2 - a String object
      Returns:
      a String object
      Since:
      23.2.1.26