Class ViewerSettings


  • public class ViewerSettings
    extends Object
    All settings around the viewer services.
    Author:
    Yohann Chastagnier
    • Method Detail

      • getPreviewMaxWidth

        public static int getPreviewMaxWidth()
        Gets the maximum width the preview can be.
        Returns:
        a non null integer.
      • getPreviewMaxHeight

        public static int getPreviewMaxHeight()
        Gets the maximum height the preview can be.
        Returns:
        a non null integer.
      • pdfViewerEnabled

        public static boolean pdfViewerEnabled()
        indicates if pdf viewer is enabled.
        Returns:
        a string, empty if no licence key.
      • getLicenceKey

        public static String getLicenceKey()
        Gets a licence key provided by the author of the current viewer.
        Returns:
        a string, empty if no licence key.
      • isCacheEnabled

        public static boolean isCacheEnabled()
        Indicates if the cache is enabled.
        Returns:
        true if enabled, false otherwise.
      • isSplitStrategyEnabled

        public static boolean isSplitStrategyEnabled()
        Indicates if the split strategy is enabled.
        Even if it is disabled, in some cases, the strategy is still used (when the default strategy does not work for example).
        Returns:
        true if enabled, false otherwise.
      • isSilentConversionEnabled

        public static boolean isSilentConversionEnabled()
        Indicates if the silent conversion is enabled.
        The cache must be enabled.
        Returns:
        true if enabled and if isCacheEnabled() returns true, false otherwise.
      • isTimeToLiveEnabled

        public static boolean isTimeToLiveEnabled()
        Indicates if the cached files written with time to live method. Each time a viewer is accessing cached data, the time to live is reset.
        If time to live is not enabled, then the file written into the cache are deleted only according to the Silverpeas cache rules.
        Returns:
        true if time to live, false otherwise.
      • nbMaxConversionsAtSameInstant

        public static int nbMaxConversionsAtSameInstant()
        Maximum number of conversions at a same instant.
        Returns:
        a primitive integer.