ReadonlybeforeActor that must be registered in the bus before this actor.
ReadonlybusThe bus this actor subscribes to.
ReadonlynameThe name for this actor.
Protected ReadonlyparsedStatic ReadonlyHYDRAStatic ReadonlyLINK_Correct all URLs within the given Hydra properties that are exposed under the http protocol, while the page they were retrieved from is hosted over https.
Occasionally, TPF servers are hosted over https, while their base URL is configured as http. This causes all URLs in their metadata to be exposed under the http protocol, which makes the Hydra controls unusable, as they can not be linked to the current page anymore. Since this is a common problem, we detect it, correct the invalid URLs, and emit a warning.
Only URLs on the host of the page are corrected, as the controls legitimately refer to http URLs elsewhere, such as the rdf:subject, rdf:predicate and rdf:object values of hydra:property.
The page URL in which the Hydra properties are defined.
The collected Hydra properties.
The action context, in which a warning will be logged upon detecting an invalid protocol.
The Hydra properties, with all invalidly exposed URLs corrected.
ProtectedgetOptionaldata: () => anyCollect all hydra properties from a given metadata stream in a nice convenient nested hash (property / subject / objects).
The collected Hydra properties.
Determine the URL prefix under which servers with an invalidly configured base URL expose the controls of the given page.
Concretely, this is the origin of the page URL with the https protocol replaced by http, including the trailing slash, so that only URLs on the host of the page are matched.
The page URL in which the Hydra properties are defined.
The invalid URL prefix, or undefined if the page URL is not an https URL with a path.
Collect all Hydra page links from the given Hydra properties object.
The page URL in which the Hydra properties are defined.
The collected Hydra properties.
The Hydra links
Collect all search forms from the given Hydra properties object.
The collected Hydra properties.
The search forms.
ProtectedhasCheck if any URL within the given Hydra properties starts with the given prefix.
The collected Hydra properties.
The URL prefix of invalidly exposed controls.
ProtectedlogOptionaldata: () => anyProtectedlogOptionaldata: () => anyProtectedlogOptionaldata: () => anyProtectedlogOptionaldata: () => anyProtectedlogOptionaldata: () => anyProtectedlogOptionaldata: () => anyParse a URI template, or retrieve it from a cache.
A URI template string.
A parsed URI template object.
Run the given action on this actor.
In most cases, this method should not be called directly. Instead, #runObservable should be called.
The action to run.
A promise that resolves to the run result.
Run the given action on this actor AND invokes the Bus#onRun method.
The action to run.
A promise that resolves to the run result.
Check if this actor can run the given action, without actually running it.
The action to test.
A promise that resolves to the test result.
StaticgetGet the logger from the given context.
An optional context.
The logger or undefined.
An RDF Metadata Extract Actor that extracts all Hydra controls from the metadata stream.