Class WopiSettings

java.lang.Object
org.silverpeas.wbe.wopi.util.WopiSettings

public class WopiSettings extends Object
Author:
silveryocha
  • Method Details

    • isEnabled

      public static boolean isEnabled()
      Indicates if WOPI is enabled.
      Returns:
      true if enabled, false otherwise.
    • isLockCapabilityEnabled

      public static boolean isLockCapabilityEnabled()
      Indicates if WOPI lock capability is enabled.
      Returns:
      true if enabled, false otherwise.
    • getTimestampVerificationElements

      public static Optional<org.silverpeas.kernel.util.Pair<String,String>> getTimestampVerificationElements()
      Gets the elements for timestamp verification feature on put file operation.
      Returns:
      an optional pair containing on left the timestamp request header name and on right the JSON response in case of conflict.
    • getExitFieldNameDetection

      public static Optional<String> getExitFieldNameDetection()
      Gets the field name to check in order to detected an editor close.
      Returns:
      an optional string.
    • getWopiHostServiceBaseUrl

      public static String getWopiHostServiceBaseUrl()
      Gets the base URL of the WOPI host.
      Returns:
      an string.
    • getWopiClientBaseUrl

      public static Optional<String> getWopiClientBaseUrl()
      Gets the base URL of the WOPI client if any.
      Returns:
      an optional string.
    • getWopiClientDiscoveryUrl

      public static String getWopiClientDiscoveryUrl()
      Gets the WOPI client discovery URL.
      Returns:
      a string.
    • getWopiClientDiscoveryTimeToLive

      public static long getWopiClientDiscoveryTimeToLive()
      Gets the time to live in hours of the discovery cache.

      12 hours by default.

      Returns:
      a number of hours as long.
    • getWopiClientAdministrationUrl

      public static String getWopiClientAdministrationUrl()
      Gets the WOPI client administration URL.
      Returns:
      a string.
    • getUIDefaults

      public static Optional<org.silverpeas.kernel.util.Pair<String,String>> getUIDefaults()
      Gets the UI defaults.
      Returns:
      a Pair containing the hidden parameter name on left and the UI defaults string on right.