Package org.silverpeas.wbe.wopi.util
Class WopiSettings
java.lang.Object
org.silverpeas.wbe.wopi.util.WopiSettings
- Author:
- silveryocha
-
Method Summary
Modifier and TypeMethodDescriptionGets the field name to check in order to detected an editor close.Gets the elements for timestamp verification feature on put file operation.Gets the UI defaults.static StringGets the WOPI client administration URL.Gets the base URL of the WOPI client if any.static longGets the time to live in hours of the discovery cache.static StringGets the WOPI client discovery URL.static StringGets the base URL of the WOPI host.static booleanIndicates if WOPI is enabled.static booleanIndicates if WOPI lock capability is enabled.
-
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
Gets the field name to check in order to detected an editor close.- Returns:
- an optional string.
-
getWopiHostServiceBaseUrl
Gets the base URL of the WOPI host.- Returns:
- an string.
-
getWopiClientBaseUrl
Gets the base URL of the WOPI client if any.- Returns:
- an optional 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
Gets the WOPI client administration URL.- Returns:
- a string.
-
getUIDefaults
Gets the UI defaults.- Returns:
- a
Paircontaining the hidden parameter name on left and the UI defaults string on right.
-