Public Java API does not work without a HTTP request

Description

Viewport internally assumes that there is a HTTP request available in the execution context and accesses this request object without further checks if it exists or not.

Using the public Java API it is possible to execute viewport logic without a HTTP request being present (e.g. scheduled task or a long running task where work is offloaded into a separate thread).

In such cases operations like listing existing viewports or saving a new one with the public Java API will fail.

Example stacktrace

Environment

None

Assignee

Unassigned

Reporter

Sync User [K15t]

Labels

None

Participants

None

QA Status

None

Deployment

None

Documentation Status

None

UI Concept

None

External Votes

None

Components

Fix versions

Configure