Package com.ooyala.pulse
Class CanonicalPath
- java.lang.Object
-
- com.ooyala.pulse.CanonicalPath
-
public final class CanonicalPath extends java.lang.ObjectUtility for deriving a deterministic canonical path from an ad media URL.Rules: 1. Parses URL using
URI, keeping only the path (dropping scheme, host, port, query, fragment). 2. URL-decodes%XXpercent encodings once (preserving+). 3. Removes volatile parameters, key-value pairs, timestamps, UUIDs, and 16+ char hex strings. 4. Resolves.and.., collapses duplicate slashes, ensures leading/and no trailing/.Both the SDK and the Pulse backend must apply identical rules and use the same ruleVersion.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringfrom(java.lang.String mediaUrl)static java.lang.Stringfrom(java.lang.String mediaUrl, CanonicalPathConfig config)Generates a deterministic canonical path from the given media URL.
-
-
-
Method Detail
-
from
public static java.lang.String from(java.lang.String mediaUrl, CanonicalPathConfig config)Generates a deterministic canonical path from the given media URL.- Parameters:
mediaUrl- The raw media file URL string (nullable).config- Configuration containing volatile keys and rule version.- Returns:
- Canonical path string starting with
/(or""if invalid/empty).
-
from
public static java.lang.String from(java.lang.String mediaUrl)
-
-