|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.peaseplate.internal.service.DefaultResolverService
public class DefaultResolverService
The default implementation of the ResolverService
.
Constructor Summary | |
---|---|
DefaultResolverService()
|
Method Summary | |
---|---|
void |
add(java.lang.Class<? extends Resolver> resolverClass)
Adds the resolver to the service. |
void |
add(java.lang.ClassLoader... classLoaders)
Scans the specified class loaders for resolver service definitions. |
void |
add(Resolver resolver)
Add the sepcified resolver to the service. |
MessagesLocator |
getMessages(TemplateEngine engine,
ResourceKey key)
Asks all resolvers for a messages object described by the specified key and returns a locator for the messages if found. |
TemplateLocator |
getTemplate(TemplateEngine engine,
ResourceKey key)
Asks all resolvers for a template described by the specified key and returns a locator for the template if found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultResolverService()
Method Detail |
---|
public void add(java.lang.ClassLoader... classLoaders) throws java.lang.IllegalArgumentException
ResolverService
Resolver
s, one class name per line.
add
in interface ResolverService
classLoaders
- the class loaders
java.lang.IllegalArgumentException
- if a class could not be instantiatedResolverService.add(java.lang.ClassLoader[])
public void add(java.lang.Class<? extends Resolver> resolverClass) throws java.lang.IllegalArgumentException
ResolverService
add
in interface ResolverService
java.lang.IllegalArgumentException
- if the instance could not be createdResolverService.add(java.lang.Class)
public void add(Resolver resolver)
ResolverService
add
in interface ResolverService
resolver
- a resolverResolverService.add(org.peaseplate.resolver.Resolver)
public TemplateLocator getTemplate(TemplateEngine engine, ResourceKey key) throws TemplateException
ResolverService
getTemplate
in interface ResolverService
engine
- the enginekey
- the key
TemplateLocator
or null if the template was not found
TemplateException
- on any errorResolverService.getTemplate(org.peaseplate.TemplateEngine, org.peaseplate.internal.ResourceKey)
public MessagesLocator getMessages(TemplateEngine engine, ResourceKey key) throws TemplateException
ResolverService
getMessages
in interface ResolverService
engine
- the enginekey
- the key
MessagesLocator
or null if the messages were not found
TemplateException
- on any errorResolverService.getMessages(org.peaseplate.TemplateEngine, org.peaseplate.internal.ResourceKey)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |