code: String getForwardPluginUri(
        String pluginId,
        @Nullable @CheckForNull String pathRemainder,
        @Nullable @CheckForNull String queryString) {
      // get plugin path with elevated permissions because the anonymous user can also request plugins
      Plugin plugin = runAsSystem(() -> dataService.findOneById(PLUGIN, pluginId, Plugin.class));
      if (plugin == null) {
        throw new UnknownPluginException(pluginId);
      }
  
      StringBuilder strBuilder = new StringBuilder("forward:");
      strBuilder.append(PluginController.PLUGIN_URI_PREFIX).append(plugin.getPath());
      // If you do not append the trailing slash the queryString will be appended by an unknown code
      // snippet.
      // The trailing slash is needed for clients to serve resources 'relative' to the URI-path.
      if (pluginId.startsWith("app")) {
        strBuilder.append("/");
      }
      if (pathRemainder != null && !pathRemainder.isEmpty()) {
        strBuilder.append("/").append(pathRemainder);
      }
      if (queryString != null && !queryString.isEmpty()) {
        strBuilder.append('?').append(queryString);
      }
      return strBuilder.toString();
    }
docs: Forwards to the plugin.
  
  @param pluginId ID of the plugin to forward to. Adds a trailing slash if this refers to the app
  controller
  @param pathRemainder remainder of the path to add after the pluginID with / in between if it is
  nonempty
  @param queryString query params to add to the forward url with ? in between if it is nonempty
  @return forward URL String