public interface EventStorageManager
| Modifier and Type | Method and Description |
|---|---|
EventStorage |
addStorage(Context context,
EventDefinition def)
Add a dedicated event storage for events of a certain type.
|
void |
addStorage(EventStorage storage)
Add a new storage.
|
java.util.List<? extends EventStorage> |
fetchEventStorages()
Returns a list of all event storages available on the server.
|
DataTable |
fetchEventStoragesTable()
Returns a list of all event storages in form of a DataTable.
|
EventStorage |
getDefaultStorage()
Get an event storage used to keep events that are not forwarded to any other custom storage.
|
DaoFactory |
getFactory()
Returns storage manager's DAO factory
|
EventStorage |
getStorage(java.lang.String table)
Returns an event storage descriptor by a specified table name.
|
EventStorage |
getStorage(java.lang.String context,
java.lang.String event)
Get event storage to used to keep certain events.
|
EventStorage |
getStorageByContextAndEvent(java.lang.String context,
java.lang.String event)
Returns an event storage descriptor by a specified context name.
|
java.util.Collection<EventStorage> |
getStorages()
Returns a list of all event storages available on the server.
|
DataTable |
getStoragesAsTable()
Returns a list of all event storages in form of a DataTable.
|
void |
initializeEventStorages(java.util.List<? extends EventStorage> eventStorages,
boolean create)
Perform initialization of all storages.
|
void |
prepareDedicatedStorage(Context context,
EventDefinition def,
boolean create)
Setup a dedicated event storage for specific events.
|
void |
removeStorage(EventStorage storage)
Remove a storage
|
void |
removeStorages(java.lang.String context)
Remove all storages associated with a context.
|
void |
saveEventStorages()
Persistently save information about currently configured event storages
|
void |
saveEventStorages(java.util.Collection<EventStorage> eventStorages)
Persistently save information about specified event storages
|
void |
updateStorages(DataTable oldStoragesTable,
DataTable newStoragesTable,
boolean create)
Update event storages
|
EventStorage addStorage(Context context, EventDefinition def)
context - Context those events should be kept in the storage or null if the storage is valid for all contextsdef - Type of events to keep in the storageEventStorage getStorage(java.lang.String context, java.lang.String event)
context - Path of context to find the storage forevent - Name of event to find the storage forDaoFactory getFactory()
EventStorage getDefaultStorage()
java.util.Collection<EventStorage> getStorages()
DataTable getStoragesAsTable() throws DataTableException
DataTableException - If conversion to a DataTable has failedEventStorage getStorage(java.lang.String table)
table - Name of storage tablevoid addStorage(EventStorage storage)
storage - A storage to addvoid removeStorage(EventStorage storage)
storage - A storage to remove.void removeStorages(java.lang.String context)
throws DaoException,
ContextException
context - The context those storages should be removedDaoException - If a removal has failedContextException - If any other error occurredvoid updateStorages(DataTable oldStoragesTable, DataTable newStoragesTable, boolean create) throws DaoException
oldStoragesTable - Old storages tablenewStoragesTable - New storages tablecreate - True if any newly added storage should be createdDaoException - If updating has failedvoid initializeEventStorages(java.util.List<? extends EventStorage> eventStorages, boolean create) throws DaoException
eventStorages - A list of storages to initializecreate - Defines whether storages should be createdDaoException - If initialization has failedjava.util.List<? extends EventStorage> fetchEventStorages() throws DaoException
DaoExceptionDataTable fetchEventStoragesTable() throws DaoException, ContextException
DataTableException - If conversion to a DataTable has failedDaoExceptionContextExceptionvoid saveEventStorages()
throws DaoException,
ContextException
DaoExceptionContextExceptionvoid saveEventStorages(java.util.Collection<EventStorage> eventStorages) throws DaoException, ContextException
DaoExceptionContextExceptionvoid prepareDedicatedStorage(Context context, EventDefinition def, boolean create) throws DaoException, ContextException
context - Context to configure the storage for or null if the storage should be valid for all contextsdef - Event definitioncreate - Defines whether the storage should be createdDaoException - If storage creation has failedContextException - If any other error occurredEventStorage getStorageByContextAndEvent(@Nonnull java.lang.String context, @Nonnull java.lang.String event)
context - Name of storage contextevent - Name of context event