Class WopiSettings


  • public class WopiSettings
    extends Object
    Author:
    silveryocha
    • Method Detail

      • 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<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.
      • getWopiUserIdPrefix

        public static String getWopiUserIdPrefix()
        Gets the prefix of WOPI user ids to exchange.
        Returns:
        a string which could be empty but never null.
      • getUIDefaults

        public static Optional<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.