org.apache.velocity.site.news
Class NewsManagerUtils

java.lang.Object
  extended by org.apache.velocity.site.news.NewsManagerUtils

public abstract class NewsManagerUtils
extends java.lang.Object

Helper class to retrieve the NewsManager from the news plugin. Must not be in the model package or the class loaders will fail to find the right class.


Field Summary
static java.lang.String NEWS_CONTAINER_NAME
           
 
Method Summary
static void bindModelRealm(org.codehaus.plexus.PlexusContainer container)
          This binds the site plugin to load all model classes from the news plugin class loader.
static NewsManager getNewsManager(org.codehaus.plexus.PlexusContainer container)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEWS_CONTAINER_NAME

public static final java.lang.String NEWS_CONTAINER_NAME
See Also:
Constant Field Values
Method Detail

getNewsManager

public static NewsManager getNewsManager(org.codehaus.plexus.PlexusContainer container)
                                  throws VelocityNewsException
Throws:
VelocityNewsException

bindModelRealm

public static final void bindModelRealm(org.codehaus.plexus.PlexusContainer container)
                                 throws VelocityNewsException
This binds the site plugin to load all model classes from the news plugin class loader. In turn we can now look up the news plugin from the site plugin and retrieve the model to use it in the VelociMacro. This is a major kludge around the strange maven class hierarchy.

Throws:
VelocityNewsException


Copyright © 2006-2007 The Apache Software Foundation. All Rights Reserved.