Package lumis.doui.bigdata
Class DouiBigDataUtil
- java.lang.Object
-
- lumis.doui.bigdata.DouiBigDataUtil
-
public abstract class DouiBigDataUtil extends java.lang.Object
Utility methods for DOUI with portal big data integration.- Since:
- 8.1.0
- Version:
- $Revision: 22602 $ $Date: 2019-03-28 21:02:56 -0300 (Thu, 28 Mar 2019) $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DouiBigDataUtil.DouiBigDataInitObserver
Portal event observer used to initialize big data for doui usage when repository is initialized.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ITEM_IDS_TO_HAVE_POPULARITY_RESET_TRANSACTION_ATTRIBUTE_NAME
Transaction attribute that holds the item ids that will have their popularity reset.static java.lang.String
POPULARITIES_TRANSACTION_ATTRIBUTE_NAME
Transaction attribute that holds the items popularities.
-
Constructor Summary
Constructors Constructor Description DouiBigDataUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
deleteServiceInstanceDocuments(ServiceInstanceConfig serviceInstance)
Deletes the documents stored in a service instance.static void
deleteSourcesBigData(ServiceInstanceConfig serviceInstance)
Deletes the big data for the sources in a service.static java.lang.String
getDocumentTypeFieldId(java.lang.String serviceId, java.lang.String sourceId)
Returns the identifier of the big data document type source field to be used.static java.lang.String
getDocumentTypeFieldId(Source<?> source)
Returns the identifier of the big data document type source field to be used.static java.lang.String
getDocumentTypeId(java.lang.String serviceId, java.lang.String sourceId)
Returns the identifier of the big data document type to be used, by default, for a source.static java.lang.String
getDocumentTypeId(Source<?> source)
Returns the identifier of the big data document type to be used, by default, for a source.static void
initializeBigDataIfNecessary(ServiceInstanceConfig serviceInstance)
Initializes the big data for the sources in a service, if not already initialized.static void
recreateServicesBigDataStructure()
Recreates the big data structure for all services.static void
reindexService(ServiceConfig service)
Re-index a service to big data, re-creating all source big data structure corresponding to the service.static void
reindexServiceInstance(ServiceInstanceConfig serviceInstanceConfig)
Re-index a service instance to big data, deleting current documents and adding the corresponding generated documents.static void
updateSourcesBigData(ServiceConfig serviceConfig)
Updates the sources big data of a service.
-
-
-
Field Detail
-
ITEM_IDS_TO_HAVE_POPULARITY_RESET_TRANSACTION_ATTRIBUTE_NAME
public static final java.lang.String ITEM_IDS_TO_HAVE_POPULARITY_RESET_TRANSACTION_ATTRIBUTE_NAME
Transaction attribute that holds the item ids that will have their popularity reset.- Since:
- 11.1.0
-
POPULARITIES_TRANSACTION_ATTRIBUTE_NAME
public static final java.lang.String POPULARITIES_TRANSACTION_ATTRIBUTE_NAME
Transaction attribute that holds the items popularities.- Since:
- 11.1.0
-
-
Method Detail
-
getDocumentTypeFieldId
public static java.lang.String getDocumentTypeFieldId(Source<?> source)
Returns the identifier of the big data document type source field to be used.- Parameters:
source
- the source.- Returns:
- the identifier.
- Since:
- 8.2.0
-
getDocumentTypeFieldId
public static java.lang.String getDocumentTypeFieldId(java.lang.String serviceId, java.lang.String sourceId)
Returns the identifier of the big data document type source field to be used.- Parameters:
serviceId
- the service id.sourceId
- the source id.- Returns:
- the identifier.
- Since:
- 9.0.0
-
getDocumentTypeId
public static java.lang.String getDocumentTypeId(Source<?> source)
Returns the identifier of the big data document type to be used, by default, for a source.- Parameters:
source
- the source.- Returns:
- the identifier.
- Since:
- 8.1.0
-
getDocumentTypeId
public static java.lang.String getDocumentTypeId(java.lang.String serviceId, java.lang.String sourceId)
Returns the identifier of the big data document type to be used, by default, for a source.- Parameters:
source
- the source.- Returns:
- the identifier.
- Since:
- 8.1.0
-
reindexServiceInstance
public static void reindexServiceInstance(ServiceInstanceConfig serviceInstanceConfig) throws PortalException
Re-index a service instance to big data, deleting current documents and adding the corresponding generated documents.- Parameters:
serviceInstanceConfig
- the service instance.- Throws:
PortalException
- Since:
- 8.1.0
-
initializeBigDataIfNecessary
public static void initializeBigDataIfNecessary(ServiceInstanceConfig serviceInstance)
Initializes the big data for the sources in a service, if not already initialized.- Parameters:
serviceInstance
- the service's service instance to use to create the sources.- Since:
- 8.1.0
-
updateSourcesBigData
public static void updateSourcesBigData(ServiceConfig serviceConfig)
Updates the sources big data of a service.- Parameters:
serviceConfig
- the service.- Since:
- 8.1.0
-
deleteSourcesBigData
public static void deleteSourcesBigData(ServiceInstanceConfig serviceInstance)
Deletes the big data for the sources in a service.- Parameters:
serviceInstance
- the service's service instance to use to create the sources.- Since:
- 8.1.0
-
deleteServiceInstanceDocuments
public static void deleteServiceInstanceDocuments(ServiceInstanceConfig serviceInstance)
Deletes the documents stored in a service instance.- Parameters:
serviceInstance
- the service instance.- Since:
- 8.1.0
-
reindexService
public static void reindexService(ServiceConfig service) throws PortalException
Re-index a service to big data, re-creating all source big data structure corresponding to the service.- Parameters:
service
- the service.- Throws:
PortalException
- Since:
- 8.1.0
-
recreateServicesBigDataStructure
public static void recreateServicesBigDataStructure() throws PortalException
Recreates the big data structure for all services.- Throws:
PortalException
- Since:
- 11.2.0
-
-