Class EventFieldSource
- java.lang.Object
-
- java.util.Observable
-
- lumis.doui.source.Source<F>
-
- lumis.doui.source.TabularSource<ITableSourceField>
-
- lumis.doui.table.TableSource
-
- lumis.service.analytics.eventsadmin.EventFieldSource
-
- All Implemented Interfaces:
Comparator<ISourceData>
public class EventFieldSource extends TableSource
Event field source, used in the customer experience event administration. Limits access to the fields that belongs to its service instance. UsesMonitorField
entity when making modifications.- Since:
- 14.0.0
- Version:
- $Revision: 24476 $ $Date: 2021-04-28 11:28:23 -0300 (Wed, 28 Apr 2021) $
-
-
Field Summary
-
Fields inherited from class lumis.doui.source.TabularSource
positionSourceField, primaryKeySourceField, searchableSourceFields, tabularData
-
Fields inherited from class lumis.doui.source.Source
addInterfaceId, administrationInterfaceId, connectionId, detailsInterfaceId, editInterfaceId, fields, fieldsMap, id, introductionSourceField, keywordsSourceField, load, metaDataSourceId, parameters, primaryNameSourceField, readData, SOURCE_READ_DATA_ALWAYS, SOURCE_READ_DATA_NEVER, SOURCE_READ_DATA_ON_DEMAND, sourceContext, sourceDefinitionNode
-
-
Constructor Summary
Constructors Constructor Description EventFieldSource(Node sourceDefinitionNode, ISourceContext sourceContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
checkIfCanBeRemoved(MonitorField entity)
Checks if the given entity can be removed.protected ISourceAddDataResult
doAddData(IParameters data)
Adds the data to the persistence.protected void
doDeleteDataByItemIds(Collection<String> itemIds)
Deletes the data in the persistence.protected ISourceUpdateDataResult
doUpdateData(IParameters data)
Updates the data in the persistence.IDataProvider<TableSource>
getDataProvider()
Returns the data provider for this source.protected boolean
isUpdatable(ITableSourceField field)
Returns if the field is updatable and given parameters are to be used to set its value inupdateEntity(IMonitorElementSPI, IParameters)
default implementation.protected MonitorField
newEntity(String id, IParameters data)
Returns a new entity calling its constructor with arguments based on the given parameters.TabularData
readData(String[] primaryKeyValues, ITransaction transaction)
Deprecated.ISourceData
readData(String primaryKeyValue, ITransaction transaction)
Deprecated.List<ISourceData>
readData(Collection<String> itemIds)
Returns the data corresponding to the givenitemIds
.protected void
throwLocalizableException(String message, String... args)
Throws a portal exception with the given message and the adequate string resource.protected void
updateEntity(MonitorField entity, IParameters parameters)
Updates an entity with the values set in the given parameters.-
Methods inherited from class lumis.doui.table.TableSource
createDefaultCompositeFilterInstance, createDefaultFilterInstance, createQueryBuilder, createSourceField, createSourceFilter, deleteRelatedData, getDefaultBigDataPersister, getDefaultProviderClass, getFilter, getTableName
-
Methods inherited from class lumis.doui.source.TabularSource
applyPostLoadFilters, applyPostLoadPagination, compare, compareField, convertDataToDefinedDataTypes, convertDataToDefinedDataTypes, evaluateMaxRows, getData, getDefaultSourceSearchContentFillerClassName, getDouiHyperlinkItemParameterField, getFieldClass, getFieldId, getFieldIds, getFieldName, getFieldsDefinitionNode, getHyperlinkDefaultParameters, getIndexerEngineId, getIndexerId, getMaxRows, getPositionField, getPrimaryKeyField, getReindexerTabularDataProcessorClassName, getSearchableFields, getSearcherEngineId, getSearcherId, getSortedFieldIds, getSourceSearchContentFillerClassName, getStartAt, hasField, isSearchEnabled, readFieldsIntoFieldsMap, setData, setMaxRows, setStartAt
-
Methods inherited from class lumis.doui.source.Source
addData, createCustomSourceField, createRenderDataChangedEvent, deleteDataByItemIds, deleteDataByItemIds, getAddInterfaceId, getAdministrationInterfaceId, getBigDataPersister, getDefinitionNode, getDetailsInterfaceId, getDistinct, getDouiContext, getEditInterfaceId, getField, getFields, getFiltersNode, getId, getIntroductionField, getIntroductionImageField, getKeywordsField, getLoad, getMetaDataSourceId, getParameterClass, getParameterValue, getPrimaryNameField, getPublishStartDateField, getReadData, getSourceContainer, getSourceContext, getTransaction, getUpdateDataItemId, isAdministrationInterface, isDetails, isRenderDataChangedNotificationEnabled, load, postAddFieldData, postDeleteFieldData, postProcessSource, postUpdateFieldData, preAddFieldData, preDeleteFieldData, preUpdateFieldData, readData, scheduleIndexData, scheduleIndexData, sendPostAddDataNotification, sendPostDeleteDataNotification, sendPostUpdateDataNotification, sendPreAddDataNotification, sendPreDeleteDataNotification, sendPreUpdateDataNotification, sendRenderDataChangedNotification, sendRenderDataChangedNotification, setLoad, setParameterValue, setParameterValue, setReadData, setRenderDataChangedNotificationEnabled, updateData, valueChanged
-
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Constructor Detail
-
EventFieldSource
public EventFieldSource(Node sourceDefinitionNode, ISourceContext sourceContext) throws PortalException
- Throws:
PortalException
-
-
Method Detail
-
newEntity
protected MonitorField newEntity(String id, IParameters data) throws PortalException
Returns a new entity calling its constructor with arguments based on the given parameters.- Parameters:
id
- the identifier.data
- the parameters given to the add operation.- Returns:
- the new entity.
- Throws:
PortalException
-
isUpdatable
protected boolean isUpdatable(ITableSourceField field)
Returns if the field is updatable and given parameters are to be used to set its value inupdateEntity(IMonitorElementSPI, IParameters)
default implementation.- Parameters:
field
- the field.- Returns:
true
if it is updatable,false
otherwise.
-
updateEntity
protected void updateEntity(MonitorField entity, IParameters parameters) throws PortalException
Updates an entity with the values set in the given parameters. Only updates entity properties for fields that are updatable.- Parameters:
entity
- the entity.parameters
- the parameters.- Throws:
PortalException
-
checkIfCanBeRemoved
protected void checkIfCanBeRemoved(MonitorField entity) throws PortalException
Checks if the given entity can be removed.- Parameters:
entity
- the entity- Throws:
PortalException
-
getDataProvider
public IDataProvider<TableSource> getDataProvider() throws PortalException
Description copied from class:Source
Returns the data provider for this source.- Overrides:
getDataProvider
in classSource<ITableSourceField>
- Returns:
- Throws:
PortalException
-
readData
@Deprecated public ISourceData readData(String primaryKeyValue, ITransaction transaction) throws PortalException
Deprecated.Description copied from class:TableSource
Reads the data with the given primary key value, and returns it.- Overrides:
readData
in classTableSource
- Parameters:
primaryKeyValue
- the primary key value of the desired data.transaction
- the transaction for persistence access.- Returns:
- the data with the given primary key value.
- Throws:
PortalException
-
readData
@Deprecated public TabularData readData(String[] primaryKeyValues, ITransaction transaction) throws PortalException
Deprecated.Description copied from class:TableSource
Reads the data with the given primary key values, and returns it.- Overrides:
readData
in classTableSource
- Parameters:
primaryKeyValues
- the primary key values of the desired data.transaction
- the transaction for persistence access.- Returns:
- the data with the given primary key values.
- Throws:
PortalException
-
readData
public List<ISourceData> readData(Collection<String> itemIds) throws PortalException
Description copied from class:Source
Returns the data corresponding to the givenitemIds
.The implementation of this method in
Source
throws anUnsupportedOperationException
. This method should be overridden by source implementations that provides this functionality.- Overrides:
readData
in classTableSource
- Parameters:
itemIds
- the item identifiers of the data to be returned.- Returns:
- a list of
ISourceData
objects that corresponds to the givenitemIds
. If no data is found, an empty list is returned. - Throws:
PortalException
-
doAddData
protected ISourceAddDataResult doAddData(IParameters data) throws PortalException
Description copied from class:Source
Adds the data to the persistence.This method is called by
Source.addData(Object)
and is to be overridden by sources that supports add operation and uses the defaultaddData
implementation.The implementation of this method in
Source
throwsUnsupportedOperationException
.- Overrides:
doAddData
in classTableSource
- Parameters:
data
- the data given toSource.addData(Object)
, converted toIParameters
if necessary.- Returns:
- the result object to be returned by
Source.addData(Object)
. - Throws:
PortalException
-
doUpdateData
protected ISourceUpdateDataResult doUpdateData(IParameters data) throws PortalException
Description copied from class:Source
Updates the data in the persistence.This method is called by
Source.updateData(Object)
and is to be overridden by sources that supports update operation and uses the default updateData implementation.The implementation of this method in
Source
throwsUnsupportedOperationException
.- Overrides:
doUpdateData
in classTableSource
- Parameters:
data
- the data given toSource.updateData(Object)
, converted toIParameters
if necessary.- Returns:
- the result object to be returned by
Source.updateData(Object)
. - Throws:
PortalException
-
doDeleteDataByItemIds
protected void doDeleteDataByItemIds(Collection<String> itemIds) throws PortalException
Description copied from class:Source
Deletes the data in the persistence.This method is called by
Source.deleteDataByItemIds(Collection)
and is to be overridden by sources that supports delete operation and uses the default deleteData implementation.The implementation of this method in
Source
throwsUnsupportedOperationException
.- Overrides:
doDeleteDataByItemIds
in classTableSource
- Parameters:
itemIds
- the item identifiers of data to be deleted.- Throws:
PortalException
-
throwLocalizableException
protected void throwLocalizableException(String message, String... args) throws PortalException
Throws a portal exception with the given message and the adequate string resource.- Parameters:
message
- the messageargs
- the arguments for the string- Throws:
PortalException
- Since:
- 14.0.0
-
-