T - The type of Entity being generated.public abstract class AbstractDataFeedGenerator<T> extends Object implements DataFeedGenerator<T>
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
LOG |
protected List<DataFeedFieldProcessor> |
processors |
protected List<DataFeedPublisher> |
publishers |
| Constructor and Description |
|---|
AbstractDataFeedGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected DataFeedOutputField |
buildDataFeedGraph(DataFeed dataFeed) |
protected org.apache.commons.beanutils.BasicDynaClass |
buildDynamicClass(DataFeedOutputField graph) |
protected boolean |
checkConditionallyRequired(String rule,
org.apache.commons.beanutils.DynaBean dynamicEntity) |
protected abstract void |
findAndProcessData(DataFeed dataFeed,
DataFeedPublisher publisher)
Finds the data needed for this data feed and processes it by building the
feed format and publishing to the passed in publisher.
|
void |
generate(DataFeed dataFeed)
Primary method used to generate a DataFeed.
|
protected org.apache.commons.beanutils.DynaBean |
getDynamicEntity(Map<T,org.apache.commons.beanutils.DynaBean> feedItems,
T entity,
org.apache.commons.beanutils.BasicDynaClass custom) |
protected DataFeedPublisher |
identifyDataFeedPublisher(DataFeed dataFeed) |
protected org.apache.commons.beanutils.DynaBean |
initializeDynamicClass(org.apache.commons.beanutils.DynaClass custom) |
protected Long |
lookupTestCount(DataFeed dataFeed) |
protected List<Long> |
lookupTestIds(DataFeed dataFeed) |
protected Map<T,String> |
resolveValues(List<T> entities,
DataFeedField dataFeedField) |
protected boolean |
shouldExcludeField(DataFeedField field,
String value,
boolean valueIsValid) |
DataFeedDynamicList |
translateEntityListToDynamicList(DataFeed dataFeed,
List<T> entities)
Required template method for implementations that leverage the AbstractDataFeedGenerator
classes.
|
protected boolean |
validateValue(String value,
DataFeedField dataFeedField,
org.apache.commons.beanutils.DynaBean dynamicEntity) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanGenerateForEntityTypeprotected final org.apache.commons.logging.Log LOG
@Autowired protected List<DataFeedPublisher> publishers
@Autowired protected List<DataFeedFieldProcessor> processors
public void generate(DataFeed dataFeed) throws InvalidItemException, DataFeedException
DataFeedGeneratorgenerate in interface DataFeedGenerator<T>InvalidItemExceptionDataFeedExceptionprotected abstract void findAndProcessData(DataFeed dataFeed, DataFeedPublisher publisher) throws InvalidItemException, DataFeedException
dataFeed - publisher - InvalidItemExceptionDataFeedExceptionpublic DataFeedDynamicList translateEntityListToDynamicList(DataFeed dataFeed, List<T> entities) throws DataFeedException
DataFeedGeneratortranslateEntityListToDynamicList in interface DataFeedGenerator<T>DataFeedExceptionprotected DataFeedPublisher identifyDataFeedPublisher(DataFeed dataFeed) throws DataFeedException
DataFeedExceptionprotected org.apache.commons.beanutils.DynaBean getDynamicEntity(Map<T,org.apache.commons.beanutils.DynaBean> feedItems, T entity, org.apache.commons.beanutils.BasicDynaClass custom) throws InstantiationException, IllegalAccessException
protected boolean validateValue(String value, DataFeedField dataFeedField, org.apache.commons.beanutils.DynaBean dynamicEntity) throws InvalidItemException
InvalidItemExceptionprotected boolean shouldExcludeField(DataFeedField field, String value, boolean valueIsValid)
protected boolean checkConditionallyRequired(String rule, org.apache.commons.beanutils.DynaBean dynamicEntity)
protected org.apache.commons.beanutils.DynaBean initializeDynamicClass(org.apache.commons.beanutils.DynaClass custom)
throws InstantiationException,
IllegalAccessException
protected DataFeedOutputField buildDataFeedGraph(DataFeed dataFeed)
protected org.apache.commons.beanutils.BasicDynaClass buildDynamicClass(DataFeedOutputField graph)
Copyright © 2020. All rights reserved.