Module: alfresco/util/hashUtils

alfresco/util/hashUtils

Utility object for hash-related utilities. Note that this is not a Class, and so does not need to be instantiated before use.
Author:
  • Martin Doyle
License:
Source:

Methods

getHash() → {Object}

Get the current hash value as an object. All values will be URI decoded unless a suppresssDecoding argument of true is provided.
Source:
Returns:
The hash value as an object
Type
Object

getHashString() → {string}

Get the current hash value as a string. All values will be URI decoded.
Source:
Returns:
The hash value as a string
Type
string

setHash(hash, replace)

Set the current hash value from an object. All values will be URI encoded unless a suppressEncoding argument of true is provided.
Parameters:
Name Type Argument Description
hash object | string The new hash
replace boolean <optional>
Replace the current hash, rather than changing (i.e. do not add to the history)
Source:

setHashString(hashString, replace)

Set the current hash value from a string. All values will be URI encoded.
Parameters:
Name Type Argument Description
hashString string The new hash string
replace boolean <optional>
Replace the current hash, rather than changing (i.e. do not add to the history)
Deprecated:
  • Since 1.0.48 - Use [hashUtils.setHash()]@{link module:alfresco/util/hashUtils#setHash} instead
    Source:

    updateHash(newValues, replace, force)

    Update the current hash (by default, this will not do the update if the values are unchanged). To remove a value from the hash, pass through null or undefined. All values will be URI encoded.
    Parameters:
    Name Type Argument Description
    newValues Object The new hash values with hash names as keys and hash values as their values (will only change values for hash names with keys in this object)
    replace boolean <optional>
    Replace the current hash, rather than changing (i.e. do not add to the history)
    force boolean <optional>
    Force an update, even if the values are unchanged (i.e. will trigger hash-change listeners)
    Source: