org.jpublish.repository.db
Class DBRepository
java.lang.Object
|
+--org.jpublish.repository.AbstractRepository
|
+--org.jpublish.repository.db.DBRepository
- All Implemented Interfaces:
- Configurable, Repository
- public class DBRepository
- extends AbstractRepository
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. |
void |
loadConfiguration(org.jdom.Element element)
Load the repository's configuration from the given JDOM element. |
protected void |
setContentQuery(java.lang.String contentQuery)
|
protected void |
setLastModifiedQuery(java.lang.String lastModifiedQuery)
|
protected void |
setPassword(java.lang.String password)
|
protected void |
setURL(java.lang.String url)
|
protected void |
setUsername(java.lang.String username)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBRepository
public DBRepository()
getName
public java.lang.String getName()
- Get the name of the repository. This name is used to expose the
Repository in the Velocity engine.
- Returns:
- The Repository name
get
public java.lang.String get(java.lang.String path)
throws java.lang.Exception
- Get the content from the given path. Implementations of this method
should NOT merge the content using Velocity.
- 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
- Get the content from the given path and merge it with
the given context.
- Parameters:
path
- The content pathcontext
- The VelocityContext- Returns:
- The content as a String
- Throws:
java.lang.Exception
- Any Exception
getLastModified
public long getLastModified(java.lang.String path)
throws java.lang.Exception
- Get the last modified time in milliseconds for the given path.
- Parameters:
path
- The content path- Returns:
- The last modified time in milliseconds
- Throws:
java.lang.Exception
- Any exception
loadConfiguration
public void loadConfiguration(org.jdom.Element element)
throws java.lang.Exception
- Load the repository's configuration from the given JDOM element.
- Parameters:
element
- The JDOM element- Throws:
java.lang.Exception
-
setURL
protected void setURL(java.lang.String url)
setUsername
protected void setUsername(java.lang.String username)
setPassword
protected void setPassword(java.lang.String password)
setContentQuery
protected void setContentQuery(java.lang.String contentQuery)
setLastModifiedQuery
protected void setLastModifiedQuery(java.lang.String lastModifiedQuery)
Copyright (C) 2001 Anthony Eden. All Rights Reserved.