Interface ISourceBigDataPersister<S extends Source<?>>
-
- Type Parameters:
S
- the source class expected by the persister. A persister class is only compatible with source classes that are equal to or extend S.
- All Known Subinterfaces:
IContentTableSourceBigDataPersister
- All Known Implementing Classes:
AnnouncementBigDataPersister
,ContentTableSourceBigDataPersister
,DocumentBigDataPersister
,DummyContentTableSourceBigDataPersister
,DummySourceBigDataPersister
,HierarchicalContentBigDataPersister
,LinkBigDataPersister
,MediaBigDataPersister
,MessageBigDataPersister
,TabularSourceBigDataPersister
,UserPostBigDataPersister
@StableMinor(version="17.0", sinceVersion="10.0") public interface ISourceBigDataPersister<S extends Source<?>>
This interface specifies the methods that must be implemented when customizing how a source's data is stored in theportal big data repository
.The usual implementation of this interface is to create
document types
ininitBigData(S)
, update document types inupdateBigData(S)
, add and deletedocuments
inaddDocuments(S, lumis.doui.source.ISourceData...)
anddeleteDocuments(S, java.lang.String...)
, and delete the document types (and, in cascade its documents) indeleteBigData(Source)
.- Since:
- 8.1.0
- Version:
- $Revision$ $Date$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addContextDocuments(java.lang.String sourceId, java.lang.String contextId)
Adds alldocuments
corresponding to the given source and context to the portal big data repository.void
addDocuments(S source, java.util.Collection<? extends ISourceData> data)
Addsdocuments
to the portal big data repository for the given source data entries.void
addDocuments(S source, ISourceData... data)
Addsdocuments
to the portal big data repository for the given source data entries.void
deleteBigData(S source)
Deletes all structure stored in the portal big data repository relative to a source.void
deleteContextDocuments(java.lang.String sourceId, java.lang.String contextId)
Deletesdocuments
from the portal big data repository for the specified source in a context.void
deleteDocuments(S source, java.lang.String... itemIds)
Deletesdocuments
from the portal big data repository that corresponds to the data with the given primary key values.void
deleteDocuments(S source, java.util.Collection<java.lang.String> itemIds)
Deletesdocuments
from the portal big data repository that corresponds to the data with the given primary key values.void
initBigData(S source)
Initializes the big data repository with elements specifics to a source.void
updateBigData(S source)
Updates the big data repository according to a source.
-
-
-
Method Detail
-
initBigData
void initBigData(S source)
Initializes the big data repository with elements specifics to a source.This method is called at some moment between the service registration and its use, or when the source big data will be recreated (after
deleteBigData(S)
is called to delete anything related to the source).This method will usually create the
document types
thataddDocuments(S, lumis.doui.source.ISourceData...)
for the source will use.- Parameters:
source
- the source.- Since:
- 8.1.0
-
updateBigData
void updateBigData(S source)
Updates the big data repository according to a source.This method is called at some moment between the service registration and its use.
This method will usually update the
document types
for the source.- Parameters:
source
- the source.- Since:
- 8.1.0
-
deleteBigData
void deleteBigData(S source)
Deletes all structure stored in the portal big data repository relative to a source.This method is called when a source will cease to exist or when recreating the big data for a source.
This method must delete elements created by
initBigData(S)
and documents added byaddDocuments(S, lumis.doui.source.ISourceData...)
.This method will usually delete the
document types
created ininitBigData(S)
and used byaddDocuments(S, lumis.doui.source.ISourceData...)
, which will remove related documents in cascade.- Parameters:
source
- the source.- Since:
- 8.1.0
-
addContextDocuments
void addContextDocuments(java.lang.String sourceId, java.lang.String contextId)
Adds alldocuments
corresponding to the given source and context to the portal big data repository.This method is usually called when re-indexing a source after its documents have been deleted.
- Parameters:
sourceId
- the source identifier.contextId
- the context identifier. Usually a service or service instance identifier.- Since:
- 10.0.0
-
deleteContextDocuments
void deleteContextDocuments(java.lang.String sourceId, java.lang.String contextId)
Deletesdocuments
from the portal big data repository for the specified source in a context.- Parameters:
sourceId
- the source identifier.contextId
- the context identifier.- Since:
- 10.0.0
-
addDocuments
void addDocuments(S source, ISourceData... data)
Addsdocuments
to the portal big data repository for the given source data entries.- Parameters:
source
- the source.data
- the source's data to be used to generate the documents.- Since:
- 8.1.0
-
addDocuments
void addDocuments(S source, java.util.Collection<? extends ISourceData> data)
Addsdocuments
to the portal big data repository for the given source data entries.- Parameters:
source
- the source.data
- the source's data to be used to generate the documents.- Since:
- 8.1.0
-
deleteDocuments
void deleteDocuments(S source, java.lang.String... itemIds)
Deletesdocuments
from the portal big data repository that corresponds to the data with the given primary key values.- Parameters:
source
- the source.itemIds
- the source data primary key values.- Since:
- 8.1.0
-
deleteDocuments
void deleteDocuments(S source, java.util.Collection<java.lang.String> itemIds)
Deletesdocuments
from the portal big data repository that corresponds to the data with the given primary key values.- Parameters:
source
- the source.itemIds
- the source data primary key values.- Since:
- 8.1.0
-
-