Class MarkupResourceStream

java.lang.Object
org.apache.wicket.markup.MarkupResourceStream
All Implemented Interfaces:
Closeable, Serializable, AutoCloseable, org.apache.wicket.util.io.IClusterable, org.apache.wicket.util.resource.IFixedLocationResourceStream, org.apache.wicket.util.resource.IResourceStream, org.apache.wicket.util.watch.IModifiable

public class MarkupResourceStream extends Object implements org.apache.wicket.util.resource.IResourceStream, org.apache.wicket.util.resource.IFixedLocationResourceStream
An IResourceStream implementation with specific extensions for markup resource streams.
Author:
Juergen Donnerstag
See Also:
  • Field Details

  • Constructor Details

    • MarkupResourceStream

      public MarkupResourceStream(org.apache.wicket.util.resource.IResourceStream resourceStream)
      Construct.
      Parameters:
      resourceStream -
    • MarkupResourceStream

      public MarkupResourceStream(org.apache.wicket.util.resource.IResourceStream resourceStream, ContainerInfo containerInfo, Class<?> markupClass)
      Construct.
      Parameters:
      resourceStream -
      containerInfo -
      markupClass -
  • Method Details

    • locationAsString

      Specified by:
      locationAsString in interface org.apache.wicket.util.resource.IFixedLocationResourceStream
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.apache.wicket.util.resource.IResourceStream
      Throws:
      IOException
    • getContentType

      Specified by:
      getContentType in interface org.apache.wicket.util.resource.IResourceStream
    • getInputStream

      public InputStream getInputStream() throws org.apache.wicket.util.resource.ResourceStreamNotFoundException
      Specified by:
      getInputStream in interface org.apache.wicket.util.resource.IResourceStream
      Throws:
      org.apache.wicket.util.resource.ResourceStreamNotFoundException
    • getLocale

      public Locale getLocale()
      Specified by:
      getLocale in interface org.apache.wicket.util.resource.IResourceStream
    • lastModifiedTime

      Specified by:
      lastModifiedTime in interface org.apache.wicket.util.watch.IModifiable
    • length

      public org.apache.wicket.util.lang.Bytes length()
      Specified by:
      length in interface org.apache.wicket.util.resource.IResourceStream
    • setLocale

      public void setLocale(Locale locale)
      Specified by:
      setLocale in interface org.apache.wicket.util.resource.IResourceStream
    • getMarkupClass

      public Class<? extends Component> getMarkupClass()
      Get the actual component class the markup is directly associated with. Note: it not necessarily must be the container class.
      Returns:
      The directly associated class
    • getContainerInfo

      Get the container info associated with the markup
      Returns:
      ContainerInfo
    • getCacheKey

      public final String getCacheKey()
      Gets cacheKey.
      Returns:
      cacheKey
    • setCacheKey

      public final void setCacheKey(String cacheKey)
      Set the cache key
      Parameters:
      cacheKey -
    • getResource

      public org.apache.wicket.util.resource.IResourceStream getResource()
      Gets the resource that contains this markup
      Returns:
      The resource where this markup came from
    • getEncoding

      public String getEncoding()
      Gets the markup encoding. A markup encoding may be specified in a markup file with an XML encoding specifier of the form <?xml ... encoding="..." ?>.
      Returns:
      Encoding, or null if not found.
    • getWicketNamespace

      Get the wicket namespace valid for this specific markup
      Returns:
      wicket namespace
    • getWicketId

      public final String getWicketId()
      Returns:
      usually it is "wicket:id"
    • setWicketNamespace

      public final void setWicketNamespace(String wicketNamespace)
      Sets wicketNamespace.
      Parameters:
      wicketNamespace - wicketNamespace
    • getBaseMarkupResourceStream

      Get the resource stream containing the base markup (markup inheritance)
      Returns:
      baseMarkupResource Null, if not base markup
    • setBaseMarkup

      public void setBaseMarkup(Markup baseMarkup)
      In case of markup inheritance, the base markup.
      Parameters:
      baseMarkup - The base markup
    • getBaseMarkup

      In case of markup inheritance, the base markup resource.
      Returns:
      The base markup
    • getStyle

      public String getStyle()
      Specified by:
      getStyle in interface org.apache.wicket.util.resource.IResourceStream
    • getVariation

      public String getVariation()
      Specified by:
      getVariation in interface org.apache.wicket.util.resource.IResourceStream
    • setStyle

      public void setStyle(String style)
      Specified by:
      setStyle in interface org.apache.wicket.util.resource.IResourceStream
    • setVariation

      public void setVariation(String variation)
      Specified by:
      setVariation in interface org.apache.wicket.util.resource.IResourceStream
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getDoctype

      public final String getDoctype()
      Gets doctype.
      Returns:
      The doctype excluding 'DOCTYPE'
    • setDoctype

      public final void setDoctype(CharSequence doctype)
      Sets doctype.
      Parameters:
      doctype - doctype
    • isHtml5

      public boolean isHtml5()
      Returns:
      True, if doctype == <!DOCTYPE html>
      See Also: