public class FeedComponent extends SiteComponent
DBObject.DenormalizeAction
Modifier and Type | Field and Description |
---|---|
static GlobalId |
DBCLASS_GID
RSS feed processing component
|
static java.lang.String |
DBCLASS_NAME
RSS feed processing component
|
SNAP2MAP
ATTRIBUTE_MARVIN, dbClass, ds, NO_LOOP_PARAMS
Constructor and Description |
---|
FeedComponent(DBClass def,
DataSource dataSource)
Std.
|
Modifier and Type | Method and Description |
---|---|
protected void |
extAutoEnterCreate()
Extend this method to add functionality when a new DBObject is created.
You may need to create a FldParams, and setIsAutoEntered(true)
so that system does not misunderstand that this object is changed by user. |
protected GlobalKey |
extGetDerivedGlobalKey(DBField field,
FldParams params)
OVERRIDE This method to return a derived global key.
|
protected java.lang.Object |
extGetDerivedValue(DBField field,
FldParams params)
OVERRIDE This method for all objects with derived fields that are NOT linked.
|
protected void |
extPreSaveRecord()
OVERRIDE this method to add functionality to stSoftware BEFORE saving the record to the database.
|
HTMLComponent |
extProcess(WebClient client,
Site site,
HTMLPage page) |
protected ValidationError |
extValidateField(DBField field,
ValidationList list)
Additional validation for particular field OVERRIDE THIS METHOD TO ADD VALIDATIONS FOR A FIELD.
|
SiteFeedParser |
findParser(java.lang.String... args)
RSS Feed Parser.
|
FeedComponent |
findTemplate(java.lang.String... args)
The feed template.
|
java.lang.String |
getCachePeriod(java.lang.String... args) |
java.lang.String |
getHandlebars(java.lang.String... args) |
java.lang.String |
getJsonData(java.lang.String... args) |
java.lang.String |
getPageDescriptionXPath(java.lang.String... args) |
java.lang.String |
getPageDescriptionXPathCalculated(java.lang.String... args) |
java.lang.String |
getPageImgXPath(java.lang.String... args) |
java.lang.String |
getPageImgXPathCalculated(java.lang.String... args) |
java.lang.String |
getPageKeywordsXPath(java.lang.String... args) |
java.lang.String |
getPageKeywordsXPathCalculated(java.lang.String... args) |
java.lang.String |
getPageTitleXPath(java.lang.String... args) |
java.lang.String |
getPageTitleXPathCalculated(java.lang.String... args) |
java.lang.String |
getPageURLXPath(java.lang.String... args) |
java.lang.String |
getPageURLXPathCalculated(java.lang.String... args) |
SiteFeedParser |
getParser(java.lang.String... args) |
FeedComponent |
getTemplate(java.lang.String... args) |
java.lang.String |
getUrl(java.lang.String... args) |
java.lang.String |
getXSLT(java.lang.String... args) |
java.lang.String |
getXsltCalculated(java.lang.String... args) |
static org.w3c.dom.Document |
makeDoc(WebClient client,
java.lang.String url,
java.lang.String timeToLive) |
HTMLTags |
makeTags(WebClient client,
HTMLPage page,
java.lang.String url,
java.lang.String timeToLive) |
HTMLTags |
makeTags(WebClient client,
HTMLPage page,
java.lang.String url,
java.lang.String timeToLive,
ArticleComponent article) |
static java.lang.String |
parseURL(java.lang.String url,
WebClient client)
find ${XXXX} and replace with real value from client
|
FeedComponent |
setCachePeriod(java.lang.String value,
java.lang.String... args) |
FeedComponent |
setHandlebars(java.lang.String value,
java.lang.String... args) |
FeedComponent |
setPageDescriptionXPath(java.lang.String value,
java.lang.String... args) |
FeedComponent |
setPageImgXPath(java.lang.String value,
java.lang.String... args) |
FeedComponent |
setPageKeywordsXPath(java.lang.String value,
java.lang.String... args) |
FeedComponent |
setPageTitleXPath(java.lang.String value,
java.lang.String... args) |
FeedComponent |
setPageURLXPath(java.lang.String value,
java.lang.String... args) |
FeedComponent |
setParser(com.aspc.dal.cms.SiteFeedParser value,
java.lang.String... args) |
FeedComponent |
setTemplate(com.aspc.dal.cms.component.FeedComponent value,
java.lang.String... args) |
FeedComponent |
setUrl(java.lang.String value,
java.lang.String... args) |
FeedComponent |
setXSLT(java.lang.String value,
java.lang.String... args) |
java.lang.String |
toString()
The description.
|
addEdit, addEdit, canHandleNoneType, changeLinks, editHTML, extCopy, extPreDeleteRecord, extPreValidate, extPreValidateDelete, extValidateDelete, extValidateRecord, findContainer, findIcon, findKey, findOwnedBySite, findVisibilityDesktop, findVisibilityMobile, findVisibilityTablet, getAccessibilityWarningCount, getAccessibilityWarningResult, getComponentPath, getContainer, getCreatedTS, getDefaultEncoding, getDerivedStyleClass, getDescendant, getDisplayPath, getDisplayTitle, getDisplayType, getDisplayXPath, getHandlebarsData, getHandlebarsHelpers, getIcon, getIconPath, getKey, getName, getOwnedBySite, getPage, getResult, getSequence, getSnap2Id, getStyleClass, getStyleClassVariable, getTargetWindow, getVisibilityDesktop, getVisibilityMobile, getVisibilityTablet, hasAttributes, isFinalFg, isLocked, isRelevantComponent, makeClone, makeDIV, makeQuery, makeSane, parseText, process, setAccessibilityWarningCount, setAccessibilityWarningResult, setContainer, setCreatedTS, setFinalFg, setHasAttributes, setId, setKey, setName, setSequence, setSnap2Id, setStyleClass, setStyleClassVariable, setVisibilityDesktop, setVisibilityMobile, setVisibilityTablet, shouldShow
addReloadEventListener, archiveCheck, autoEnterCreate, calculateValue, calculateValue, calculateValue, callingRestoreByJournal, changeThreadMode, checkCreateAccess, checkDelete, checkDeleteAccess, checkModifyAccess, checkModifyAccess, checkReadAccess, clearCache, copy, copyFields, copyIncludeField, copyInwardLinks, delete, denormalizedResult, displayLogName, displayName, displayValue, doSearch, dump, equals, eventDataLoaded, eventFieldUpdated, extCanDeleteDependantObject, extCheckCreateAccess, extCheckDeleteAccess, extCheckModifyAccess, extCheckModifyAccess, extCheckReadAccess, extDelete, extDeleteRecord, extFixUp, extGetValue, extIsMandatory, extIsOnChange, extMarkSavePoint, extPostDeleteRecord, extPostSaveRecord, extRaiseEvents, extRollbackTo, extSaveRecord, extSetValue, extUndelete, fetchLinkHolder, findGlobalKey, findGlobalKey, findGlobalKey, findGlobalKey, findLinkedObject, findLinkedObject, findLinkedObject, findRawData, fireEventDataLoaded, fixUp, forceLockedTransaction, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getChangedFieldInfo, getChangedFields, getDate, getDate, getDate, getDate, getDate, getDefaultValue, getDisableOnChangeEvent, getDouble, getDouble, getDouble, getDouble, getDouble, getFieldDouble, getFieldInt, getFieldLong, getFieldString, getFormattedString, getFormattedString, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getInt, getInt, getInt, getInt, getInt, getInt, getInwardLinkage, getKeyString, getKeyValue, getLinkedObject, getLinkedObject, getLinkedObject, getLinkedObjectByKey, getLinkedRowId, getLinkedRowId, getLinkedRowIdByData, getLinkHolder, getLockedTransaction, getLong, getLong, getLong, getLong, getLong, getLong, getMutableArrayValue, getMutableArrayValue, getOriginalKey, getOriginalValue, getOriginalValue, getProcessedValue, getPureValue, getRawData, getRawValue, getRawValue, getRowId, getRowKey, getSecondaryCacheGroupKey, getSrcLayerID, getString, getString, getString, getString, getString, getString, getValue, getValue, getValue, getValue, hasAutoChanged, hasAutoChanged, hasChanged, hasChangedByUser, hasChangedByUserField, hasChangedByUserField, hasFieldChanged, hasFieldChanged, hashCode, hasStoredResult, iCheckDeleteAccess, iCheckModifyAccess, iCheckReadAccess, iGetDenormalizedMap, iGetRawValue, iPlaceDenormalizedResult, iPostSaveOrDeleteRecord, iPreSaveOrDeleteRecord, iPreValidate, iRaiseEvents, iSaveOrDeleteRecord, isBrokenLink, isBrokenLink, isChanged, isDataCacheKnownToBeDirty, isDeleted, isEmpty, iSetValue, isForceReindex, isKeyWordField, isMandatory, isNew, isNull, isNull, isOnChange, isReindex, iValidateRecord, lastTouched, makeArchiveDataLoader, makeClone, makeDataLoader, makeDenormalizedDoc, makeLinkedArray, makeModifyAccessException, makeSearchPlan, makeWriteProvider, manualDenormalizeOnSave, markSavePoint, optLockedTransaction, registerWatchedObject, reindex, releaseDenormalized, removeReloadEventListener, restoreByJournal, rollbackTo, setBoolean, setBoolean, setBoolean, setBoolean, setDisableOnChangeEvent, setDouble, setDouble, setInt, setInt, setLong, setLong, setRawData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, touch, undelete, validateField, validateRecord, validateSubType
public static final java.lang.String DBCLASS_NAME
public static final GlobalId DBCLASS_GID
public FeedComponent(DBClass def, DataSource dataSource) throws java.lang.Exception
def
- The class of this objectdataSource
- The datasource for this objectjava.lang.Exception
- A serious problem occurred@CheckReturnValue @Nonnull public java.lang.String getXSLT(java.lang.String... args)
@Nonnull public FeedComponent setXSLT(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getXsltCalculated(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getCachePeriod(java.lang.String... args)
@Nonnull public FeedComponent setCachePeriod(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getHandlebars(java.lang.String... args)
@Nonnull public FeedComponent setHandlebars(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getJsonData(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getPageDescriptionXPath(java.lang.String... args)
@Nonnull public FeedComponent setPageDescriptionXPath(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getPageDescriptionXPathCalculated(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getPageImgXPath(java.lang.String... args)
@Nonnull public FeedComponent setPageImgXPath(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getPageImgXPathCalculated(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getPageKeywordsXPath(java.lang.String... args)
@Nonnull public FeedComponent setPageKeywordsXPath(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getPageKeywordsXPathCalculated(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getPageTitleXPath(java.lang.String... args)
@Nonnull public FeedComponent setPageTitleXPath(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getPageTitleXPathCalculated(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getPageURLXPath(java.lang.String... args)
@Nonnull public FeedComponent setPageURLXPath(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getPageURLXPathCalculated(java.lang.String... args)
@CheckReturnValue @Nullable public SiteFeedParser getParser(java.lang.String... args)
@CheckReturnValue @Nonnull public final SiteFeedParser findParser(java.lang.String... args) throws NotFoundException
SiteFeedParser
(String,
Searchable)args
- the optional argumentsNotFoundException
- SiteFeedParser was not found@Nonnull public FeedComponent setParser(com.aspc.dal.cms.SiteFeedParser value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public FeedComponent getTemplate(java.lang.String... args)
@CheckReturnValue @Nonnull public final FeedComponent findTemplate(java.lang.String... args) throws NotFoundException
FeedComponent
(Integer, Searchable)args
- the optional argumentsNotFoundException
- FeedComponent was not found@Nonnull public FeedComponent setTemplate(com.aspc.dal.cms.component.FeedComponent value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getUrl(java.lang.String... args)
@Nonnull public FeedComponent setUrl(@MatchesPattern(value="(/ReST/v2/article)|(/ReST/v2/article\\?|http://|https://).*|(/feed)|(/feed\\?|http://|https://).*") java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@OverridingMethodsMustInvokeSuper protected void extPreSaveRecord() throws java.lang.Exception
DBObject
extPreSaveRecord
in class SiteComponent
java.lang.Exception
- A Serious problem@OverridingMethodsMustInvokeSuper protected void extAutoEnterCreate() throws java.lang.Exception
DBObject
setIsAutoEntered(true)
so that system does not misunderstand that this object is changed by user.extAutoEnterCreate
in class DBObject
java.lang.Exception
- A serious problem@CheckReturnValue @Nullable protected GlobalKey extGetDerivedGlobalKey(@Nonnull DBField field, @Nullable FldParams params) throws java.lang.Exception
DBObject
extGetDerivedGlobalKey
in class SiteComponent
field
- The field that is being changedparams
- The extra parametersjava.lang.Exception
- A serious problem. In general validation is done later.@CheckReturnValue protected java.lang.Object extGetDerivedValue(@Nonnull DBField field, @Nullable FldParams params) throws java.lang.Exception
DBObject
extGetDerivedValue
in class SiteComponent
field
- The field to getparams
- The parameters for this field eg. language= or default=java.lang.Exception
- a serious problempublic static org.w3c.dom.Document makeDoc(WebClient client, @Nonnull java.lang.String url, java.lang.String timeToLive) throws java.lang.Exception
java.lang.Exception
public HTMLTags makeTags(WebClient client, HTMLPage page, java.lang.String url, java.lang.String timeToLive) throws java.lang.Exception
java.lang.Exception
public HTMLTags makeTags(WebClient client, HTMLPage page, java.lang.String url, java.lang.String timeToLive, ArticleComponent article) throws java.lang.Exception
java.lang.Exception
public HTMLComponent extProcess(WebClient client, Site site, HTMLPage page) throws java.lang.Exception
extProcess
in class SiteComponent
java.lang.Exception
@CheckReturnValue @OverridingMethodsMustInvokeSuper @Nullable protected ValidationError extValidateField(@Nonnull DBField field, @Nonnull ValidationList list) throws java.lang.Exception
DBObject
extValidateField
in class SiteComponent
field
- The field to be validatedlist
- The validation listjava.lang.Exception
- a serious error@CheckReturnValue @Nonnull public java.lang.String toString()
DBObject
public static java.lang.String parseURL(java.lang.String url, WebClient client)
url
- client
- the client to usestSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.