public class NoteTemplateVelocityResourceLoader extends org.apache.velocity.runtime.resource.loader.ResourceLoader implements EventListener<LocalizationChangedEvent>
NoteTemplateService
Modifier and Type | Field and Description |
---|---|
static char |
RESOURCE_NAME_PARTS_SEPARATOR
Character that separates the parts templateId, locale and renderMode in the resource name.
|
static String |
RESOURCE_NAME_PREFIX
Prefix a resource name needs to have to be recognized as a resource that can be loaded by
this class.
|
Constructor and Description |
---|
NoteTemplateVelocityResourceLoader() |
Modifier and Type | Method and Description |
---|---|
long |
getLastModified(org.apache.velocity.runtime.resource.Resource resource) |
Class<LocalizationChangedEvent> |
getObservedEvent()
Defines the types of events about which this listener will be informed.
|
InputStream |
getResourceStream(String resourceName) |
void |
handle(LocalizationChangedEvent event)
Is called by the
EventDispatcher when the observed event was fired. |
void |
init(org.apache.commons.collections.ExtendedProperties configuration) |
boolean |
isSourceModified(org.apache.velocity.runtime.resource.Resource resource) |
public static final String RESOURCE_NAME_PREFIX
public static final char RESOURCE_NAME_PARTS_SEPARATOR
public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
getLastModified
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
public Class<LocalizationChangedEvent> getObservedEvent()
EventListener
getObservedEvent
in interface EventListener<LocalizationChangedEvent>
public InputStream getResourceStream(String resourceName) throws org.apache.velocity.exception.ResourceNotFoundException
getResourceStream
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
org.apache.velocity.exception.ResourceNotFoundException
public void handle(LocalizationChangedEvent event)
EventListener
EventDispatcher
when the observed event was fired.handle
in interface EventListener<LocalizationChangedEvent>
event
- the event that was firedpublic void init(org.apache.commons.collections.ExtendedProperties configuration)
init
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
isSourceModified
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
Copyright © 2019 Communote team. All rights reserved.