org.silverpeas.viewer
Class ViewerSettings

java.lang.Object
  extended by org.silverpeas.viewer.ViewerSettings

public class ViewerSettings
extends Object

All settings around the viewer services.

Author:
Yohann Chastagnier

Field Summary
protected static ResourceLocator settings
           
 
Constructor Summary
ViewerSettings()
           
 
Method Summary
static String getLicenceKey()
          Gets a licence key provided by the author of the current viewer.
static int getPreviewMaxHeight()
          Gets the maximum height the preview can be.
static int getPreviewMaxWidth()
          Gets the maximum width the preview can be.
static boolean isCacheEnabled()
          Indicates if the cache is enabled.
static boolean isSilentConversionEnabled()
          Indicates if the silent conversion is enabled.
static boolean isSplitStrategyEnabled()
          Indicates if the split strategy is enabled.
static boolean isTimeToLiveEnabled()
          Indicates if the cached files written with time to live method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

settings

protected static ResourceLocator settings
Constructor Detail

ViewerSettings

public ViewerSettings()
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.

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.


Copyright © 2016 Silverpeas. All Rights Reserved.