Package com.persequor.extension.frontend
Class SagaRouteUtils
java.lang.Object
com.persequor.extension.frontend.SagaRouteUtils
Static method used to calculate the hash of an extension class, and to find an extension based on its hash.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Optional<T>
getExtensionFromHash
(Collection<T> extensions, String extensionHash) Based on a list of extensions, find the one with the corresponding hash.static String
getExtensionHash
(Class<?> extensionClass) This method is used by certain Saga UI/Frontend components to identify the extension class.
-
Constructor Details
-
SagaRouteUtils
public SagaRouteUtils()
-
-
Method Details
-
getExtensionHash
This method is used by certain Saga UI/Frontend components to identify the extension class.- Parameters:
extensionClass
- the class for which to calculate the hash- Returns:
- the hash for the class
-
getExtensionFromHash
Based on a list of extensions, find the one with the corresponding hash.- Type Parameters:
T
- the type of the extension- Parameters:
extensions
- the list of extensions to search throughextensionHash
- the hash of the extension to find (typically passed via the frontend in some way)- Returns:
- the extension with the corresponding hash, or empty if no such extension exists
-