public class FileReloaderUtils extends AbstractLogEnabled implements Component, Serviceable, Initializable
| Modifier and Type | Class and Description |
|---|---|
private static class |
FileReloaderUtils.FileMetadatas |
| Modifier and Type | Field and Description |
|---|---|
private Map<String,FileReloaderUtils.FileMetadatas> |
_files |
protected SourceResolver |
_resolver
The source resolver
|
static String |
ROLE
The avalon role
|
| Constructor and Description |
|---|
FileReloaderUtils() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize() |
void |
service(ServiceManager manager) |
void |
updateFile(String sourceUrl,
boolean forceRead,
FileReloader fileReloader)
Request to read/update the file
|
void |
updateFile(String sourceUrl,
FileReloader fileReloader)
Request to read/update the file
|
void |
updateFile(String sourceUrl,
Map parameters,
boolean forceRead,
FileReloader fileReloader)
Request to read/update the file
|
void |
updateFile(String sourceUrl,
Map parameters,
FileReloader fileReloader)
Request to read/update the file
|
getLogger, setLoggerprotected SourceResolver _resolver
private Map<String,FileReloaderUtils.FileMetadatas> _files
public FileReloaderUtils()
public void initialize() throws Exception
initialize in interface InitializableExceptionpublic void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void updateFile(String sourceUrl, FileReloader fileReloader) throws Exception
sourceUrl - url of the file to readfileReloader - FileReloader that will be called to get an ID and read the fileException - the source can not be readpublic void updateFile(String sourceUrl, boolean forceRead, FileReloader fileReloader) throws Exception
sourceUrl - url of the file to readforceRead - true to force reload even if the file was not modifiedfileReloader - FileReloader that will be called to get an ID and read the fileException - the source can not be readpublic void updateFile(String sourceUrl, Map parameters, FileReloader fileReloader) throws Exception
sourceUrl - url of the file to readparameters - parameters passed to the resolver to get the file via it's url (can be null)fileReloader - FileReloader that will be called to get an ID and read the fileException - the source can not be readpublic void updateFile(String sourceUrl, Map parameters, boolean forceRead, FileReloader fileReloader) throws Exception
sourceUrl - url of the file to readparameters - parameters passed to the resolver to get the file via it's url (can be null)forceRead - true to force reload even if the file was not modifiedfileReloader - FileReloader that will be called to get an ID and read the fileException - the source can not be read