Class FileSystemStorage
- java.lang.Object
 - 
- com.jalios.jcms.analytics.storage.AbstractStorageHandler
 - 
- com.jalios.jcms.analytics.storage.impl.FileSystemStorage
 
 
 
- 
public class FileSystemStorage extends AbstractStorageHandler
 
- 
- 
Constructor Summary
Constructors Constructor Description FileSystemStorage() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractEventDataProvidergetEventDataProvider(StatisticContext context)Build anAbstractEventDataProviderto provide data for analysisjava.io.FilegetEventDirectory()Retrieve event data directoryjava.time.InstantgetOlderAnalyticsDataDate()Retrieve the older date from the analytics filevoidinit(java.lang.String propertyPrefix, JProperties subProperties)Create aEventDatastorage (in a directory of the current file system)booleanisAnalysisProvider()indicate if theAbstractStorageHandleris the eventData provider for analysis or not.voidwriteEvent(EventData data)Write anEventDatain the file- 
Methods inherited from class com.jalios.jcms.analytics.storage.AbstractStorageHandler
getName, isEnabled, setEnabled, setName 
 - 
 
 - 
 
- 
- 
Method Detail
- 
init
public void init(java.lang.String propertyPrefix, JProperties subProperties)Create aEventDatastorage (in a directory of the current file system)- Specified by:
 initin classAbstractStorageHandler- Parameters:
 propertyPrefix- used to configure the handlersubProperties- theMapwith the handler's properties
 
- 
writeEvent
public void writeEvent(EventData data) throws StorageException
Write anEventDatain the file- Specified by:
 writeEventin classAbstractStorageHandler- Parameters:
 data- theEventData- Throws:
 StorageException- Exception thrown when eventData is save as JSON data
 
- 
getOlderAnalyticsDataDate
public java.time.Instant getOlderAnalyticsDataDate()
Retrieve the older date from the analytics file- Specified by:
 getOlderAnalyticsDataDatein classAbstractStorageHandler- Returns:
 - the older date if any, Long.MAX_VALUE otherwise
 
 
- 
isAnalysisProvider
public boolean isAnalysisProvider()
Description copied from class:AbstractStorageHandlerindicate if theAbstractStorageHandleris the eventData provider for analysis or not. Note only oneAbstractStorageHandlershould be enabled for analysis at runtime- Specified by:
 isAnalysisProviderin classAbstractStorageHandler- Returns:
 - true if the 
AbstractStorageHandleris enabled for provided analysis data, false otherwise 
 
- 
getEventDataProvider
public AbstractEventDataProvider getEventDataProvider(StatisticContext context) throws StorageException
Description copied from class:AbstractStorageHandlerBuild anAbstractEventDataProviderto provide data for analysis- Specified by:
 getEventDataProviderin classAbstractStorageHandler- Parameters:
 context- theStatisticContextused to create theEventDataprovider- Returns:
 - the 
AbstractEventDataProvider - Throws:
 StorageException- if theEventDatacannot be created
 
- 
getEventDirectory
public java.io.File getEventDirectory()
Retrieve event data directory- Returns:
 - the File
 
 
 - 
 
 -