pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.util.xml.transform
Class XSLHandleImpl

java.lang.Object
  extended by org.torweg.pulse.util.xml.transform.XSLHandleImpl
All Implemented Interfaces:
LifecycleResource, XSLHandle

public class XSLHandleImpl
extends java.lang.Object
implements LifecycleResource, XSLHandle

a handle for creating, compiling, loading and saving XSL-Templates.

Version:
$Revision: 1977 $
Author:
Thomas Weber
See Also:
PoorMansCache

Constructor Summary
XSLHandleImpl(java.io.File source)
          an XSL file to prepare for transformation.
 
Method Summary
 java.lang.String getSource()
          returns the absolute path of the base XSL file.
 javax.xml.transform.Templates getTemplates()
          Returns the Templates-Object for Transformation.
 boolean isModified()
          returns true, if the templates have been modified, otherwise false.
 void restart()
          restarts the XSLHandleImpl (forces a reload).
 void shutdown()
          stops the lifecycle of the XSLHandleImpl.
 void startup()
          starts the lifecycle of the XSLHandleImpl.
 java.lang.String toString()
          returns a multi-line String representation of the XSLHandleImpl listing all template files referenced.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XSLHandleImpl

public XSLHandleImpl(java.io.File source)
              throws java.io.IOException
an XSL file to prepare for transformation.

Parameters:
source - the source XSL file
Throws:
java.io.IOException - on errors while reading/writing the compiled Templates.
Method Detail

getTemplates

public final javax.xml.transform.Templates getTemplates()
                                                 throws java.io.IOException
Returns the Templates-Object for Transformation.

Specified by:
getTemplates in interface XSLHandle
Returns:
Returns the Templates-Object for Transformation.
Throws:
java.io.IOException - on errors while reading the object from File

isModified

public final boolean isModified()
returns true, if the templates have been modified, otherwise false.

Specified by:
isModified in interface LifecycleResource
Specified by:
isModified in interface XSLHandle
Returns:
true, if the templates have been modified, otherwise false.

startup

public final void startup()
starts the lifecycle of the XSLHandleImpl.

Specified by:
startup in interface LifecycleResource

shutdown

public final void shutdown()
stops the lifecycle of the XSLHandleImpl.

So far nothing is done during shutdown.

Specified by:
shutdown in interface LifecycleResource

restart

public final void restart()
restarts the XSLHandleImpl (forces a reload).

Specified by:
restart in interface LifecycleResource

getSource

public final java.lang.String getSource()
returns the absolute path of the base XSL file.

Specified by:
getSource in interface XSLHandle
Returns:
the absolute path of the base XSL file
See Also:
XSLHandle.getSource()

toString

public java.lang.String toString()
returns a multi-line String representation of the XSLHandleImpl listing all template files referenced.

Overrides:
toString in class java.lang.Object
Returns:
a multi-line String representation of the XSLHandleImpl