public abstract class SiteComponent extends DBObject
DBObject.DenormalizeAction
Modifier and Type | Field and Description |
---|---|
static GlobalId |
DBCLASS_GID
A component for the site
|
static java.lang.String |
DBCLASS_NAME
A component for the site
|
static java.lang.String |
SNAP2MAP |
ATTRIBUTE_MARVIN, dbClass, ds, NO_LOOP_PARAMS
Constructor and Description |
---|
SiteComponent(DBClass def,
DataSource dataSource)
Std.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addEdit(WebClient client,
HTMLPage page,
HTMLComponent div,
DBObject target,
java.lang.String componentId) |
protected void |
addEdit(WebClient client,
HTMLPage page,
HTMLDiv div,
DBObject target) |
protected boolean |
canHandleNoneType(java.lang.String html)
can we handle the none type content
|
void |
changeLinks(java.lang.String aFrom,
java.lang.String aTo) |
static java.lang.String |
editHTML(WebClient client,
java.lang.String rawHTML) |
protected void |
extCopy(DBObject target)
Additional functionality when an object is copied.
|
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 |
extPreDeleteRecord()
OVERRIDE this method to add functionality to stSoftware BEFORE deleting a record from the database.
|
protected void |
extPreSaveRecord()
OVERRIDE this method to add functionality to stSoftware BEFORE saving the record to the database.
|
protected void |
extPreValidate()
OVERRIDE To add functionality to before validation is called.
|
protected void |
extPreValidateDelete()
OVERRIDE To add functionality to before validation is called.
|
abstract HTMLComponent |
extProcess(WebClient client,
Site site,
HTMLPage page) |
protected void |
extValidateDelete(ValidationList list)
Extend this method to add validation to a record then deleted.
|
protected ValidationError |
extValidateField(DBField field,
ValidationList list)
Additional validation for particular field OVERRIDE THIS METHOD TO ADD VALIDATIONS FOR A FIELD.
|
protected void |
extValidateRecord(ValidationList list)
Performs additional validations on this record.
|
SiteContainer |
findContainer(java.lang.String... args)
The page for this section.
|
DBFile |
findIcon(java.lang.String... args)
The icon for this component.
|
static SiteComponent |
findKey(DataSource ds,
int key)
Find the target for this class by the primary key
|
Site |
findOwnedBySite(java.lang.String... args)
The site that owns this component.
|
SiteComponentVisibility |
findVisibilityDesktop(java.lang.String... args)
The visibility for a desktop.
|
SiteComponentVisibility |
findVisibilityMobile(java.lang.String... args)
The visibility for a mobile.
|
SiteComponentVisibility |
findVisibilityTablet(java.lang.String... args)
The visibility for a tablet.
|
int |
getAccessibilityWarningCount(java.lang.String... args) |
java.lang.String |
getAccessibilityWarningResult(java.lang.String... args) |
java.lang.String |
getComponentPath(java.lang.String... args) |
SiteContainer |
getContainer(java.lang.String... args) |
java.util.Date |
getCreatedTS(java.lang.String... args) |
protected java.lang.String |
getDefaultEncoding() |
java.lang.String |
getDerivedStyleClass(java.lang.String... args) |
java.lang.String |
getDescendant(java.lang.String... args) |
java.lang.String |
getDisplayPath(java.lang.String... args) |
java.lang.String |
getDisplayTitle(java.lang.String... args) |
java.lang.String |
getDisplayType(java.lang.String... args) |
java.lang.String |
getDisplayXPath(java.lang.String... args) |
java.lang.String |
getHandlebarsData(java.lang.String... args) |
protected java.util.HashMap<java.lang.String,java.lang.String> |
getHandlebarsHelpers(WebClient client) |
DBFile |
getIcon(java.lang.String... args) |
java.lang.String |
getIconPath(java.lang.String... args) |
int |
getKey(java.lang.String... args) |
java.lang.String |
getName(java.lang.String... args) |
Site |
getOwnedBySite(java.lang.String... args) |
Page |
getPage()
get the page container of this component
|
java.lang.String |
getResult(java.lang.String... args) |
int |
getSequence(java.lang.String... args) |
java.lang.String |
getSnap2Id(java.lang.String... args) |
java.lang.String |
getStyleClass(java.lang.String... args) |
java.lang.String |
getStyleClassVariable(java.lang.String... args) |
java.lang.String |
getTargetWindow(java.lang.String... args) |
SiteComponentVisibility |
getVisibilityDesktop(java.lang.String... args) |
SiteComponentVisibility |
getVisibilityMobile(java.lang.String... args) |
SiteComponentVisibility |
getVisibilityTablet(java.lang.String... args) |
boolean |
hasAttributes(java.lang.String... args) |
boolean |
isFinalFg(java.lang.String... args) |
boolean |
isLocked(java.lang.String... args) |
boolean |
isRelevantComponent(java.lang.String... args) |
static DBObject |
makeClone(MutableDataSource mds,
DBObject srcObj,
java.util.HashMap<java.lang.Long,DBObject> clonedMap) |
protected HTMLDiv |
makeDIV(HTMLPage page) |
static DBQuery<SiteComponent> |
makeQuery(DataSource ds)
Make a new QUERY for this class.
|
static void |
makeSane(DBObject clonedObj,
java.util.HashMap<java.lang.Long,DBObject> clonedMap) |
static java.lang.String |
parseText(java.lang.String text,
Site site) |
HTMLComponent |
process(WebClient client,
Site site,
HTMLPage page) |
SiteComponent |
setAccessibilityWarningCount(int value,
java.lang.String... args) |
SiteComponent |
setAccessibilityWarningResult(java.lang.String value,
java.lang.String... args) |
SiteComponent |
setContainer(com.aspc.dal.cms.SiteContainer value,
java.lang.String... args) |
SiteComponent |
setCreatedTS(java.util.Date value,
java.lang.String... args) |
SiteComponent |
setFinalFg(boolean value,
java.lang.String... args) |
SiteComponent |
setHasAttributes(boolean value,
java.lang.String... args) |
protected java.lang.String[] |
setId(HTMLPage page,
java.lang.String html)
set/find id for the given html
|
SiteComponent |
setKey(int value,
java.lang.String... args) |
SiteComponent |
setName(java.lang.String value,
java.lang.String... args) |
SiteComponent |
setSequence(int value,
java.lang.String... args) |
SiteComponent |
setSnap2Id(java.lang.String value,
java.lang.String... args) |
SiteComponent |
setStyleClass(java.lang.String value,
java.lang.String... args) |
SiteComponent |
setStyleClassVariable(java.lang.String value,
java.lang.String... args) |
SiteComponent |
setVisibilityDesktop(com.aspc.dal.cms.SiteComponentVisibility value,
java.lang.String... args) |
SiteComponent |
setVisibilityMobile(com.aspc.dal.cms.SiteComponentVisibility value,
java.lang.String... args) |
SiteComponent |
setVisibilityTablet(com.aspc.dal.cms.SiteComponentVisibility value,
java.lang.String... args) |
boolean |
shouldShow(ClientBrowser browser)
Should we show this component or not ?
|
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, extAutoEnterCreate, 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, toString, touch, undelete, validateField, validateRecord, validateSubType
public static final java.lang.String DBCLASS_NAME
public static final GlobalId DBCLASS_GID
public static final java.lang.String SNAP2MAP
public SiteComponent(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 public int getKey(java.lang.String... args)
@Nonnull public SiteComponent setKey(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public int getAccessibilityWarningCount(java.lang.String... args)
@Nonnull public SiteComponent setAccessibilityWarningCount(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getAccessibilityWarningResult(java.lang.String... args)
@Nonnull public SiteComponent setAccessibilityWarningResult(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getComponentPath(java.lang.String... args)
@CheckReturnValue @Nullable public SiteContainer getContainer(java.lang.String... args)
@CheckReturnValue @Nonnull public final SiteContainer findContainer(java.lang.String... args) throws NotFoundException
SiteContainer
(Integer,
Searchable)args
- the optional argumentsNotFoundException
- SiteContainer was not found@Nonnull public SiteComponent setContainer(com.aspc.dal.cms.SiteContainer value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public java.util.Date getCreatedTS(java.lang.String... args)
@Nonnull public SiteComponent setCreatedTS(java.util.Date value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getDerivedStyleClass(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getDescendant(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getDisplayPath(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getDisplayTitle(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getDisplayType(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getDisplayXPath(java.lang.String... args)
@CheckReturnValue public boolean isFinalFg(java.lang.String... args)
@Nonnull public SiteComponent setFinalFg(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getHandlebarsData(java.lang.String... args)
@CheckReturnValue public boolean hasAttributes(java.lang.String... args)
@Nonnull public SiteComponent setHasAttributes(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public DBFile getIcon(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBFile findIcon(java.lang.String... args) throws NotFoundException
DBFile
(Integer, Derived,
Searchable)args
- the optional argumentsNotFoundException
- DBFile was not found@CheckReturnValue @Nonnull public java.lang.String getIconPath(java.lang.String... args)
@CheckReturnValue public boolean isLocked(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getName(java.lang.String... args)
@Nonnull public SiteComponent setName(@MatchesPattern(value="^[A-Za-z]+[A-Za-z0-9_:\\.-]*") java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public Site getOwnedBySite(java.lang.String... args)
@CheckReturnValue @Nonnull public final Site findOwnedBySite(java.lang.String... args) throws NotFoundException
Site
(Integer, Derived, Searchable)args
- the optional argumentsNotFoundException
- Site was not found@CheckReturnValue public boolean isRelevantComponent(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getResult(java.lang.String... args)
@CheckReturnValue public int getSequence(java.lang.String... args)
@Nonnull public SiteComponent setSequence(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getSnap2Id(java.lang.String... args)
@Nonnull public SiteComponent setSnap2Id(@MatchesPattern(value="^[A-Za-z][A-Za-z0-9_:\\\\.-]+") java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getStyleClass(java.lang.String... args)
@Nonnull public SiteComponent setStyleClass(@MatchesPattern(value="(-?[_a-zA-Z]+[_a-zA-Z0-9\\-]*| )*") java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getStyleClassVariable(java.lang.String... args)
@Nonnull public SiteComponent setStyleClassVariable(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getTargetWindow(java.lang.String... args)
@CheckReturnValue @Nullable public SiteComponentVisibility getVisibilityDesktop(java.lang.String... args)
@CheckReturnValue @Nonnull public final SiteComponentVisibility findVisibilityDesktop(java.lang.String... args) throws NotFoundException
SiteComponentVisibility
(String, Searchable)args
- the optional argumentsNotFoundException
- SiteComponentVisibility was not found@Nonnull public SiteComponent setVisibilityDesktop(com.aspc.dal.cms.SiteComponentVisibility value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public SiteComponentVisibility getVisibilityMobile(java.lang.String... args)
@CheckReturnValue @Nonnull public final SiteComponentVisibility findVisibilityMobile(java.lang.String... args) throws NotFoundException
SiteComponentVisibility
(String, Searchable)args
- the optional argumentsNotFoundException
- SiteComponentVisibility was not found@Nonnull public SiteComponent setVisibilityMobile(com.aspc.dal.cms.SiteComponentVisibility value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public SiteComponentVisibility getVisibilityTablet(java.lang.String... args)
@CheckReturnValue @Nonnull public final SiteComponentVisibility findVisibilityTablet(java.lang.String... args) throws NotFoundException
SiteComponentVisibility
(String, Searchable)args
- the optional argumentsNotFoundException
- SiteComponentVisibility was not found@Nonnull public SiteComponent setVisibilityTablet(com.aspc.dal.cms.SiteComponentVisibility value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@Nonnull @CheckReturnValue public static DBQuery<SiteComponent> makeQuery(@Nonnull DataSource ds) throws NotFoundException
ds
- the datasourceNotFoundException
- if class could not be found@Nonnull @CheckReturnValue public static SiteComponent findKey(@Nonnull DataSource ds, int key) throws NotFoundException, java.lang.Exception
ds
- the datasourcekey
- the valueNotFoundException
- if target could not be foundjava.lang.Exception
- a serious problempublic static java.lang.String parseText(java.lang.String text, Site site) throws java.lang.Exception
java.lang.Exception
protected java.util.HashMap<java.lang.String,java.lang.String> getHandlebarsHelpers(WebClient client) throws java.lang.Exception
java.lang.Exception
public boolean shouldShow(ClientBrowser browser) throws java.lang.Exception
browser
- The browserjava.lang.Exception
- a serious problem.@OverridingMethodsMustInvokeSuper protected void extPreSaveRecord() throws java.lang.Exception
DBObject
extPreSaveRecord
in class DBObject
java.lang.Exception
- A Serious problem@OverridingMethodsMustInvokeSuper protected void extPreDeleteRecord() throws java.lang.Exception
DBObject
extPreDeleteRecord
in class DBObject
java.lang.Exception
- A Serious problem@OverridingMethodsMustInvokeSuper protected void extValidateDelete(@Nonnull ValidationList list) throws java.lang.Exception
DBObject
extValidateDelete
in class DBObject
list
- The validation listjava.lang.Exception
- A serious problemprotected boolean canHandleNoneType(java.lang.String html)
html
- protected java.lang.String[] setId(HTMLPage page, java.lang.String html)
page
- html
- @OverridingMethodsMustInvokeSuper protected void extValidateRecord(@Nonnull ValidationList list) throws java.lang.Exception
DBObject
extValidateRecord
in class DBObject
list
- The validation list.java.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void extPreValidateDelete() throws java.lang.Exception
DBObject
extPreValidateDelete
in class DBObject
java.lang.Exception
- a serious problempublic Page getPage() throws java.lang.Exception
java.lang.Exception
- a serious problem.@OverridingMethodsMustInvokeSuper protected void extPreValidate() throws java.lang.Exception
DBObject
extPreValidate
in class DBObject
java.lang.Exception
- a serious problemprotected HTMLDiv makeDIV(HTMLPage page) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable protected GlobalKey extGetDerivedGlobalKey(@Nonnull DBField field, @Nullable FldParams params) throws java.lang.Exception
DBObject
extGetDerivedGlobalKey
in class DBObject
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 DBObject
field
- The field to getparams
- The parameters for this field eg. language= or default=java.lang.Exception
- a serious problempublic void changeLinks(java.lang.String aFrom, java.lang.String aTo) throws java.lang.Exception
java.lang.Exception
public static void makeSane(DBObject clonedObj, java.util.HashMap<java.lang.Long,DBObject> clonedMap) throws java.lang.Exception
java.lang.Exception
public static DBObject makeClone(MutableDataSource mds, DBObject srcObj, java.util.HashMap<java.lang.Long,DBObject> clonedMap) throws java.lang.Exception
java.lang.Exception
@OverridingMethodsMustInvokeSuper protected void extCopy(@Nonnull DBObject target) throws java.lang.Exception
DBObject
@CheckReturnValue @OverridingMethodsMustInvokeSuper @Nullable protected ValidationError extValidateField(@Nonnull DBField field, @Nonnull ValidationList list) throws java.lang.Exception
DBObject
extValidateField
in class DBObject
field
- The field to be validatedlist
- The validation listjava.lang.Exception
- a serious errorpublic static java.lang.String editHTML(WebClient client, java.lang.String rawHTML) throws java.lang.Exception
java.lang.Exception
protected void addEdit(WebClient client, HTMLPage page, HTMLDiv div, DBObject target) throws java.lang.Exception
java.lang.Exception
protected void addEdit(WebClient client, HTMLPage page, HTMLComponent div, DBObject target, java.lang.String componentId) throws java.lang.Exception
java.lang.Exception
protected java.lang.String getDefaultEncoding()
public final HTMLComponent process(WebClient client, Site site, HTMLPage page) throws java.lang.Exception
java.lang.Exception
public abstract HTMLComponent extProcess(WebClient client, Site site, HTMLPage page) throws java.lang.Exception
java.lang.Exception
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.