public class DynamicComponent extends AbstractVisualComponent implements IStaticContainer, IFieldContainer, IDate, ILink, IImageTitle, ISubTitle
| Modifier and Type | Class and Description |
|---|---|
class |
DynamicComponent.FieldOrderComparator |
| Modifier and Type | Field and Description |
|---|---|
static String |
HIDDEN |
static String |
JSP_HEADER |
protected static Logger |
logger
create a static logger.
|
CACHE_KEY_SUFFIX_PARAM_NAME, COMPONENT_KEY, config, EDIT_CLASS, FORCE_COMPONENT_ID, I18N_FILE, NOT_EDIT_PREVIEW_PARAM_NAME, SCROLL_TO_COMP_ID_ATTRIBUTE_NAME, TIME_CACHE_NAME, VALUE_SEPARATORCOLORED_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_COLORNO_LINK| Constructor and Description |
|---|
DynamicComponent() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(ContentContext ctx,
String uri)
check if the class contains the static resources define by a URI
|
int |
contentHashCode() |
protected String |
drawColumn(int size) |
Collection<Resource> |
getAllResources(ContentContext ctx)
return all resources found in the component.
|
Collection<Link> |
getAllResourcesLinks(ContentContext ctx)
create link to resources.
|
protected String |
getColumn(ContentContext ctx) |
int |
getColumnSize() |
protected List<Integer> |
getColumnSizes() |
int |
getComplexityLevel(ContentContext ctx)
return the complexity level of the component.
|
String |
getComponentLabel(ContentContext ctx,
String lg)
return the label of the element.
|
Properties |
getConfigProperties() |
String |
getContainerType(ContentContext ctx) |
Map<String,Object> |
getContentAsMap(ContentContext ctx) |
String |
getCSSClass() |
String |
getDataPath() |
Date |
getDate(ContentContext ctx) |
String |
getDirSelected()
get folder with ressources
|
String |
getDynamicId() |
protected String |
getEditXHTMLCode(ContentContext ctx) |
Collection<String> |
getExternalResources(ContentContext ctx)
return the external resources needed from component as css, javascript...
|
Field |
getField(ContentContext ctx,
String name) |
List<Field> |
getFields(ContentContext ctx) |
List<String> |
getFieldsNames(ContentContext ctx) |
String |
getFieldValue(ContentContext ctx,
String name) |
List<File> |
getFiles(ContentContext ctx) |
String |
getFontAwesome() |
String |
getHexColor()
get the exadecimal color for representation of the component.
|
String |
getImageDescription(ContentContext ctx) |
protected FieldImage |
getImageField(ContentContext ctx) |
String |
getImageLinkURL(ContentContext ctx) |
protected String |
getInputName(String field) |
protected String |
getInputNameColomn() |
String |
getKey()
get a unic key of the component.
|
String |
getLabel(ContentContext ctx) |
int |
getLabelLevel(ContentContext ctx)
define the level of label.
|
Date |
getLatestValidDate() |
Map<String,String> |
getList(ContentContext ctx,
String listName) |
Map<String,String> |
getList(ContentContext ctx,
String listName,
Locale locale) |
String |
getNotififyPageName(ContentContext ctx) |
String |
getPageDescription(ContentContext ctx)
return the description of the page if this component is or contains description.
|
int |
getPopularity(ContentContext ctx)
return indice of popularity
|
String |
getPrefix() |
String |
getPrefixViewXHTMLCode(ContentContext ctx)
code for prefix the view XHTML code.
|
int |
getPriority(ContentContext ctx)
return the priority of the picture inside the page (9=max)
|
StructuredProperties |
getProperties() |
String |
getResourceURL(ContentContext ctx) |
String |
getSpecificClass(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.
|
String |
getSubTitle(ContentContext ctx) |
int |
getSubTitleLevel(ContentContext ctx) |
String |
getSuffix() |
String |
getSuffixViewXHTMLCode(ContentContext ctx)
code for sufix the view XHTML code.
|
String |
getTextForSearch(ContentContext ctx)
return a text represent the content of the component. sample all the
content :-)
|
String |
getTextLabel(ContentContext ctx)
return a string representation of the component
|
String |
getTextTitle(ContentContext ctx)
return a string representation of the component with complete title
|
String |
getType()
return the type of the element.
|
protected String |
getType(String field) |
String |
getURL(ContentContext ctx)
generate a URL or URI link with all elements to click on.
|
String |
getViewListXHTMLCode(ContentContext ctx) |
String |
getViewXHTMLCode(ContentContext ctx) |
String |
getViewXHTMLCode(ContentContext ctx,
boolean asList) |
String |
getXHTMLId(ContentContext ctx) |
void |
init(ComponentBean bean,
ContentContext newContext) |
boolean |
initContent(ContentContext ctx)
init the content with a default value. sample : "lorem ipsum" for text
component.
|
protected boolean |
isAutoDeletable() |
boolean |
isColumnable(ContentContext ctx) |
boolean |
isContentCachable(ContentContext ctx)
return the part of header needed for this component
|
boolean |
isContentTimeCachable(ContentContext ctx) |
boolean |
isFieldContainer(ContentContext ctx) |
boolean |
isImageValid(ContentContext ctx) |
boolean |
isLinkValid(ContentContext ctx)
return true if the link on the component is enabled
|
boolean |
isNotififyCreation(ContentContext ctx) |
boolean |
isRealContent(ContentContext ctx)
return true if component is considered as realContent and the page that
contain the component is also considered as real content.
|
boolean |
isRestMatch(ContentContext ctx,
Map<String,String> params) |
boolean |
isValidDate(ContentContext ctx) |
protected boolean |
isValueTranslatable() |
boolean |
isWrapped() |
IContentVisualComponent |
newInstance(ComponentBean bean,
ContentContext newCtx,
MenuElement page)
init the component, do that before all using.
|
String |
performEdit(ContentContext ctx)
action call when update the content page.
|
void |
prepareView(ContentContext ctx)
prepare the rendering of a component. default attributes put in request :
style, value, type, compid
|
void |
reload(ContentContext ctx) |
void |
reloadProperties() |
boolean |
renameResource(ContentContext ctx,
File oldName,
File newName)
rename a resource
|
void |
setColumnSize(String size) |
void |
setConfigProperties(Properties properties) |
void |
setDirSelected(String dir)
set folder with resources
|
void |
setDynamicId(String id) |
void |
setLatestValidDate(Date date) |
void |
setProperties(StructuredProperties properties) |
void |
setValue(String inContent)
set the content without rendering
|
void |
storeProperties() |
boolean |
transflateFrom(ContentContext ctx,
ITranslator translator,
String lang)
translate the content of the component to the current language
|
applyReplacement, cleanValue, clearReplacement, clone, compareTo, contructViewStyle, countLine, delete, deleteMySelf, equals, equals, executeCurrentRenderer, executeJSP, executeRenderer, executeRenderer, extractFieldsFromRenderer, getAjaxId, getArea, getAuthors, getBackgroundColor, getBaseHelpURL, getClassName, getComponentBean, getComponentCSS, getComponentCssClass, getComponentId, getComponentPath, getConfig, getConfigMessage, getContainerPage, getContentAsText, getContentCache, getContentMessage, getContentName, getContentTimeCache, getCookiesDisplayStatus, getCreationDate, getCSSStyle, getCurrentPage, getCurrentRenderer, getDebugHeader, getDefaultHelpURI, getDefaultRenderer, getDeleteDate, getDescription, getDisplayAsInputName, getDisplayMessage, getEditorComplexity, getEditText, getEmptyCode, getEmptyXHTMLCode, getErrorMessage, getErrorMessage, getFirstPrefix, getForcedId, getForcedPrefixViewXHTMLCode, getForcedSuffixViewXHTMLCode, getFormName, getHeaderContent, getHelpType, getHelpURI, getHelpURL, getI18nEditableKeys, getId, getImportFolderPath, getImportFolderPath, getInlineStyle, getInputNameRenderer, getInputNameRendererTitle, getItalicAndStrongLanguageMarkerList, getJSOnSubmit, getLastSufix, getLayout, getListClass, getListGroup, getListItemTag, getListTag, getLock, getMarkerList, getMessage, getMirrorWrapper, getModificationDate, getNextComponent, getPage, getPreviewAttributes, getPreviewCssClass, getPreviewCssId, getPreviousComponent, getQuotationLanguageMarkerList, getRemplacement, getRenderer, getRendererTitle, getRenderes, getRequestComponent, getSearchLevel, getSelectRendererXHTML, getSpecialInputTag, getSpecialPreviewCssClass, getSpecialPreviewCssId, getSpecialTagTitle, getSpecialTagXHTML, getStyle, getStyleLabel, getStyleTitle, getTag, getTextColor, getTextMessage, getTitleLevel, getTypeInputName, getValue, getValue, getVersion, getViewData, getViewDataFile, getViewID, getViewText, getWidth, getWordCount, getXHTMLCode, getXHTMLConfig, haveRight, includeComponentJSP, includePage, init, insert, isAjaxWrapper, isAskWidth, isAutoRenderer, isBackgroundColored, isCanAddClass, isColored, isConfig, isContentCachableByQuery, isDefaultValue, isDispayEmptyXHTMLCode, isDisplayable, isDisplayHidden, isEditOnCreate, isFirstElementOfRepeatSequence, isFirstRepeated, isFreeInputLayout, isHelpURL, isHiddable, isHidden, isHiddenInMode, isInline, isInsertable, isList, isListable, isMetaTitle, isMirroredByDefault, isMirrorWrapped, isModify, isNeedDelete, isNeedRefresh, isNeedRenderer, isNew, isNextSame, isNextSame, isNolink, isNoLinkable, isPreviousSame, isPreviousSame, isRepeat, isRepeatable, isReversedLink, isUnique, isValueProperties, isViewDataFile, isVisible, isVisible, isVisibleFromCookies, isWrapped, isXML, loadViewData, main, markAsNew, next, onStyleChange, performConfig, performUpdate, previous, processView, renderViewXHTMLCode, replaceAllInContent, replaceInContent, resetContentCache, resetViewData, setBackgroundColor, setComponentBean, setContainerPage, setContentCache, setContentTimeCache, setDisplayHidden, setForcedId, setHidden, setHiddenInMode, setList, setMessage, setMirrorWrapped, setModify, setNeedRefresh, setNextComponent, setNolink, setPage, setPreviousComponent, setRenderer, setRepeat, setStyle, setTextColor, setValid, setWidth, stored, storeViewData, stringToReader, stringToReader, stringToStream, textToXHTMLfinalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPageclearReplacement, delete, equals, extractFieldsFromRenderer, getArea, getAuthors, getClassName, getComponentBean, getComponentCssClass, getConfig, getConfigMessage, getContentAsText, getContentMessage, getContentName, getCreationDate, getCurrentRenderer, getDescription, getEditText, getEmptyXHTMLCode, getErrorMessage, getErrorMessage, getFirstPrefix, getHeaderContent, getHelpURL, getI18nEditableKeys, getId, getInputNameRenderer, getJSOnSubmit, getLastSufix, getLayout, getListGroup, getMarkerList, getMessage, getModificationDate, getNextComponent, getPreviousComponent, getRenderer, getSearchLevel, getSpecialTagTitle, getSpecialTagXHTML, getStyleLabel, getStyleTitle, getTextMessage, getTitleLevel, getValue, getVersion, getViewText, getWordCount, getXHTMLCode, getXHTMLConfig, insert, 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, setContainerPage, setDisplayHidden, setList, setNeedRefresh, setNextComponent, setPage, setPreviousComponent, setRenderer, setRepeat, setStyle, setValid, storedcompareTopublic static final String JSP_HEADER
public static final String HIDDEN
protected static Logger logger
public void prepareView(ContentContext ctx) throws Exception
AbstractVisualComponentprepareView in class AbstractVisualComponentExceptionpublic String[] getStyleList(ContentContext ctx)
IContentVisualComponentgetStyleList in interface IContentVisualComponentgetStyleList in class AbstractVisualComponentpublic String[] getStyleLabelList(ContentContext ctx)
IContentVisualComponentgetStyleLabelList in interface IContentVisualComponentgetStyleLabelList in class AbstractVisualComponentpublic void init(ComponentBean bean, ContentContext newContext) throws Exception
init in class AbstractVisualComponentExceptionpublic void reloadProperties()
public String getPrefixViewXHTMLCode(ContentContext ctx)
IContentVisualComponentgetPrefixViewXHTMLCode in interface IContentVisualComponentgetPrefixViewXHTMLCode in class AbstractVisualComponentpublic String getSuffixViewXHTMLCode(ContentContext ctx)
IContentVisualComponentgetSuffixViewXHTMLCode in interface IContentVisualComponentgetSuffixViewXHTMLCode in class AbstractVisualComponentpublic String getViewListXHTMLCode(ContentContext ctx) throws Exception
getViewListXHTMLCode in interface IFieldContainerExceptionpublic String getViewXHTMLCode(ContentContext ctx) throws Exception
getViewXHTMLCode in interface IFieldContainergetViewXHTMLCode in class AbstractVisualComponentExceptionorg.javlo.itf.IContentVisualComponent#getXHTMLCode()public String getViewXHTMLCode(ContentContext ctx, boolean asList) throws Exception
Exceptionpublic List<String> getFieldsNames(ContentContext ctx)
getFieldsNames in interface IFieldContainerpublic List<Field> getFields(ContentContext ctx) throws Exception
getFields in interface IFieldContainerExceptionpublic Field getField(ContentContext ctx, String name) throws Exception
getField in interface IFieldContainerExceptionpublic String getFieldValue(ContentContext ctx, String name) throws Exception
getFieldValue in interface IFieldContainerExceptionpublic String getCSSClass()
public String getPrefix()
public String getSuffix()
public boolean isWrapped()
public boolean isColumnable(ContentContext ctx)
public int getColumnSize()
public void setColumnSize(String size)
public String getDataPath()
public Map<String,String> getList(ContentContext ctx, String listName, Locale locale)
getList in interface IFieldContainerpublic Map<String,String> getList(ContentContext ctx, String listName)
getList in interface IFieldContainerprotected String getInputName(String field)
getInputName in class AbstractVisualComponentpublic boolean isNotififyCreation(ContentContext ctx) throws ServiceException
ServiceExceptionpublic String getNotififyPageName(ContentContext ctx) throws ServiceException
ServiceExceptionprotected String drawColumn(int size)
protected String getInputNameColomn()
protected String getColumn(ContentContext ctx)
protected String getEditXHTMLCode(ContentContext ctx) throws Exception
getEditXHTMLCode in class AbstractVisualComponentExceptionpublic String getType()
IContentVisualComponentgetType in interface IContentVisualComponentpublic void storeProperties()
public String performEdit(ContentContext ctx) throws Exception
IContentVisualComponentperformEdit in interface IContentVisualComponentperformEdit in class AbstractVisualComponentExceptionpublic void setValue(String inContent)
IContentVisualComponentsetValue in interface IContentVisualComponentsetValue in class AbstractVisualComponentpublic String getHexColor()
IContentVisualComponentgetHexColor in interface IContentVisualComponentgetHexColor in class AbstractVisualComponentpublic StructuredProperties getProperties()
public void setProperties(StructuredProperties properties)
public void setConfigProperties(Properties properties)
public Properties getConfigProperties()
public IContentVisualComponent newInstance(ComponentBean bean, ContentContext newCtx, MenuElement page) throws Exception
IContentVisualComponentnewInstance in interface IContentVisualComponentnewInstance in class AbstractVisualComponentnewCtx - the context of the content manager.Exceptionpublic String getComponentLabel(ContentContext ctx, String lg)
IContentVisualComponentgetComponentLabel in interface IContentVisualComponentgetComponentLabel in class AbstractVisualComponentlg - language of the labelpublic String getKey()
IContentVisualComponentgetKey in interface IContentVisualComponentgetKey in class AbstractVisualComponentpublic boolean isRealContent(ContentContext ctx)
IContentVisualComponentisRealContent in interface IContentVisualComponentisRealContent in interface IFieldContainerisRealContent in class AbstractVisualComponentctx - current contextpublic boolean isContentCachable(ContentContext ctx)
IContentVisualComponentisContentCachable in interface IContentVisualComponentisContentCachable in class AbstractVisualComponentpublic boolean contains(ContentContext ctx, String uri)
IStaticContainercontains in interface IStaticContaineruri - a uri to a static resourcespublic Collection<Resource> getAllResources(ContentContext ctx)
IStaticContainergetAllResources in interface IStaticContainerpublic boolean renameResource(ContentContext ctx, File oldName, File newName)
IStaticContainerrenameResource in interface IStaticContainerpublic String getLabel(ContentContext ctx)
getLabel in interface IFieldContainerpublic boolean isContentTimeCachable(ContentContext ctx)
isContentTimeCachable in class AbstractVisualComponentpublic Collection<Link> getAllResourcesLinks(ContentContext ctx)
IStaticContainergetAllResourcesLinks in interface IStaticContainerpublic Date getDate(ContentContext ctx)
public boolean isValidDate(ContentContext ctx)
isValidDate in interface IDatepublic int getPopularity(ContentContext ctx)
IStaticContainergetPopularity in interface IStaticContainerpublic int contentHashCode()
public String getTextForSearch(ContentContext ctx)
IContentVisualComponentgetTextForSearch in interface IContentVisualComponentgetTextForSearch in class AbstractVisualComponentpublic boolean initContent(ContentContext ctx) throws Exception
IContentVisualComponentinitContent in interface IContentVisualComponentinitContent in class AbstractVisualComponentExceptionpublic void reload(ContentContext ctx) throws Exception
Exceptionpublic String getURL(ContentContext ctx) throws Exception
ILinkpublic boolean isLinkValid(ContentContext ctx) throws Exception
ILinkisLinkValid in interface ILinkExceptionprotected FieldImage getImageField(ContentContext ctx)
public String getImageDescription(ContentContext ctx)
getImageDescription in interface IImageTitlepublic String getResourceURL(ContentContext ctx)
getResourceURL in interface IImageTitlepublic String getImageLinkURL(ContentContext ctx)
getImageLinkURL in interface IImageTitlepublic boolean isImageValid(ContentContext ctx)
isImageValid in interface IImageTitlepublic int getLabelLevel(ContentContext ctx)
IContentVisualComponentgetLabelLevel in interface IContentVisualComponentgetLabelLevel in class AbstractVisualComponentpublic String getTextTitle(ContentContext ctx)
IContentVisualComponentgetTextTitle in interface IContentVisualComponentgetTextTitle in class AbstractVisualComponentpublic String getTextLabel(ContentContext ctx)
IContentVisualComponentgetTextLabel in interface IContentVisualComponentgetTextLabel in class AbstractVisualComponentpublic String getSpecificClass(ContentContext ctx)
AbstractVisualComponentgetSpecificClass in class AbstractVisualComponentpublic String getPageDescription(ContentContext ctx)
IContentVisualComponentgetPageDescription in interface IContentVisualComponentgetPageDescription in class AbstractVisualComponentpublic String getSubTitle(ContentContext ctx)
getSubTitle in interface ISubTitlepublic int getSubTitleLevel(ContentContext ctx)
getSubTitleLevel in interface ISubTitlepublic int getPriority(ContentContext ctx)
IImageTitlegetPriority in interface IImageTitlepublic boolean isFieldContainer(ContentContext ctx)
isFieldContainer in interface IFieldContainerpublic String getContainerType(ContentContext ctx)
getContainerType in interface IFieldContainerpublic String getXHTMLId(ContentContext ctx)
getXHTMLId in interface ISubTitlepublic String getDynamicId()
public void setDynamicId(String id)
public int getComplexityLevel(ContentContext ctx)
IContentVisualComponentgetComplexityLevel in interface IContentVisualComponentgetComplexityLevel in class AbstractVisualComponentctx - TODOpublic Map<String,Object> getContentAsMap(ContentContext ctx) throws Exception
getContentAsMap in interface IRestItemgetContentAsMap in class AbstractVisualComponentExceptionpublic List<File> getFiles(ContentContext ctx)
getFiles in interface IStaticContainerpublic String getDirSelected()
IStaticContainergetDirSelected in interface IStaticContainerpublic void setDirSelected(String dir)
IStaticContainersetDirSelected in interface IStaticContainerpublic void setLatestValidDate(Date date)
setLatestValidDate in interface ILinkpublic Date getLatestValidDate()
getLatestValidDate in interface ILinkpublic Collection<String> getExternalResources(ContentContext ctx)
IContentVisualComponentgetExternalResources in interface IContentVisualComponentgetExternalResources in class AbstractVisualComponentpublic boolean isRestMatch(ContentContext ctx, Map<String,String> params)
isRestMatch in interface IContentVisualComponentisRestMatch in class AbstractVisualComponentpublic String getFontAwesome()
getFontAwesome in interface IContentVisualComponentgetFontAwesome in class AbstractVisualComponentprotected boolean isAutoDeletable()
isAutoDeletable in class AbstractVisualComponentprotected boolean isValueTranslatable()
isValueTranslatable in class AbstractVisualComponentpublic boolean transflateFrom(ContentContext ctx, ITranslator translator, String lang)
IContentVisualComponenttransflateFrom in interface IContentVisualComponenttransflateFrom in class AbstractVisualComponentctx - contextContext of the current renderingtranslator - class to translatelang - the language of the current content (source language)Copyright © 2012-2018. All Rights Reserved.