ProtectedbackupCopies the current card to a unique backup resource, exactly as it is stored.
The backup must not depend on the content being readable or parseable:
a broken card is the case it exists for.
It is a normal resource of the pod, so the pod's authorization applies to it.
Returns null if there is no card to back up.
Checks whether the input can be handled by this class. If it cannot handle the input, rejects with an error explaining why.
Input that could potentially be handled.
A promise resolving if the input can be handled, rejecting with an Error if not.
ProtectedfindProtectedgenerateGenerates the pod resources for the given WebID and keeps the ones that belong to the recovered
document: the profile document itself and any resource generated next to it, such as <document>.acl
for WAC or <document>.acr for ACP deployments.
ProtectedgetHandles the given input. This may only be called if canHandle did not reject. When unconditionally calling both in sequence, consider handleSafe instead.
Input that needs to be handled.
A promise resolving when handling is finished.
Helper function that first runs canHandle followed by handle. Throws the error of canHandle if the data cannot be handled, or returns the result of handle otherwise.
Input data that will be handled if it can be handled.
A promise resolving if the input can be handled, rejecting with an Error if not.
Recovers the profile card of a WebID that is hosted in a pod of the requesting account.
Unlike LinkWebIdHandler, this does not need the registration-token flow or a readable profile: the account session proves the ownership of the account and the pod store proves that the WebID is hosted in one of its pods. The resources that pod generation produces for the recovered WebID are then written server-side as they are: the templates are the source of truth. The previous profile document is backed up first. The recovered WebID is the existing link, fragment included.