Package org.javlo.component.dynamic
Class DynamicComponent
- java.lang.Object
-
- org.javlo.component.core.AbstractVisualComponent
-
- org.javlo.component.dynamic.DynamicComponent
-
- All Implemented Interfaces:
Serializable,Comparable<IContentVisualComponent>,IContentVisualComponent,IDate,ILink,ISubTitle,IImageTitle,ITimeRange,IRestItem,IFieldContainer,IStaticContainer
- Direct Known Subclasses:
ReactionComponent,StaticMapComponent
public class DynamicComponent extends AbstractVisualComponent implements IStaticContainer, IFieldContainer, IDate, ILink, IImageTitle, ISubTitle, ITimeRange
- Author:
- pvandermaesen
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classDynamicComponent.FieldOrderComparator
-
Field Summary
Fields Modifier and Type Field Description static StringHIDDENstatic StringJSP_HEADERprotected static Loggerloggercreate a static logger.protected StructuredPropertiesproperties-
Fields inherited from class org.javlo.component.core.AbstractVisualComponent
CACHE_KEY_SUFFIX_PARAM_NAME, COMPONENT_KEY, config, EDIT_CLASS, FLUID_COL_SIZE, FORCE_COMPONENT_ID, I18N_FILE, MAX_COL_VALUE, MOBILE_TYPE, NOT_EDIT_PREVIEW_PARAM_NAME, SCROLL_TO_COMP_ID_ATTRIBUTE_NAME, TIME_CACHE_NAME, VALUE_SEPARATOR
-
Fields inherited from interface org.javlo.component.core.IContentVisualComponent
COLORED_WRAPPER_CLASS, COMP_ID_REQUEST_PARAM, COMPLEXITY_ADMIN, COMPLEXITY_EASY, COMPLEXITY_STANDARD, CONTAINER_COLOR, DEFAULT_COLOR, DYN_COMP_COLOR, ECOM_COLOR, EDIT_ACTION_CSS_CLASS, GRAPHIC_COLOR, HIGH_LABEL_LEVEL, ID_SEPARATOR, LINK_COLOR, LOW_LABEL_LEVEL, META_COLOR, MIDDLE_LABEL_LEVEL, SEARCH_LEVEL_HIGH, SEARCH_LEVEL_LOW, SEARCH_LEVEL_MIDDLE, SEARCH_LEVEL_NONE, TEXT_COLOR, VIEW_DEFINITION_REQUEST_ID, WEB2_COLOR
-
Fields inherited from interface org.javlo.component.image.IImageTitle
NO_LINK
-
-
Constructor Summary
Constructors Constructor Description DynamicComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(ContentContext ctx, String uri)check if the class contains the static resources define by a URIintcontentHashCode()protected StringcontructViewStyle(ContentContext ctx)Collection<Resource>getAllResources(ContentContext ctx)return all resources found in the component.Collection<Link>getAllResourcesLinks(ContentContext ctx)create link to resources.protected booleangetColumnableDefaultValue()intgetComplexityLevel(ContentContext ctx)return the complexity level of the component.StringgetComponentLabel(ContentContext ctx, String lg)return the label of the element.PropertiesgetConfigProperties()StringgetContainerType(ContentContext ctx)Map<String,Object>getContentAsMap(ContentContext ctx)StringgetCSSClass()StringgetDataPath()DategetDate(ContentContext ctx)StringgetDirSelected(ContentContext ctx)get folder with ressourcesStringgetDynamicId()protected StringgetEditXHTMLCode(ContentContext ctx)Collection<String>getExternalResources(ContentContext ctx)return the external resources needed from component as css, javascript...FieldgetField(ContentContext ctx, String name)List<Field>getFields(ContentContext ctx)List<String>getFieldsNames(ContentContext ctx)StringgetFieldValue(ContentContext ctx, String name)List<File>getFiles(ContentContext ctx)StringgetHexColor()get the exadecimal color for representation of the component.StringgetIcon()StringgetImageDescription(ContentContext ctx)protected FieldImagegetImageField(ContentContext ctx)StringgetImageLinkURL(ContentContext ctx)protected StringgetInputName(String field)StringgetKey()get a unic key of the component.StringgetLabel(ContentContext ctx)intgetLabelLevel(ContentContext ctx)define the level of label.DategetLatestValidDate()Map<String,String>getList(ContentContext ctx, String listName)Map<String,String>getList(ContentContext ctx, String listName, Locale locale)StringgetNotififyPageName(ContentContext ctx)StringgetPageDescription(ContentContext ctx)return the description of the page if this component is or contains description.intgetPopularity(ContentContext ctx)return indice of popularityStringgetPrefix()StringgetPrefixViewXHTMLCode(ContentContext ctx)code for prefix the view XHTML code.intgetPriority(ContentContext ctx)return the priority of the picture inside the page (9=max)StructuredPropertiesgetProperties()StringgetResourceURL(ContentContext ctx)StringgetSpecificClass(ContentContext ctx)override this method for add specific class to prefix.String[]getStyleLabelList(ContentContext ctx)return a list of label define the style.String[]getStyleList(ContentContext ctx)get the list of style possible for this component.StringgetSubTitle(ContentContext ctx)intgetSubTitleLevel(ContentContext ctx)StringgetSuffix()StringgetSuffixViewXHTMLCode(ContentContext ctx)code for sufix the view XHTML code.StringgetTextForSearch(ContentContext ctx)return a text represent the content of the component. sample all the content :-)StringgetTextLabel(ContentContext ctx)return a string representation of the componentStringgetTextTitle(ContentContext ctx)return a string representation of the component with complete titleLocalDateTimegetTimeRangeEnd(ContentContext ctx)LocalDateTimegetTimeRangeStart(ContentContext ctx)StringgetType()return the type of the element.protected StringgetType(String field)StringgetURL(ContentContext ctx)generate a URL or URI link with all elements to click on.StringgetViewListXHTMLCode(ContentContext ctx)StringgetViewXHTMLCode(ContentContext ctx)StringgetViewXHTMLCode(ContentContext ctx, boolean asList)StringgetXHTMLId(ContentContext ctx)voidinit(ComponentBean bean, ContentContext newContext)booleaninitContent(ContentContext ctx)init the content with a default value. sample : "lorem ipsum" for text component.protected booleanisAutoDeletable()booleanisContentCachable(ContentContext ctx)return the part of header needed for this componentbooleanisContentTimeCachable(ContentContext ctx)booleanisFieldContainer(ContentContext ctx)booleanisImageValid(ContentContext ctx)booleanisLinkValid(ContentContext ctx)return true if the link on the component is enabledbooleanisMobileOnly(ContentContext ctx)booleanisNotififyCreation(ContentContext ctx)booleanisRealContent(ContentContext ctx)return true if component is considered as realContent and the page that contain the component is also considered as real content.booleanisRestMatch(ContentContext ctx, Map<String,String> params)booleanisValidDate(ContentContext ctx)protected booleanisValueTranslatable()booleanisWrapped()IContentVisualComponentnewInstance(ComponentBean bean, ContentContext newCtx, MenuElement page)init the component, do that before all using.StringperformEdit(ContentContext ctx)action call when update the content page.voidprepareView(ContentContext ctx)prepare the rendering of a component. default attributes put in request : style, value, type, compidvoidreload(ContentContext ctx)voidreloadProperties()booleanrenameResource(ContentContext ctx, File oldName, File newName)rename a resourcevoidsetConfigProperties(Properties properties)voidsetDirSelected(String dir)set folder with resourcesvoidsetDynamicId(String id)voidsetLatestValidDate(Date date)voidsetProperties(StructuredProperties properties)voidsetValue(String inContent)set the content without renderingvoidstoreProperties()booleantransflateFrom(ContentContext ctx, ITranslator translator, String lang)translate the content of the component to the current language-
Methods inherited from class org.javlo.component.core.AbstractVisualComponent
applyReplacement, cleanResources, cleanValue, clearReplacement, clone, compareTo, countLine, delete, deleteMySelf, drawColumn, equals, equals, executeCurrentRenderer, executeJSP, executeRenderer, executeRenderer, extractFieldsFromRenderer, forceInit, getAjaxId, getArea, getAuthors, getBackgroundColor, getBaseHelpURL, getClassName, getColomnablePrefix, getColomnableSuffix, getColumn, getColumnMaxSize, getColumnSize, getColumnSizes, getColumnStyle, getComponentBean, getComponentCSS, getComponentCssClass, getComponentId, getComponentPath, getConfig, getConfigInValue, getConfigMessage, getContainerPage, getContentAsText, getContentCache, getContentMessage, getContentName, getContentTimeCache, getCookiesDisplayStatus, getCreationDate, getCSSStyle, getCurrentPage, getCurrentRenderer, getDataAttributes, getDebugHeader, getDefaultHelpURI, getDefaultRenderer, getDeleteDate, getDescription, getDisplayAsInputName, getDisplayMessage, getEditorComplexity, getEditRenderer, getEditText, getEmptyCode, getEmptyXHTMLCode, getErrorMessage, getErrorMessage, getExternalModules, getFileDirectory, getFirstPrefix, getFontAwesome, getForcedId, getForcedPrefixViewXHTMLCode, getForcedRenderer, getForcedSuffixViewXHTMLCode, getFormName, getGroup, getHeaderContent, getHelpText, getHelpType, getHelpURI, getHelpURL, getI18nEditableKeys, getId, getImportFolderPath, getImportFolderPath, getInlineStyle, getInputNameColomn, getInputNameColomnStyle, getInputNameRenderer, getInputNameRendererTitle, getItalicAndStrongLanguageMarkerList, getJSOnSubmit, getLastSufix, getLayout, getListClass, getListGroup, getListItemTag, getListTag, getLocalMessage, getLock, getManualCssClass, getMarkerList, getMessage, getMirrorWrapper, getModificationDate, getNextComponent, getPage, getPrefixCssClass, getPreviewAttributes, getPreviewCssClass, getPreviewCssId, getPreviousComponent, getQuotationLanguageMarkerList, getReferenceComponent, getRemplacement, getRenderer, getRendererTitle, getRenderes, getRequestComponent, getSearchLevel, getSelectRendererXHTML, getSpecialInputTag, getSpecialPreviewCssId, getSpecialTagTitle, getSpecialTagXHTML, getSpecificCssClass, getStyle, getStyleLabel, getStyleTitle, getTag, getTextColor, getTextMessage, getTextPosition, getTitleLevel, getTypeInputName, getValue, getValue, getVersion, getViewData, getViewDataFile, getViewID, getViewText, getWidth, getWordCount, getXHTMLCode, getXHTMLConfig, haveRight, includeComponentJSP, includePage, init, insert, isAjaxWrapper, isAskWidth, isAutoRenderer, isBackgroundColored, isCanAddClass, isCloseRow, isColored, isColumnable, isConfig, isContentCachableByQuery, isDefaultValue, isDispayEmptyXHTMLCode, isDisplayable, isDisplayHidden, isEditOnCreate, isFirstElementOfRepeatSequence, isFirstRepeated, isFreeInputLayout, isHelpURL, isHiddable, isHidden, isHiddenInMode, isHiddenInModeValue, isInline, isInsertable, isList, isListable, isMetaTitle, isMirroredByDefault, isMirrorWrapped, isModify, isNeedDelete, isNeedRefresh, isNeedRenderer, isNew, isNextSame, isNextSame, isNolink, isNoLinkable, isOpenRow, isPreviousSame, isPreviousSame, isRepeat, isRepeatable, isReversedLink, isStyleHidden, isUnique, isValueProperties, isViewDataFile, isVisible, isVisible, isVisibleFromCookies, isWrapped, isXML, loadViewData, markAsNew, next, onStyleChange, performColumnable, performConfig, performUpdate, prepareEdit, previous, processView, renderOtherComponent, renderViewXHTMLCode, replaceAllInContent, replaceInContent, resetContentCache, resetViewData, setBackgroundColor, setColumnSize, setColumnStyle, setComponentBean, setContainerPage, setContentCache, setContentTimeCache, setDisplayHidden, setForcedId, setForcedRenderer, setGroup, setHidden, setHiddenInMode, setList, setLocalMessage, setMessage, setMirrorWrapped, setModify, setNeedRefresh, setNextComponent, setNolink, setPage, setPreviousComponent, setRenderer, setRepeat, setStyle, setTextColor, setTextPosition, setValid, setWidth, stored, storeViewData, stringToReader, stringToReader, stringToStream, textToXHTML, toString, updateCache
-
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.javlo.component.core.IContentVisualComponent
cleanResources, clearReplacement, delete, equals, extractFieldsFromRenderer, forceInit, getArea, getAuthors, getClassName, getColumnSize, getColumnStyle, getComponentBean, getComponentCssClass, getConfig, getConfigInValue, getConfigMessage, getContentAsText, getContentMessage, getContentName, getCreationDate, getCurrentRenderer, getDescription, getEditText, getEmptyXHTMLCode, getErrorMessage, getErrorMessage, getExternalModules, getFirstPrefix, getFontAwesome, getGroup, getHeaderContent, getHelpText, getHelpURL, getI18nEditableKeys, getId, getInputNameRenderer, getJSOnSubmit, getLastSufix, getLayout, getListGroup, getMarkerList, getMessage, getModificationDate, getNextComponent, getPreviousComponent, getReferenceComponent, getRenderer, getSearchLevel, getSpecialTagTitle, getSpecialTagXHTML, getStyle, getStyleLabel, getStyleTitle, getTextMessage, getTitleLevel, getValue, getVersion, getViewText, getWordCount, getXHTMLCode, getXHTMLConfig, insert, isColumnable, isConfig, isDefaultValue, isDispayEmptyXHTMLCode, isDisplayable, isDisplayHidden, isEditOnCreate, isFirstRepeated, isHelpURL, isHidden, isHiddenInMode, isInline, isInsertable, isList, isListable, isMetaTitle, isMirroredByDefault, isModify, isNeedRefresh, isNew, isNolink, isRepeat, isRepeatable, isUnique, isVisible, isVisible, isVisibleFromCookies, loadViewData, markAsNew, next, performConfig, previous, replaceAllInContent, replaceInContent, resetViewData, setColumnSize, setContainerPage, setDisplayHidden, setGroup, setList, setNeedRefresh, setNextComponent, setPage, setPreviousComponent, setRenderer, setRepeat, setStyle, setValid, stored
-
Methods inherited from interface org.javlo.fields.IFieldContainer
getPage
-
Methods inherited from interface org.javlo.component.meta.ITimeRange
isTimeRangeValid
-
-
-
-
Field Detail
-
JSP_HEADER
public static final String JSP_HEADER
- See Also:
- Constant Field Values
-
HIDDEN
public static final String HIDDEN
- See Also:
- Constant Field Values
-
logger
protected static Logger logger
create a static logger.
-
properties
protected StructuredProperties properties
-
-
Method Detail
-
prepareView
public void prepareView(ContentContext ctx) throws Exception
Description copied from class:AbstractVisualComponentprepare the rendering of a component. default attributes put in request : style, value, type, compid- Specified by:
prepareViewin interfaceIContentVisualComponent- Overrides:
prepareViewin classAbstractVisualComponent- Throws:
Exception
-
getStyleList
public String[] getStyleList(ContentContext ctx)
Description copied from interface:IContentVisualComponentget the list of style possible for this component.- Specified by:
getStyleListin interfaceIContentVisualComponent- Overrides:
getStyleListin classAbstractVisualComponent- Returns:
- a list of string represent a style.
-
getStyleLabelList
public String[] getStyleLabelList(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn a list of label define the style.- Specified by:
getStyleLabelListin interfaceIContentVisualComponent- Overrides:
getStyleLabelListin classAbstractVisualComponent- Returns:
- a list of label.
-
init
public void init(ComponentBean bean, ContentContext newContext) throws Exception
- Overrides:
initin classAbstractVisualComponent- Throws:
Exception
-
reloadProperties
public void reloadProperties()
-
contructViewStyle
protected String contructViewStyle(ContentContext ctx)
- Overrides:
contructViewStylein classAbstractVisualComponent
-
getPrefixViewXHTMLCode
public String getPrefixViewXHTMLCode(ContentContext ctx)
Description copied from interface:IContentVisualComponentcode for prefix the view XHTML code.- Specified by:
getPrefixViewXHTMLCodein interfaceIContentVisualComponent- Overrides:
getPrefixViewXHTMLCodein classAbstractVisualComponent- Returns:
- XHTML code.
-
getSuffixViewXHTMLCode
public String getSuffixViewXHTMLCode(ContentContext ctx)
Description copied from interface:IContentVisualComponentcode for sufix the view XHTML code.- Specified by:
getSuffixViewXHTMLCodein interfaceIContentVisualComponent- Overrides:
getSuffixViewXHTMLCodein classAbstractVisualComponent- Returns:
- XHTML code.
-
getViewListXHTMLCode
public String getViewListXHTMLCode(ContentContext ctx) throws Exception
- Specified by:
getViewListXHTMLCodein interfaceIFieldContainer- Throws:
Exception
-
getViewXHTMLCode
public String getViewXHTMLCode(ContentContext ctx) throws Exception
- Specified by:
getViewXHTMLCodein interfaceIFieldContainer- Overrides:
getViewXHTMLCodein classAbstractVisualComponent- Throws:
Exception- See Also:
org.javlo.itf.IContentVisualComponent#getXHTMLCode()
-
getViewXHTMLCode
public String getViewXHTMLCode(ContentContext ctx, boolean asList) throws Exception
- Throws:
Exception
-
getFieldsNames
public List<String> getFieldsNames(ContentContext ctx)
- Specified by:
getFieldsNamesin interfaceIFieldContainer
-
getFields
public List<Field> getFields(ContentContext ctx) throws Exception
- Specified by:
getFieldsin interfaceIFieldContainer- Throws:
Exception
-
getField
public Field getField(ContentContext ctx, String name) throws Exception
- Specified by:
getFieldin interfaceIFieldContainer- Throws:
Exception
-
getFieldValue
public String getFieldValue(ContentContext ctx, String name) throws Exception
- Specified by:
getFieldValuein interfaceIFieldContainer- Throws:
Exception
-
getCSSClass
public String getCSSClass()
-
getPrefix
public String getPrefix()
-
getSuffix
public String getSuffix()
-
isWrapped
public boolean isWrapped()
-
getColumnableDefaultValue
protected boolean getColumnableDefaultValue()
- Overrides:
getColumnableDefaultValuein classAbstractVisualComponent
-
getDataPath
public String getDataPath()
-
getList
public Map<String,String> getList(ContentContext ctx, String listName, Locale locale)
- Specified by:
getListin interfaceIFieldContainer
-
getList
public Map<String,String> getList(ContentContext ctx, String listName)
- Specified by:
getListin interfaceIFieldContainer
-
getInputName
protected String getInputName(String field)
- Overrides:
getInputNamein classAbstractVisualComponent
-
isNotififyCreation
public boolean isNotififyCreation(ContentContext ctx) throws ServiceException
- Throws:
ServiceException
-
getNotififyPageName
public String getNotififyPageName(ContentContext ctx) throws ServiceException
- Throws:
ServiceException
-
getEditXHTMLCode
protected String getEditXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getEditXHTMLCodein classAbstractVisualComponent- Throws:
Exception
-
getType
public String getType()
Description copied from interface:IContentVisualComponentreturn the type of the element.- Specified by:
getTypein interfaceIContentVisualComponent- Returns:
- the type of the element.
-
storeProperties
public void storeProperties()
-
performEdit
public String performEdit(ContentContext ctx) throws Exception
Description copied from interface:IContentVisualComponentaction call when update the content page.- Specified by:
performEditin interfaceIContentVisualComponent- Overrides:
performEditin classAbstractVisualComponent- Returns:
- the error message, null if no error
- Throws:
Exception
-
setValue
public void setValue(String inContent)
Description copied from interface:IContentVisualComponentset the content without rendering- Specified by:
setValuein interfaceIContentVisualComponent- Overrides:
setValuein classAbstractVisualComponent
-
getHexColor
public String getHexColor()
Description copied from interface:IContentVisualComponentget the exadecimal color for representation of the component.- Specified by:
getHexColorin interfaceIContentVisualComponent- Overrides:
getHexColorin classAbstractVisualComponent- Returns:
- a exadecimal color (sample : a5b499)
-
getProperties
public StructuredProperties getProperties()
-
setProperties
public void setProperties(StructuredProperties properties)
-
setConfigProperties
public void setConfigProperties(Properties properties)
-
getConfigProperties
public Properties getConfigProperties()
-
newInstance
public IContentVisualComponent newInstance(ComponentBean bean, ContentContext newCtx, MenuElement page) throws Exception
Description copied from interface:IContentVisualComponentinit the component, do that before all using.- Specified by:
newInstancein interfaceIContentVisualComponent- Overrides:
newInstancein classAbstractVisualComponentnewCtx- the context of the content manager.- Throws:
Exception
-
getComponentLabel
public String getComponentLabel(ContentContext ctx, String lg)
Description copied from interface:IContentVisualComponentreturn the label of the element.- Specified by:
getComponentLabelin interfaceIContentVisualComponent- Overrides:
getComponentLabelin classAbstractVisualComponentlg- language of the label- Returns:
- the label of the element.
-
getKey
public String getKey()
Description copied from interface:IContentVisualComponentget a unic key of the component. User special for DynamicComponent.- Specified by:
getKeyin interfaceIContentVisualComponent- Overrides:
getKeyin classAbstractVisualComponent
-
isRealContent
public boolean isRealContent(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn true if component is considered as realContent and the page that contain the component is also considered as real content.- Specified by:
isRealContentin interfaceIContentVisualComponent- Specified by:
isRealContentin interfaceIFieldContainer- Overrides:
isRealContentin classAbstractVisualComponent- Parameters:
ctx- current context- Returns:
-
isContentCachable
public boolean isContentCachable(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn the part of header needed for this component- Specified by:
isContentCachablein interfaceIContentVisualComponent- Overrides:
isContentCachablein classAbstractVisualComponent- Returns:
-
contains
public boolean contains(ContentContext ctx, String uri)
Description copied from interface:IStaticContainercheck if the class contains the static resources define by a URI- Specified by:
containsin interfaceIStaticContaineruri- a uri to a static resources- Returns:
- true if the class conatins this static resources.
-
getAllResources
public Collection<Resource> getAllResources(ContentContext ctx)
Description copied from interface:IStaticContainerreturn all resources found in the component.- Specified by:
getAllResourcesin interfaceIStaticContainer- Returns:
-
renameResource
public boolean renameResource(ContentContext ctx, File oldName, File newName)
Description copied from interface:IStaticContainerrename a resource- Specified by:
renameResourcein interfaceIStaticContainer- Returns:
- true if rename, false else
-
getLabel
public String getLabel(ContentContext ctx)
- Specified by:
getLabelin interfaceIFieldContainer
-
isContentTimeCachable
public boolean isContentTimeCachable(ContentContext ctx)
- Overrides:
isContentTimeCachablein classAbstractVisualComponent
-
getAllResourcesLinks
public Collection<Link> getAllResourcesLinks(ContentContext ctx)
Description copied from interface:IStaticContainercreate link to resources.- Specified by:
getAllResourcesLinksin interfaceIStaticContainer- Returns:
-
getDate
public Date getDate(ContentContext ctx)
-
isValidDate
public boolean isValidDate(ContentContext ctx)
- Specified by:
isValidDatein interfaceIDate
-
getPopularity
public int getPopularity(ContentContext ctx)
Description copied from interface:IStaticContainerreturn indice of popularity- Specified by:
getPopularityin interfaceIStaticContainer- Returns:
-
contentHashCode
public int contentHashCode()
-
getTextForSearch
public String getTextForSearch(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn a text represent the content of the component. sample all the content :-)- Specified by:
getTextForSearchin interfaceIContentVisualComponent- Overrides:
getTextForSearchin classAbstractVisualComponent- Returns:
- a text represent the content of the component for the search module
-
initContent
public boolean initContent(ContentContext ctx) throws Exception
Description copied from interface:IContentVisualComponentinit the content with a default value. sample : "lorem ipsum" for text component.- Specified by:
initContentin interfaceIContentVisualComponent- Overrides:
initContentin classAbstractVisualComponent- Returns:
- true if content is create.
- Throws:
Exception
-
reload
public void reload(ContentContext ctx) throws Exception
- Throws:
Exception
-
getURL
public String getURL(ContentContext ctx) throws Exception
Description copied from interface:ILinkgenerate a URL or URI link with all elements to click on.
-
isLinkValid
public boolean isLinkValid(ContentContext ctx) throws Exception
Description copied from interface:ILinkreturn true if the link on the component is enabled- Specified by:
isLinkValidin interfaceILink- Returns:
- Throws:
Exception
-
getImageField
protected FieldImage getImageField(ContentContext ctx)
-
getImageDescription
public String getImageDescription(ContentContext ctx)
- Specified by:
getImageDescriptionin interfaceIImageTitle
-
getResourceURL
public String getResourceURL(ContentContext ctx)
- Specified by:
getResourceURLin interfaceIImageTitle
-
getImageLinkURL
public String getImageLinkURL(ContentContext ctx)
- Specified by:
getImageLinkURLin interfaceIImageTitle
-
isImageValid
public boolean isImageValid(ContentContext ctx)
- Specified by:
isImageValidin interfaceIImageTitle
-
getLabelLevel
public int getLabelLevel(ContentContext ctx)
Description copied from interface:IContentVisualComponentdefine the level of label. If there area most than 1 level on page, the label of the page is the bigger level.- Specified by:
getLabelLevelin interfaceIContentVisualComponent- Overrides:
getLabelLevelin classAbstractVisualComponent- Returns:
- 0=default, no the components is'nt label.
-
getTextTitle
public String getTextTitle(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn a string representation of the component with complete title- Specified by:
getTextTitlein interfaceIContentVisualComponent- Overrides:
getTextTitlein classAbstractVisualComponent- Returns:
-
getTextLabel
public String getTextLabel(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn a string representation of the component- Specified by:
getTextLabelin interfaceIContentVisualComponent- Overrides:
getTextLabelin classAbstractVisualComponent
-
getSpecificClass
public String getSpecificClass(ContentContext ctx)
Description copied from class:AbstractVisualComponentoverride this method for add specific class to prefix.- Overrides:
getSpecificClassin classAbstractVisualComponent- Returns:
-
getPageDescription
public String getPageDescription(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn the description of the page if this component is or contains description.- Specified by:
getPageDescriptionin interfaceIContentVisualComponent- Overrides:
getPageDescriptionin classAbstractVisualComponent- Returns:
-
getSubTitle
public String getSubTitle(ContentContext ctx)
- Specified by:
getSubTitlein interfaceISubTitle
-
getSubTitleLevel
public int getSubTitleLevel(ContentContext ctx)
- Specified by:
getSubTitleLevelin interfaceISubTitle
-
getPriority
public int getPriority(ContentContext ctx)
Description copied from interface:IImageTitlereturn the priority of the picture inside the page (9=max)- Specified by:
getPriorityin interfaceIImageTitle- Returns:
-
isFieldContainer
public boolean isFieldContainer(ContentContext ctx)
- Specified by:
isFieldContainerin interfaceIFieldContainer
-
getContainerType
public String getContainerType(ContentContext ctx)
- Specified by:
getContainerTypein interfaceIFieldContainer
-
getXHTMLId
public String getXHTMLId(ContentContext ctx)
- Specified by:
getXHTMLIdin interfaceISubTitle
-
getDynamicId
public String getDynamicId()
-
setDynamicId
public void setDynamicId(String id)
-
getComplexityLevel
public int getComplexityLevel(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn the complexity level of the component.- Specified by:
getComplexityLevelin interfaceIContentVisualComponent- Overrides:
getComplexityLevelin classAbstractVisualComponent- Parameters:
ctx- TODO- Returns:
- see contant
-
getContentAsMap
public Map<String,Object> getContentAsMap(ContentContext ctx) throws Exception
- Specified by:
getContentAsMapin interfaceIRestItem- Overrides:
getContentAsMapin classAbstractVisualComponent- Throws:
Exception
-
getFiles
public List<File> getFiles(ContentContext ctx)
- Specified by:
getFilesin interfaceIStaticContainer
-
getDirSelected
public String getDirSelected(ContentContext ctx)
Description copied from interface:IStaticContainerget folder with ressources- Specified by:
getDirSelectedin interfaceIStaticContainer- Returns:
-
setDirSelected
public void setDirSelected(String dir)
Description copied from interface:IStaticContainerset folder with resources- Specified by:
setDirSelectedin interfaceIStaticContainer
-
setLatestValidDate
public void setLatestValidDate(Date date)
- Specified by:
setLatestValidDatein interfaceILink
-
getLatestValidDate
public Date getLatestValidDate()
- Specified by:
getLatestValidDatein interfaceILink
-
getExternalResources
public Collection<String> getExternalResources(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn the external resources needed from component as css, javascript...- Specified by:
getExternalResourcesin interfaceIContentVisualComponent- Overrides:
getExternalResourcesin classAbstractVisualComponent- Returns:
- a list of URI to external resources
-
isRestMatch
public boolean isRestMatch(ContentContext ctx, Map<String,String> params)
- Specified by:
isRestMatchin interfaceIContentVisualComponent- Overrides:
isRestMatchin classAbstractVisualComponent
-
getIcon
public String getIcon()
- Specified by:
getIconin interfaceIContentVisualComponent- Overrides:
getIconin classAbstractVisualComponent
-
isAutoDeletable
protected boolean isAutoDeletable()
- Overrides:
isAutoDeletablein classAbstractVisualComponent
-
isValueTranslatable
protected boolean isValueTranslatable()
- Overrides:
isValueTranslatablein classAbstractVisualComponent
-
transflateFrom
public boolean transflateFrom(ContentContext ctx, ITranslator translator, String lang)
Description copied from interface:IContentVisualComponenttranslate the content of the component to the current language- Specified by:
transflateFromin interfaceIContentVisualComponent- Overrides:
transflateFromin classAbstractVisualComponent- Parameters:
ctx- contextContext of the current renderingtranslator- class to translatelang- the language of the current content (source language)- Returns:
-
isMobileOnly
public boolean isMobileOnly(ContentContext ctx)
- Specified by:
isMobileOnlyin interfaceIImageTitle
-
getTimeRangeStart
public LocalDateTime getTimeRangeStart(ContentContext ctx)
- Specified by:
getTimeRangeStartin interfaceITimeRange
-
getTimeRangeEnd
public LocalDateTime getTimeRangeEnd(ContentContext ctx)
- Specified by:
getTimeRangeEndin interfaceITimeRange
-
-