Class IconResourceLoader

java.lang.Object
ai.pipestream.api.registration.IconResourceLoader

@ApplicationScoped public class IconResourceLoader extends Object
Utility for loading SVG icons from various sources and converting them to base64 data URIs. Supports classpath resources, file system paths, URLs, and inline base64 data.
  • Constructor Details

    • IconResourceLoader

      public IconResourceLoader()
  • Method Details

    • loadIcon

      public Optional<String> loadIcon(String iconPath)
      Load an SVG icon from the specified path and return as base64 data URI.
      Parameters:
      iconPath - Path to the icon. Supports: - classpath:/icons/service.svg (bundled resource) - /absolute/path/to/icon.svg (file system) - https://cdn.example.com/icon.svg (URL) - data:image/svg+xml;base64,... (already encoded)
      Returns:
      Base64 data URI or empty if loading fails
    • getDefaultServiceIcon

      public String getDefaultServiceIcon()
      Get a default icon as base64 data URI for services without custom icons