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_SEPARATOR
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
NO_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, textToXHTML
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPage
clearReplacement, 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, stored
compareTo
public static final String JSP_HEADER
public static final String HIDDEN
protected static Logger logger
public void prepareView(ContentContext ctx) throws Exception
AbstractVisualComponent
prepareView
in class AbstractVisualComponent
Exception
public String[] getStyleList(ContentContext ctx)
IContentVisualComponent
getStyleList
in interface IContentVisualComponent
getStyleList
in class AbstractVisualComponent
public String[] getStyleLabelList(ContentContext ctx)
IContentVisualComponent
getStyleLabelList
in interface IContentVisualComponent
getStyleLabelList
in class AbstractVisualComponent
public void init(ComponentBean bean, ContentContext newContext) throws Exception
init
in class AbstractVisualComponent
Exception
public void reloadProperties()
public String getPrefixViewXHTMLCode(ContentContext ctx)
IContentVisualComponent
getPrefixViewXHTMLCode
in interface IContentVisualComponent
getPrefixViewXHTMLCode
in class AbstractVisualComponent
public String getSuffixViewXHTMLCode(ContentContext ctx)
IContentVisualComponent
getSuffixViewXHTMLCode
in interface IContentVisualComponent
getSuffixViewXHTMLCode
in class AbstractVisualComponent
public String getViewListXHTMLCode(ContentContext ctx) throws Exception
getViewListXHTMLCode
in interface IFieldContainer
Exception
public String getViewXHTMLCode(ContentContext ctx) throws Exception
getViewXHTMLCode
in interface IFieldContainer
getViewXHTMLCode
in class AbstractVisualComponent
Exception
org.javlo.itf.IContentVisualComponent#getXHTMLCode()
public String getViewXHTMLCode(ContentContext ctx, boolean asList) throws Exception
Exception
public List<String> getFieldsNames(ContentContext ctx)
getFieldsNames
in interface IFieldContainer
public List<Field> getFields(ContentContext ctx) throws Exception
getFields
in interface IFieldContainer
Exception
public Field getField(ContentContext ctx, String name) throws Exception
getField
in interface IFieldContainer
Exception
public String getFieldValue(ContentContext ctx, String name) throws Exception
getFieldValue
in interface IFieldContainer
Exception
public 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 IFieldContainer
public Map<String,String> getList(ContentContext ctx, String listName)
getList
in interface IFieldContainer
protected String getInputName(String field)
getInputName
in class AbstractVisualComponent
public boolean isNotififyCreation(ContentContext ctx) throws ServiceException
ServiceException
public String getNotififyPageName(ContentContext ctx) throws ServiceException
ServiceException
protected String drawColumn(int size)
protected String getInputNameColomn()
protected String getColumn(ContentContext ctx)
protected String getEditXHTMLCode(ContentContext ctx) throws Exception
getEditXHTMLCode
in class AbstractVisualComponent
Exception
public String getType()
IContentVisualComponent
getType
in interface IContentVisualComponent
public void storeProperties()
public String performEdit(ContentContext ctx) throws Exception
IContentVisualComponent
performEdit
in interface IContentVisualComponent
performEdit
in class AbstractVisualComponent
Exception
public void setValue(String inContent)
IContentVisualComponent
setValue
in interface IContentVisualComponent
setValue
in class AbstractVisualComponent
public String getHexColor()
IContentVisualComponent
getHexColor
in interface IContentVisualComponent
getHexColor
in class AbstractVisualComponent
public 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
IContentVisualComponent
newInstance
in interface IContentVisualComponent
newInstance
in class AbstractVisualComponent
newCtx
- the context of the content manager.Exception
public String getComponentLabel(ContentContext ctx, String lg)
IContentVisualComponent
getComponentLabel
in interface IContentVisualComponent
getComponentLabel
in class AbstractVisualComponent
lg
- language of the labelpublic String getKey()
IContentVisualComponent
getKey
in interface IContentVisualComponent
getKey
in class AbstractVisualComponent
public boolean isRealContent(ContentContext ctx)
IContentVisualComponent
isRealContent
in interface IContentVisualComponent
isRealContent
in interface IFieldContainer
isRealContent
in class AbstractVisualComponent
ctx
- current contextpublic boolean isContentCachable(ContentContext ctx)
IContentVisualComponent
isContentCachable
in interface IContentVisualComponent
isContentCachable
in class AbstractVisualComponent
public boolean contains(ContentContext ctx, String uri)
IStaticContainer
contains
in interface IStaticContainer
uri
- a uri to a static resourcespublic Collection<Resource> getAllResources(ContentContext ctx)
IStaticContainer
getAllResources
in interface IStaticContainer
public boolean renameResource(ContentContext ctx, File oldName, File newName)
IStaticContainer
renameResource
in interface IStaticContainer
public String getLabel(ContentContext ctx)
getLabel
in interface IFieldContainer
public boolean isContentTimeCachable(ContentContext ctx)
isContentTimeCachable
in class AbstractVisualComponent
public Collection<Link> getAllResourcesLinks(ContentContext ctx)
IStaticContainer
getAllResourcesLinks
in interface IStaticContainer
public Date getDate(ContentContext ctx)
public boolean isValidDate(ContentContext ctx)
isValidDate
in interface IDate
public int getPopularity(ContentContext ctx)
IStaticContainer
getPopularity
in interface IStaticContainer
public int contentHashCode()
public String getTextForSearch(ContentContext ctx)
IContentVisualComponent
getTextForSearch
in interface IContentVisualComponent
getTextForSearch
in class AbstractVisualComponent
public boolean initContent(ContentContext ctx) throws Exception
IContentVisualComponent
initContent
in interface IContentVisualComponent
initContent
in class AbstractVisualComponent
Exception
public void reload(ContentContext ctx) throws Exception
Exception
public String getURL(ContentContext ctx) throws Exception
ILink
public boolean isLinkValid(ContentContext ctx) throws Exception
ILink
isLinkValid
in interface ILink
Exception
protected FieldImage getImageField(ContentContext ctx)
public String getImageDescription(ContentContext ctx)
getImageDescription
in interface IImageTitle
public String getResourceURL(ContentContext ctx)
getResourceURL
in interface IImageTitle
public String getImageLinkURL(ContentContext ctx)
getImageLinkURL
in interface IImageTitle
public boolean isImageValid(ContentContext ctx)
isImageValid
in interface IImageTitle
public int getLabelLevel(ContentContext ctx)
IContentVisualComponent
getLabelLevel
in interface IContentVisualComponent
getLabelLevel
in class AbstractVisualComponent
public String getTextTitle(ContentContext ctx)
IContentVisualComponent
getTextTitle
in interface IContentVisualComponent
getTextTitle
in class AbstractVisualComponent
public String getTextLabel(ContentContext ctx)
IContentVisualComponent
getTextLabel
in interface IContentVisualComponent
getTextLabel
in class AbstractVisualComponent
public String getSpecificClass(ContentContext ctx)
AbstractVisualComponent
getSpecificClass
in class AbstractVisualComponent
public String getPageDescription(ContentContext ctx)
IContentVisualComponent
getPageDescription
in interface IContentVisualComponent
getPageDescription
in class AbstractVisualComponent
public String getSubTitle(ContentContext ctx)
getSubTitle
in interface ISubTitle
public int getSubTitleLevel(ContentContext ctx)
getSubTitleLevel
in interface ISubTitle
public int getPriority(ContentContext ctx)
IImageTitle
getPriority
in interface IImageTitle
public boolean isFieldContainer(ContentContext ctx)
isFieldContainer
in interface IFieldContainer
public String getContainerType(ContentContext ctx)
getContainerType
in interface IFieldContainer
public String getXHTMLId(ContentContext ctx)
getXHTMLId
in interface ISubTitle
public String getDynamicId()
public void setDynamicId(String id)
public int getComplexityLevel(ContentContext ctx)
IContentVisualComponent
getComplexityLevel
in interface IContentVisualComponent
getComplexityLevel
in class AbstractVisualComponent
ctx
- TODOpublic Map<String,Object> getContentAsMap(ContentContext ctx) throws Exception
getContentAsMap
in interface IRestItem
getContentAsMap
in class AbstractVisualComponent
Exception
public List<File> getFiles(ContentContext ctx)
getFiles
in interface IStaticContainer
public String getDirSelected()
IStaticContainer
getDirSelected
in interface IStaticContainer
public void setDirSelected(String dir)
IStaticContainer
setDirSelected
in interface IStaticContainer
public void setLatestValidDate(Date date)
setLatestValidDate
in interface ILink
public Date getLatestValidDate()
getLatestValidDate
in interface ILink
public Collection<String> getExternalResources(ContentContext ctx)
IContentVisualComponent
getExternalResources
in interface IContentVisualComponent
getExternalResources
in class AbstractVisualComponent
public boolean isRestMatch(ContentContext ctx, Map<String,String> params)
isRestMatch
in interface IContentVisualComponent
isRestMatch
in class AbstractVisualComponent
public String getFontAwesome()
getFontAwesome
in interface IContentVisualComponent
getFontAwesome
in class AbstractVisualComponent
protected boolean isAutoDeletable()
isAutoDeletable
in class AbstractVisualComponent
protected boolean isValueTranslatable()
isValueTranslatable
in class AbstractVisualComponent
public boolean transflateFrom(ContentContext ctx, ITranslator translator, String lang)
IContentVisualComponent
transflateFrom
in interface IContentVisualComponent
transflateFrom
in class AbstractVisualComponent
ctx
- contextContext of the current renderingtranslator
- class to translatelang
- the language of the current content (source language)Copyright © 2012-2018. All Rights Reserved.