Class InitialContent

java.lang.Object
com.atlassian.plugin.webresource.impl.support.InitialContent

public abstract class InitialContent extends Object

This class goal is to allow the load of the most appropriate source of content for the file.

It does this by abstracting over a plugin’s filesystem and choosing the most appropriate tangible file to pull content from.

Since:
5.0.0
  • Constructor Details

    • InitialContent

      public InitialContent(@Nullable InputStream content, @Nullable String path, @Nullable com.atlassian.sourcemap.ReadableSourceMap sourceMap)
  • Method Details

    • getContent

      public @NonNull Optional<InputStream> getContent()
    • getPath

      public @NonNull Optional<String> getPath()
    • getSourceMap

      public @NonNull Optional<com.atlassian.sourcemap.ReadableSourceMap> getSourceMap()
    • toContent

      public abstract @NonNull Content toContent(@NonNull Content originalContent)
      Converts the current InitialContent to Content.
      Parameters:
      originalContent - The original content to be transformed.
      Returns:
      The build Content