to.etc.domui.parts
Class FileTypePart

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

public class FileTypePart
extends java.lang.Object
implements IBufferedPartFactory


Constructor Summary
FileTypePart()
           
 
Method Summary
 java.lang.Object decodeKey(java.lang.String rurl, IExtendedParameterInfo param)
          Decodes the request into a resource to generate.
 void generate(PartResponse pr, DomApplication da, java.lang.Object key, IResourceDependencyList rdl)
          This must generate the output for the resource.
static java.lang.String getURL(java.lang.String ext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTypePart

public FileTypePart()
Method Detail

decodeKey

public java.lang.Object decodeKey(java.lang.String rurl,
                                  IExtendedParameterInfo param)
                           throws java.lang.Exception
Decodes the request into a resource to generate. This simply returns the resource name preceded with a prefix to make it unique.

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

getURL

public static java.lang.String getURL(java.lang.String ext)