public interface IContentVisualComponent extends Comparable<IContentVisualComponent>, IRestItem
Modifier and Type | Field and Description |
---|---|
static String |
COLORED_WRAPPER_CLASS |
static String |
COMP_ID_REQUEST_PARAM |
static int |
COMPLEXITY_ADMIN |
static int |
COMPLEXITY_EASY |
static int |
COMPLEXITY_STANDARD |
static String |
CONTAINER_COLOR |
static String |
DEFAULT_COLOR |
static String |
DYN_COMP_COLOR |
static String |
ECOM_COLOR |
static String |
EDIT_ACTION_CSS_CLASS |
static String |
GRAPHIC_COLOR |
static int |
HIGH_LABEL_LEVEL |
static String |
ID_SEPARATOR |
static String |
LINK_COLOR |
static int |
LOW_LABEL_LEVEL |
static String |
META_COLOR |
static int |
MIDDLE_LABEL_LEVEL |
static int |
SEARCH_LEVEL_HIGH |
static int |
SEARCH_LEVEL_LOW |
static int |
SEARCH_LEVEL_MIDDLE |
static int |
SEARCH_LEVEL_NONE |
static String |
TEXT_COLOR |
static String |
VIEW_DEFINITION_REQUEST_ID |
static String |
WEB2_COLOR |
Modifier and Type | Method and Description |
---|---|
void |
clearReplacement()
clear remplacement values
|
void |
delete(ContentContext ctx)
this method is called when component is deleted.
|
boolean |
equals(ContentContext ctx,
IContentVisualComponent comp)
check of component is considered as the same than an other.
|
List<String> |
extractFieldsFromRenderer(ContentContext ctx)
extract field define in the current renderer
|
String |
getArea()
get the area where the component must be rendered
|
String |
getAuthors()
authors of the component
|
String |
getClassName()
return the name of the class (use for JSTL)
|
int |
getComplexityLevel(ContentContext ctx)
return the complexity level of the component.
|
ComponentBean |
getComponentBean()
get the internal data
|
String |
getComponentCssClass(ContentContext ctx)
get the current style of the component.
|
String |
getComponentLabel(ContentContext ctx,
String lg)
return the label of the element.
|
ComponentConfig |
getConfig(ContentContext ctx)
get the configuration of the component. from project or from template.
|
GenericMessage |
getConfigMessage(ContentContext ctx)
warning message on config tab
|
String |
getContentAsText(ContentContext ctx)
get the text of the component
|
GenericMessage |
getContentMessage(ContentContext ctx)
warning message on content tab
|
String |
getContentName()
return the name if the content field (textarea...)
|
Date |
getCreationDate() |
String |
getCurrentRenderer(ContentContext ctx)
return the name of the renderer.
|
String |
getDescription(Locale local)
a description of the component;
|
String |
getEditText(ContentContext ctx,
String key)
get a internationalized text, in the languague of the edition.
|
String |
getEmptyXHTMLCode(ContentContext ctx)
return the code if component contain's no data.
|
String |
getErrorMessage(ContentContext ctx)
return error message on structure of the component.
|
String |
getErrorMessage(String fieldName)
return a error message in current view language
|
Collection<String> |
getExternalResources(ContentContext ctx)
return the external resources needed from component as css, javascript...
|
String |
getFirstPrefix(ContentContext ctx)
get the prefix must be insered before a list of the current component
(warning: one element is a list) #return XHTML code of prefix
|
String |
getFontAwesome() |
String |
getHeaderContent(ContentContext ctx)
return the part of header needed for this component
|
String |
getHelpURL(ContentContext ctx)
a url to descripe the usage of the component
|
String |
getHexColor()
get the exadecimal color for representation of the component.
|
List<String> |
getI18nEditableKeys(ContentContext ctx)
get i18n keys for edition
|
String |
getId()
return a unique id for the coponent
|
String |
getInputNameRenderer()
get the input name of the renderer.
|
String |
getJSOnSubmit()
return the java script code called when global form is submited.
|
String |
getKey()
get a unic key of the component.
|
int |
getLabelLevel(ContentContext ctx)
define the level of label.
|
String |
getLastSufix(ContentContext ctx)
get the sufix before must be insered after a list of the current
component.
|
ComponentLayout |
getLayout()
get a simple layout for the component.
|
String |
getListGroup()
return the name of group component.
|
List<SuffixPrefix> |
getMarkerList(ContentContext ctx)
return the title of the style choice.
|
GenericMessage |
getMessage()
get a message for the component.
|
Date |
getModificationDate() |
IContentVisualComponent |
getNextComponent()
return the next component in the page sequence.
|
MenuElement |
getPage()
get the page contains the component
|
String |
getPageDescription(ContentContext ctx)
return the description of the page if this component is or contains description.
|
String |
getPrefixViewXHTMLCode(ContentContext ctx)
code for prefix the view XHTML code.
|
IContentVisualComponent |
getPreviousComponent()
return the previous component in the page sequence.
|
String |
getRenderer(ContentContext ctx)
get the current renderer for the component view.
|
int |
getSearchLevel()
return the level of the component is a search.
|
String |
getSpecialTagTitle(ContentContext ctx) |
String |
getSpecialTagXHTML(ContentContext ctx) |
String |
getStyleLabel(ContentContext ctx)
get the label of the current style
|
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 |
getStyleTitle(ContentContext ctx)
return the title of the style choice.
|
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
|
GenericMessage |
getTextMessage(ContentContext ctx)
warning message on text tab
|
String |
getTextTitle(ContentContext ctx)
return a string representation of the component with complete title
|
int |
getTitleLevel(ContentContext ctx)
get the level of the title (1,2,3...). return 0 if the component is not a
title
|
String |
getType()
return the type of the element.
|
String |
getValue(ContentContext ctx)
get the value of the content without any rendering.
|
String |
getVersion()
return the version of the component : A.B.C A : major version, no
compatibility with the older data B : new function but compatibilty with
older data C : bug correction
|
String |
getViewText(ContentContext ctx,
String key)
get a internationalized text, in the languague of the view.
|
int |
getWordCount(ContentContext ctx)
count the word in the content.
|
String |
getXHTMLCode(ContentContext ctx)
the code for view the element in XHTML environment.
|
String |
getXHTMLConfig(ContentContext ctx)
xhtml code for config the component
|
boolean |
initContent(ContentContext ctx)
init the content with a default value. sample : "lorem ipsum" for text
component.
|
void |
insert(String text)
insert a text in the component
|
boolean |
isConfig(ContentContext ctx)
return true if there the component is configurable.
|
boolean |
isContentCachable(ContentContext ctx)
return the part of header needed for this component
|
boolean |
isDefaultValue(ContentContext ctx)
return true if value is never modified.
|
boolean |
isDispayEmptyXHTMLCode(ContentContext ctx)
display empty xhtml code if empty
|
boolean |
isDisplayable(ContentContext ctx)
true if the component can be displayed in preview mode
|
boolean |
isDisplayHidden()
is component displayed for visitor
|
boolean |
isEditOnCreate(ContentContext ctx)
return true if the component is directly edited when it is insered.
|
boolean |
isFirstRepeated()
return true if component is in the first repeat sequence of the page.
|
boolean |
isHelpURL(ContentContext ctx) |
boolean |
isHidden(ContentContext ctx)
true if component marked as hidden (in components.txt the class name
start with '.')
|
boolean |
isHiddenInMode(int mode)
component can be hidded in some mode, like view or preview.
|
boolean |
isInline()
check if the component can be inserd inline.
|
boolean |
isInsertable()
you can insert a text in this component
|
boolean |
isList(ContentContext ctx)
true if the component is in a list
|
boolean |
isListable()
you display the composant as a list (if you want)
|
boolean |
isMetaTitle()
return true is this component is a title of a group of component.
|
boolean |
isMirroredByDefault(ContentContext ctx)
if this component is duplicated, by default it is mirrored.
|
boolean |
isModify() |
boolean |
isNeedRefresh()
return true if the modifition of the component need a refresh of the edit
page (ajax).
|
boolean |
isNew(ContentContext ctx)
check if this component has maked has new in the current request
|
boolean |
isNolink() |
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 |
isRepeat() |
boolean |
isRepeatable() |
boolean |
isRestMatch(ContentContext ctx,
Map<String,String> params) |
boolean |
isUnique()
return true if the component must be unique on a page
|
boolean |
isVisible() |
boolean |
isVisible(ContentContext ctx)
check if this element is visible in the format.
|
boolean |
isVisibleFromCookies(ContentContext ctx)
visible or no, depend of the choice of visitor with cookies
|
void |
loadViewData(ContentContext ctx)
load special data file.
|
void |
markAsNew(ContentContext ctx)
mark component as new in the current request
|
IContentVisualComponent |
newInstance(ComponentBean bean,
ContentContext newCtx,
MenuElement page)
init the component, do that before all using.
|
IContentVisualComponent |
next()
get the next component on the page. if null this is the last component.
|
String |
performConfig(ContentContext ctx)
action to manage the config, call when global content form is saved.
|
String |
performEdit(ContentContext ctx)
action call when update the content page.
|
IContentVisualComponent |
previous()
get the next component on the page. if null this is the last component.
|
void |
replaceAllInContent(Map<String,String> replacement)
add a list of remplacement key, value
|
void |
replaceInContent(String source,
String target)
replace a content in visual element
|
void |
resetViewData(ContentContext ctx)
reset the view data.
|
void |
setContainerPage(ContentContext ctx,
MenuElement page)
set the page of a container (page mirror, component mirror).
|
void |
setDisplayHidden(boolean hidden)
hide component in display mode
|
void |
setList(boolean inList)
put the component is a list
|
void |
setNeedRefresh(boolean needRefresh)
if you set true the page is refresh after update
|
void |
setNextComponent(IContentVisualComponent nextComponent)
change the previous component
|
void |
setPage(MenuElement inPage) |
void |
setPreviousComponent(IContentVisualComponent nextComponent)
change the previous component
|
void |
setRenderer(ContentContext ctx,
String renderer)
set the current renderer for the component view.
|
void |
setRepeat(boolean newRepeat) |
void |
setStyle(ContentContext ctx,
String inStyle)
set the current style of the component.
|
void |
setValid(boolean inVisible) |
void |
setValue(String inContent)
set the content without rendering
|
void |
stored()
call this method when the component is stored.
|
boolean |
transflateFrom(ContentContext ctx,
ITranslator translator,
String lang)
translate the content of the component to the current language
|
compareTo
getContentAsMap
static final String ID_SEPARATOR
static final String VIEW_DEFINITION_REQUEST_ID
static final String COMP_ID_REQUEST_PARAM
static final String EDIT_ACTION_CSS_CLASS
static final int SEARCH_LEVEL_NONE
static final int SEARCH_LEVEL_LOW
static final int SEARCH_LEVEL_MIDDLE
static final int SEARCH_LEVEL_HIGH
static final int COMPLEXITY_EASY
static final int COMPLEXITY_STANDARD
static final int COMPLEXITY_ADMIN
static final String DEFAULT_COLOR
static final String TEXT_COLOR
static final String LINK_COLOR
static final String META_COLOR
static final String GRAPHIC_COLOR
static final String ECOM_COLOR
static final String DYN_COMP_COLOR
static final String WEB2_COLOR
static final String CONTAINER_COLOR
static final String COLORED_WRAPPER_CLASS
static final int HIGH_LABEL_LEVEL
static final int MIDDLE_LABEL_LEVEL
static final int LOW_LABEL_LEVEL
ComponentConfig getConfig(ContentContext ctx)
ctx
- String performEdit(ContentContext ctx) throws Exception
Exception
String getXHTMLCode(ContentContext ctx) throws Exception
Exception
boolean isDisplayable(ContentContext ctx) throws Exception
ctx
- Exception
boolean isDispayEmptyXHTMLCode(ContentContext ctx) throws Exception
ctx
- Exception
String getEmptyXHTMLCode(ContentContext ctx) throws Exception
Exception
String getXHTMLConfig(ContentContext ctx) throws Exception
Exception
boolean isConfig(ContentContext ctx)
ctx
- String performConfig(ContentContext ctx) throws Exception
ctx
- Exception
String getValue(ContentContext ctx)
void setValue(String inContent)
inContent
- String getType()
String getComponentLabel(ContentContext ctx, String lg)
lg
- language of the labelint getTitleLevel(ContentContext ctx)
boolean isVisible(ContentContext ctx)
boolean isVisibleFromCookies(ContentContext ctx)
ctx
- String getId()
IContentVisualComponent newInstance(ComponentBean bean, ContentContext newCtx, MenuElement page) throws Exception
newContent
- the content of the componentnewId
- the id of the componentnewCtx
- the context of the content manager.Exception
boolean isModify()
boolean isUnique()
boolean isRealContent(ContentContext ctx)
ctx
- current contextboolean isDefaultValue(ContentContext ctx)
void stored()
String getViewText(ContentContext ctx, String key) throws ResourceNotFoundException
key
- the key of the textResourceNotFoundException
String getEditText(ContentContext ctx, String key)
key
- the key of the textString getErrorMessage(String fieldName) throws ResourceNotFoundException
key
- the of the error messageResourceNotFoundException
ComponentBean getComponentBean()
String getTextLabel(ContentContext ctx)
String getTextTitle(ContentContext ctx)
boolean isRepeat()
void setRepeat(boolean newRepeat)
int getLabelLevel(ContentContext ctx)
ctx
- String getJSOnSubmit()
List<String> extractFieldsFromRenderer(ContentContext ctx) throws IOException
ctx
- IOException
String getTextForSearch(ContentContext ctx)
int getSearchLevel()
String getStyleTitle(ContentContext ctx)
String[] getStyleList(ContentContext ctx)
String[] getStyleLabelList(ContentContext ctx)
List<SuffixPrefix> getMarkerList(ContentContext ctx)
String getComponentCssClass(ContentContext ctx)
String getStyleLabel(ContentContext ctx)
ctx
- void setStyle(ContentContext ctx, String inStyle)
inStyle
- new stylevoid setRenderer(ContentContext ctx, String renderer)
a
- key to a renderer (defined in config file of the component)String getRenderer(ContentContext ctx)
a
- key to a renderer (defined in config file of the component)String getCurrentRenderer(ContentContext ctx)
ctx
- String getPrefixViewXHTMLCode(ContentContext ctx)
String getInputNameRenderer()
String getSuffixViewXHTMLCode(ContentContext ctx)
String getContentName()
boolean isInline()
IContentVisualComponent next()
IContentVisualComponent previous()
void setNextComponent(IContentVisualComponent nextComponent)
nextComponent
- void setPreviousComponent(IContentVisualComponent nextComponent)
nextComponent
- String getFirstPrefix(ContentContext ctx)
String getLastSufix(ContentContext ctx)
String getHexColor()
GenericMessage getMessage()
boolean isInsertable()
boolean isListable()
void insert(String text)
text
- the text to be inseredboolean isList(ContentContext ctx)
void setList(boolean inList)
inList
- true for put in a list, false for remove from a listboolean isNeedRefresh()
boolean isVisible()
boolean isRepeatable()
void setValid(boolean inVisible)
String getArea()
String getHelpURL(ContentContext ctx)
lang
- the langage of the edit interfaceboolean isHelpURL(ContentContext ctx)
void setNeedRefresh(boolean needRefresh)
needRefresh
- void resetViewData(ContentContext ctx) throws IOException
IOException
void replaceInContent(String source, String target)
source
- the source element (sample. : test)target
- the target element (sample. : -- test --)void replaceAllInContent(Map<String,String> replacement)
replacement
- void clearReplacement()
int getComplexityLevel(ContentContext ctx)
ctx
- TODOboolean isHidden(ContentContext ctx)
MenuElement getPage()
void delete(ContentContext ctx)
IContentVisualComponent getNextComponent()
IContentVisualComponent getPreviousComponent()
boolean isFirstRepeated()
Collection<String> getExternalResources(ContentContext ctx)
String getHeaderContent(ContentContext ctx)
boolean isContentCachable(ContentContext ctx)
void loadViewData(ContentContext ctx) throws IOException
ctx
- IOException
List<String> getI18nEditableKeys(ContentContext ctx)
ctx
- String getKey()
int getWordCount(ContentContext ctx)
boolean isMetaTitle()
String getClassName()
String getVersion()
String getAuthors()
boolean initContent(ContentContext ctx) throws Exception
ctx
- Exception
Date getCreationDate()
Date getModificationDate()
void setPage(MenuElement inPage)
String getSpecialTagTitle(ContentContext ctx) throws Exception
Exception
String getSpecialTagXHTML(ContentContext ctx) throws Exception
Exception
ComponentLayout getLayout()
boolean equals(ContentContext ctx, IContentVisualComponent comp)
ctx
- comp
- String getPageDescription(ContentContext ctx)
String getListGroup()
GenericMessage getContentMessage(ContentContext ctx)
ctx
- GenericMessage getTextMessage(ContentContext ctx)
ctx
- GenericMessage getConfigMessage(ContentContext ctx)
ctx
- void markAsNew(ContentContext ctx)
ctx
- boolean isNew(ContentContext ctx)
ctx
- boolean isEditOnCreate(ContentContext ctx)
ctx
- boolean isNolink()
boolean isMirroredByDefault(ContentContext ctx)
void setContainerPage(ContentContext ctx, MenuElement page)
ctx
- page
- String getContentAsText(ContentContext ctx)
boolean isHiddenInMode(int mode)
mode
- void setDisplayHidden(boolean hidden)
hidden
- boolean isDisplayHidden()
String getErrorMessage(ContentContext ctx)
boolean isRestMatch(ContentContext ctx, Map<String,String> params)
String getFontAwesome()
boolean transflateFrom(ContentContext ctx, ITranslator translator, String lang)
ctx
- contextContext of the current renderingtranslator
- class to translatelang
- the language of the current content (source language)Copyright © 2012-2018. All Rights Reserved.