org.jpublish.repository.filesystem
Class ExtendedFileSystemRepository
java.lang.Object
|
+--org.jpublish.repository.AbstractRepository
|
+--org.jpublish.repository.filesystem.ExtendedFileSystemRepository
- All Implemented Interfaces:
- Configurable, Repository, XMLConstants
- public class ExtendedFileSystemRepository
- extends AbstractRepository
- implements Configurable, XMLConstants
The ExtendedFileSystemRepository allows actions to be bound to content
elements through XML configuration files. Only actions bound to dynamic
content elements will be executed.
Note: Actions attached to content elements cannot cause an HTTP redirect.
The "redirect" value will be ignored.
- Author:
- Anthony Eden
Method Summary |
java.lang.String |
get(java.lang.String path)
Get the content from the given path. |
java.lang.String |
get(java.lang.String path,
org.apache.velocity.VelocityContext context)
Get the content from the given path and merge it with
the given context. |
long |
getLastModified(java.lang.String path)
Get the last modified time in milliseconds for the given path. |
java.lang.String |
getName()
Get the name of the repository. |
java.lang.String |
getRoot()
|
void |
loadConfiguration(org.jdom.Element element)
Load the class configuration from the given JDOM Element. |
void |
setRoot(java.lang.String root)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExtendedFileSystemRepository
public ExtendedFileSystemRepository()
get
public java.lang.String get(java.lang.String path)
throws java.lang.Exception
- Description copied from interface:
Repository
- Get the content from the given path. Implementations of this method
should NOT merge the content using Velocity.
- Following copied from interface:
org.jpublish.Repository
- Parameters:
path
- The relative content path- Returns:
- The content as a String
- Throws:
java.lang.Exception
- Any Exception
get
public java.lang.String get(java.lang.String path,
org.apache.velocity.VelocityContext context)
throws java.lang.Exception
- Description copied from interface:
Repository
- Get the content from the given path and merge it with
the given context.
- Following copied from interface:
org.jpublish.Repository
- Parameters:
path
- The content pathcontext
- The VelocityContext- Returns:
- The content as a String
- Throws:
java.lang.Exception
- Any Exception
getName
public java.lang.String getName()
- Description copied from interface:
Repository
- Get the name of the repository. This name is used to expose the
Repository in the Velocity engine.
- Following copied from interface:
org.jpublish.Repository
- Returns:
- The Repository name
getLastModified
public long getLastModified(java.lang.String path)
- Description copied from interface:
Repository
- Get the last modified time in milliseconds for the given path.
- Following copied from interface:
org.jpublish.Repository
- Parameters:
path
- The content path- Returns:
- The last modified time in milliseconds
- Throws:
java.lang.Exception
- Any Exception
getRoot
public java.lang.String getRoot()
setRoot
public void setRoot(java.lang.String root)
loadConfiguration
public void loadConfiguration(org.jdom.Element element)
throws java.lang.Exception
- Description copied from interface:
Configurable
- Load the class configuration from the given JDOM Element.
- Specified by:
loadConfiguration
in interface Configurable
- Following copied from interface:
org.jpublish.Configurable
- Parameters:
element
- The JDOM Element- Throws:
java.lang.Exception
- Any exception
Copyright (C) 2001 Anthony Eden. All Rights Reserved.