to.etc.domui.parts
Class SvgPartFactory

java.lang.Object
  extended by to.etc.domui.parts.SvgPartFactory
All Implemented Interfaces:
IBufferedPartFactory, IPartFactory, IUrlPart

public class SvgPartFactory
extends java.lang.Object
implements IBufferedPartFactory, IUrlPart

Themed SVG generator.

Author:
Frits Jalvingh Created on Aug 31, 2009

Constructor Summary
SvgPartFactory()
           
 
Method Summary
 boolean accepts(java.lang.String rurl)
           
 java.lang.Object decodeKey(java.lang.String rurl, IExtendedParameterInfo param)
          Decode the input and create a KEY for the request.
 void generate(PartResponse pr, DomApplication da, java.lang.Object key, IResourceDependencyList rdl)
          This must generate the output for the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SvgPartFactory

public SvgPartFactory()
Method Detail

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 key,
                     @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.
key - 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