Added method for ceck if caching is enabled.

cusax-fix
Damian Minkov 20 years ago
parent 47b5a4b0a5
commit ea527f43c3

@ -46,6 +46,8 @@ public class HistoryServiceImpl implements HistoryService {
private DocumentBuilder builder;
private boolean cacheEnabled = false;
public HistoryServiceImpl()
throws Exception
{
@ -230,6 +232,13 @@ public void setConfigurationService(
{
this.configurationService = configurationService;
log.debug("New configuration service registered.");
// store some config for further use
Object isCacheEnabledObj =
this.configurationService.getProperty(HistoryService.CACHE_ENABLED_PROPERTY);
if(isCacheEnabledObj != null && isCacheEnabledObj.equals(HistoryService.CACHE_ENABLED))
cacheEnabled = true;
}
}
@ -282,4 +291,13 @@ public void unsetFileAccessService(FileAccessService fileAccessService)
}
}
/**
* Returns whether caching of readed documents is enabled or desibled.
* @return boolean
*/
protected boolean isCacheEnabled()
{
return cacheEnabled;
}
}

Loading…
Cancel
Save