Package org.apache.wicket.resource
Class TextTemplateResourceReference
- java.lang.Object
-
- org.apache.wicket.request.resource.ResourceReference
-
- org.apache.wicket.resource.TextTemplateResourceReference
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.wicket.util.io.IClusterable
public class TextTemplateResourceReference extends ResourceReference implements org.apache.wicket.util.io.IClusterable
A class which adapts aPackageTextTemplateto aResourceReference.- Author:
- James Carman
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.wicket.request.resource.ResourceReference
ResourceReference.Key, ResourceReference.LambdaResourceReference, ResourceReference.UrlAttributes
-
-
Constructor Summary
Constructors Constructor Description TextTemplateResourceReference(java.lang.Class<?> scope, java.lang.String fileName, java.lang.String contentType, java.lang.String encoding, IModel<java.util.Map<java.lang.String,java.lang.Object>> variablesModel)Creates a resource reference to aPackageTextTemplate.TextTemplateResourceReference(java.lang.Class<?> scope, java.lang.String fileName, java.lang.String contentType, java.lang.String encoding, IModel<java.util.Map<java.lang.String,java.lang.Object>> variablesModel, java.util.Locale locale, java.lang.String style, java.lang.String variation)Construct.TextTemplateResourceReference(java.lang.Class<?> scope, java.lang.String fileName, java.lang.String contentType, IModel<java.util.Map<java.lang.String,java.lang.Object>> variablesModel)Creates a resource reference to aPackageTextTemplate.TextTemplateResourceReference(java.lang.Class<?> scope, java.lang.String fileName, IModel<java.util.Map<java.lang.String,java.lang.Object>> variablesModel)Creates a resource reference to aPackageTextTemplate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IResourcegetResource()Creates a new resource which returns the interpolated value of the text template.-
Methods inherited from class org.apache.wicket.request.resource.ResourceReference
canBeRegistered, equals, getDependencies, getExtension, getKey, getLocale, getName, getScope, getStyle, getUrlAttributes, getVariation, hashCode, of, of, toString
-
-
-
-
Constructor Detail
-
TextTemplateResourceReference
public TextTemplateResourceReference(java.lang.Class<?> scope, java.lang.String fileName, IModel<java.util.Map<java.lang.String,java.lang.Object>> variablesModel)Creates a resource reference to aPackageTextTemplate.- Parameters:
scope- theClassto be used for retrieving the classloader for loading thePackagedTextTemplatefileName- the file namevariablesModel- the template variables as a model
-
TextTemplateResourceReference
public TextTemplateResourceReference(java.lang.Class<?> scope, java.lang.String fileName, java.lang.String contentType, IModel<java.util.Map<java.lang.String,java.lang.Object>> variablesModel)Creates a resource reference to aPackageTextTemplate.- Parameters:
scope- theClassto be used for retrieving the classloader for loading thePackagedTextTemplatefileName- the file namecontentType- the mime type of this resource, such as "image/jpeg" or "text/html"variablesModel- the template variables as a model
-
TextTemplateResourceReference
public TextTemplateResourceReference(java.lang.Class<?> scope, java.lang.String fileName, java.lang.String contentType, java.lang.String encoding, IModel<java.util.Map<java.lang.String,java.lang.Object>> variablesModel)Creates a resource reference to aPackageTextTemplate.- Parameters:
scope- theClassto be used for retrieving the classloader for loading thePackagedTextTemplatefileName- the file namecontentType- the mime type of this resource, such as "image/jpeg" or "text/html"encoding- the file's encoding, for example, "UTF-8"variablesModel- the template variables as a model
-
TextTemplateResourceReference
public TextTemplateResourceReference(java.lang.Class<?> scope, java.lang.String fileName, java.lang.String contentType, java.lang.String encoding, IModel<java.util.Map<java.lang.String,java.lang.Object>> variablesModel, java.util.Locale locale, java.lang.String style, java.lang.String variation)Construct.- Parameters:
scope- theClassto be used for retrieving the classloader for loading thePackagedTextTemplatefileName- the file namecontentType- the mime type of this resource, such as "image/jpeg" or "text/html"encoding- the file's encoding, for example, "UTF-8"variablesModel- the template variables as a modellocale- Preferred locale for the resourcestyle- Preferred style for the resourcevariation- Preferred variation for the resource
-
-
Method Detail
-
getResource
public IResource getResource()
Creates a new resource which returns the interpolated value of the text template.- Specified by:
getResourcein classResourceReference- Returns:
- a new resource which returns the interpolated value of the text template
-
-