to.etc.domui.themes
Class ThemePartFactory
java.lang.Object
to.etc.domui.themes.ThemePartFactory
- All Implemented Interfaces:
- IBufferedPartFactory, IPartFactory, IUrlPart
public class ThemePartFactory
- extends java.lang.Object
- implements IBufferedPartFactory, IUrlPart
This accepts all urls in the format *.theme.xxx. It generates string resources that
depend on the theme map. It reads the original resource as a string and replaces all
theme values therein before re-rendering the result to the caller.
- Author:
- Frits Jalvingh
Created on Sep 1, 2009
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThemePartFactory
public ThemePartFactory()
accepts
public boolean accepts(java.lang.String rurl)
- Specified by:
accepts
in interface IUrlPart
decodeKey
public java.lang.Object decodeKey(java.lang.String rurl,
IExtendedParameterInfo param)
throws java.lang.Exception
- Description copied from interface:
IBufferedPartFactory
- Decode the input and create a KEY for the request. This key must be hashable, and forms
the key for the cache to retrieve an already generated copy.
- Specified by:
decodeKey
in interface IBufferedPartFactory
- Returns:
-
- Throws:
java.lang.Exception
generate
public void generate(@Nonnull
PartResponse pr,
@Nonnull
DomApplication da,
@Nonnull
java.lang.Object k,
@Nonnull
IResourceDependencyList rdl)
throws java.lang.Exception
- Description copied from interface:
IBufferedPartFactory
- This must generate the output for the resource. That output will be put into the cache and re-rendered
when the same resource is used without calling this method again.
- Specified by:
generate
in interface IBufferedPartFactory
da
- The Application on behalf of which this resource is generated.k
- The key, as specified by decodeKey.rdl
- When running in development mode, each file resource used should be added
to this list. The buffer code will use that list to check whether a source
for this thing has changed; if so it will be re-generated. This causes runtime
editability for parameter files of any buffered thingydoo.
- Throws:
java.lang.Exception