|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResolverService
The resolver service is used to resolve templates and messages
from somewhere by the specified key that contains the name and the locale.
The resolver service can be enhanced by adding Resolver
s to it.
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. |
Method Detail |
---|
void add(java.lang.ClassLoader... classLoaders) throws java.lang.IllegalArgumentException
Resolver
s, one class name per line.
classLoaders
- the class loaders
java.lang.IllegalArgumentException
- if a class could not be instantiatedvoid add(java.lang.Class<? extends Resolver> resolverClass) throws java.lang.IllegalArgumentException
resolverClass
-
java.lang.IllegalArgumentException
- if the instance could not be createdvoid add(Resolver resolver)
resolver
- a resolverTemplateLocator getTemplate(TemplateEngine engine, ResourceKey key) throws TemplateException
engine
- the enginekey
- the key
TemplateLocator
or null if the template was not found
TemplateException
- on any errorMessagesLocator getMessages(TemplateEngine engine, ResourceKey key) throws TemplateException
engine
- the enginekey
- the key
MessagesLocator
or null if the messages were not found
TemplateException
- on any error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |