Package org.apache.wicket.markup
Class MarkupResourceStream
java.lang.Object
org.apache.wicket.markup.MarkupResourceStream
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
,IClusterable
,IFixedLocationResourceStream
,IResourceStream
,IModifiable
public class MarkupResourceStream
extends Object
implements IResourceStream, IFixedLocationResourceStream
An IResourceStream implementation with specific extensions for markup resource streams.
- Author:
- Juergen Donnerstag
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMarkupResourceStream
(IResourceStream resourceStream) Construct.MarkupResourceStream
(IResourceStream resourceStream, ContainerInfo containerInfo, Class<?> markupClass) Construct. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
In case of markup inheritance, the base markup resource.Get the resource stream containing the base markup (markup inheritance)final String
Gets cacheKey.Get the container info associated with the markupfinal String
Gets doctype.Gets the markup encoding.Get the actual component class the markup is directly associated with.Gets the resource that contains this markupgetStyle()
final String
Get the wicket namespace valid for this specific markupboolean
isHtml5()
length()
void
setBaseMarkup
(Markup baseMarkup) In case of markup inheritance, the base markup.final void
setCacheKey
(String cacheKey) Set the cache keyfinal void
setDoctype
(CharSequence doctype) Sets doctype.void
void
void
setVariation
(String variation) final void
setWicketNamespace
(String wicketNamespace) Sets wicketNamespace.toString()
-
Field Details
-
WICKET_XHTML_DTD
- See Also:
-
-
Constructor Details
-
MarkupResourceStream
Construct.- Parameters:
resourceStream
-
-
MarkupResourceStream
public MarkupResourceStream(IResourceStream resourceStream, ContainerInfo containerInfo, Class<?> markupClass) Construct.- Parameters:
resourceStream
-containerInfo
-markupClass
-
-
-
Method Details
-
locationAsString
- Specified by:
locationAsString
in interfaceIFixedLocationResourceStream
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceIResourceStream
- Throws:
IOException
-
getContentType
- Specified by:
getContentType
in interfaceIResourceStream
-
getInputStream
- Specified by:
getInputStream
in interfaceIResourceStream
- Throws:
ResourceStreamNotFoundException
-
getLocale
- Specified by:
getLocale
in interfaceIResourceStream
-
lastModifiedTime
- Specified by:
lastModifiedTime
in interfaceIModifiable
-
length
- Specified by:
length
in interfaceIResourceStream
-
setLocale
- Specified by:
setLocale
in interfaceIResourceStream
-
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
Gets cacheKey.- Returns:
- cacheKey
-
setCacheKey
Set the cache key- Parameters:
cacheKey
-
-
getResource
Gets the resource that contains this markup- Returns:
- The resource where this markup came from
-
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
- Returns:
- usually it is "wicket:id"
-
setWicketNamespace
Sets wicketNamespace.- Parameters:
wicketNamespace
- wicketNamespace
-
getBaseMarkupResourceStream
Get the resource stream containing the base markup (markup inheritance)- Returns:
- baseMarkupResource Null, if not base markup
-
setBaseMarkup
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
- Specified by:
getStyle
in interfaceIResourceStream
-
getVariation
- Specified by:
getVariation
in interfaceIResourceStream
-
setStyle
- Specified by:
setStyle
in interfaceIResourceStream
-
setVariation
- Specified by:
setVariation
in interfaceIResourceStream
-
toString
-
getDoctype
Gets doctype.- Returns:
- The doctype excluding 'DOCTYPE'
-
setDoctype
Sets doctype.- Parameters:
doctype
- doctype
-
isHtml5
- Returns:
- True, if doctype == <!DOCTYPE html>
- See Also:
-