public abstract class AbstractVisualComponent extends Object implements IContentVisualComponent
String
compid : the id of the components. See getId()
String
compPage : a page bean of the page contain's the
component.String
value : the raw value of the component. See
getValue()
String
type : the component type. See IContentVisualComponent.getType()
String
layout : the layout of the component is css (can be null).
STring
componentWidth : the width of component forced by
contributor (if component manage it)
String
style : the style selected for the component. See
String
previewAttributes : a string with attribute for preview
edition (class and data attribute).getComponentCssClass(ContentContext)
Modifier and Type | Field and Description |
---|---|
static String |
CACHE_KEY_SUFFIX_PARAM_NAME |
static String |
COMPONENT_KEY |
protected ComponentConfig |
config |
protected static String |
EDIT_CLASS |
static String |
FORCE_COMPONENT_ID |
static String |
HIDDEN |
static String |
I18N_FILE |
static Logger |
logger |
static String |
NOT_EDIT_PREVIEW_PARAM_NAME |
static String |
SCROLL_TO_COMP_ID_ATTRIBUTE_NAME |
static String |
TIME_CACHE_NAME |
protected static String |
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
Constructor and Description |
---|
AbstractVisualComponent() |
Modifier and Type | Method and Description |
---|---|
protected String |
applyReplacement(String content) |
protected String |
cleanValue(ContentContext ctx,
String value) |
void |
clearReplacement()
clear remplacement values
|
protected Object |
clone() |
int |
compareTo(IContentVisualComponent comp) |
protected String |
contructViewStyle(ContentContext ctx) |
protected int |
countLine() |
void |
delete(ContentContext ctx)
this method is called when component is deleted.
|
protected void |
deleteMySelf(ContentContext ctx) |
boolean |
equals(ContentContext ctx,
IContentVisualComponent comp)
check of component is considered as the same than an other.
|
boolean |
equals(Object obj) |
protected String |
executeCurrentRenderer(ContentContext ctx) |
protected String |
executeJSP(ContentContext ctx,
String jsp) |
protected String |
executeRenderer(ContentContext ctx) |
protected String |
executeRenderer(ContentContext ctx,
String url) |
List<String> |
extractFieldsFromRenderer(ContentContext ctx)
extract field define in the current renderer
|
String |
getAjaxId() |
String |
getArea()
get the area where the component must be rendered
|
String |
getAuthors()
authors of the component
|
String |
getBackgroundColor() |
protected String |
getBaseHelpURL(ContentContext ctx) |
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
|
protected String |
getComponentCSS(javax.servlet.ServletContext application,
String css) |
String |
getComponentCssClass(ContentContext ctx)
get the current style of the component.
|
static String |
getComponentId(javax.servlet.http.HttpServletRequest request) |
String |
getComponentLabel(ContentContext ctx,
String lg)
return the label of the element.
|
protected String |
getComponentPath()
the the localisation of the JSP files in the "component" directory in
webapps. normaly this localisation is the name of the component direcoty
in the src.
|
ComponentConfig |
getConfig(ContentContext ctx)
get the configuration of the component. from project or from template.
|
GenericMessage |
getConfigMessage(ContentContext ctx)
warning message on config tab
|
MenuElement |
getContainerPage(ContentContext ctx)
get the page of the container if component is mirrored else get the page
of the component.
|
Map<String,Object> |
getContentAsMap(ContentContext ctx) |
String |
getContentAsText(ContentContext ctx)
get the text of the component
|
String |
getContentCache(ContentContext ctx) |
GenericMessage |
getContentMessage(ContentContext ctx)
warning message on content tab
|
String |
getContentName()
get the XHTML input field name for the content
|
String |
getContentTimeCache(ContentContext ctx) |
int |
getCookiesDisplayStatus() |
Date |
getCreationDate() |
protected String |
getCSSStyle(ContentContext ctx) |
MenuElement |
getCurrentPage(ContentContext ctx,
boolean componentPage)
get the current page
|
String |
getCurrentRenderer(ContentContext ctx)
get current renderer key
|
String |
getDebugHeader(ContentContext ctx) |
protected String |
getDefaultHelpURI(ContentContext ctx) |
String |
getDefaultRenderer(ContentContext ctx) |
protected Date |
getDeleteDate(ContentContext ctx) |
String |
getDescription(Locale local)
a description of the component;
|
protected String |
getDisplayAsInputName() |
String |
getDisplayMessage() |
protected String |
getEditorComplexity(ContentContext ctx)
return the wysiwyg editor complexity
|
String |
getEditText(ContentContext ctx,
String key)
get a internationalized text, in the languague of the edition.
|
protected String |
getEditXHTMLCode(ContentContext ctx) |
protected String |
getEmptyCode(ContentContext ctx) |
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() |
protected String |
getForcedId(ContentContext ctx) |
protected String |
getForcedPrefixViewXHTMLCode(ContentContext ctx) |
protected String |
getForcedSuffixViewXHTMLCode(ContentContext ctx) |
String |
getFormName() |
String |
getHeaderContent(ContentContext ctx)
return the part of header needed for this component
|
protected String |
getHelpType() |
protected String |
getHelpURI(ContentContext ctx) |
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 |
getImportFolderPath(ContentContext ctx) |
static String |
getImportFolderPath(ContentContext ctx,
MenuElement page) |
protected String |
getInlineStyle(ContentContext ctx) |
protected String |
getInputName(String field) |
String |
getInputNameRenderer()
get the input name of the renderer.
|
String |
getInputNameRendererTitle() |
List<SuffixPrefix> |
getItalicAndStrongLanguageMarkerList(ContentContext ctx) |
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.
|
protected String |
getListClass(ContentContext ctx) |
String |
getListGroup()
return the name of group component.
|
protected String |
getListItemTag(ContentContext ctx) |
protected String |
getListTag(ContentContext ctx) |
protected Object |
getLock(ContentContext ctx) |
List<SuffixPrefix> |
getMarkerList(ContentContext ctx)
return the title of the style choice.
|
GenericMessage |
getMessage()
get a message for the component.
|
static MirrorComponent |
getMirrorWrapper(ContentContext ctx,
IContentVisualComponent comp) |
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.
|
protected String |
getPreviewAttributes(ContentContext ctx) |
protected String |
getPreviewCssClass(ContentContext ctx,
String currentClass) |
String |
getPreviewCssId(ContentContext ctx) |
IContentVisualComponent |
getPreviousComponent()
return the previous component in the page sequence.
|
List<SuffixPrefix> |
getQuotationLanguageMarkerList(ContentContext ctx) |
Map<String,String> |
getRemplacement() |
String |
getRenderer(ContentContext ctx)
get current renderer file.
|
protected String |
getRendererTitle() |
Map<String,String> |
getRenderes(ContentContext ctx) |
static IContentVisualComponent |
getRequestComponent(javax.servlet.http.HttpServletRequest request)
get a component in the request if there are.
|
int |
getSearchLevel()
return the level of the component is a search.
|
protected String |
getSelectRendererXHTML(ContentContext ctx,
boolean justDisplay) |
protected String |
getSpecialInputTag()
create technical input tag. sample : for know the type of component with
only the
request |
protected String |
getSpecialPreviewCssClass(ContentContext ctx,
String currentClass) |
String |
getSpecialPreviewCssId(ContentContext ctx) |
String |
getSpecialTagTitle(ContentContext ctx) |
String |
getSpecialTagXHTML(ContentContext ctx) |
String |
getSpecificClass(ContentContext ctx)
override this method for add specific class to prefix.
|
String |
getStyle() |
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.
|
protected String |
getTag(ContentContext ctx) |
String |
getTextColor() |
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
|
protected String |
getTypeInputName() |
String |
getValue() |
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
|
Properties |
getViewData(ContentContext ctx) |
protected File |
getViewDataFile(ContentContext ctx) |
protected String |
getViewID(ContentContext ctx) |
String |
getViewText(ContentContext ctx,
String key)
get a internationalized text, in the languague of the view.
|
String |
getViewXHTMLCode(ContentContext ctx) |
String |
getWidth() |
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 |
haveRight(ContentContext ctx,
String action) |
protected void |
includeComponentJSP(ContentContext ctx,
String jsp) |
protected void |
includePage(ContentContext ctx,
String jsp) |
protected void |
init() |
protected void |
init(ComponentBean bean,
ContentContext ctx) |
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 |
isAjaxWrapper(ContentContext ctx) |
boolean |
isAskWidth(ContentContext ctx) |
protected boolean |
isAutoDeletable() |
protected boolean |
isAutoRenderer()
return true if end user could not select the renderer.
|
boolean |
isBackgroundColored() |
protected boolean |
isCanAddClass() |
boolean |
isColored() |
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 |
isContentCachableByQuery(ContentContext ctx) |
boolean |
isContentTimeCachable(ContentContext ctx) |
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.
|
protected boolean |
isFirstElementOfRepeatSequence(ContentContext ctx) |
boolean |
isFirstRepeated()
return true if component is in the first repeat sequence of the page.
|
protected boolean |
isFreeInputLayout() |
boolean |
isHelpURL(ContentContext ctx) |
protected boolean |
isHiddable() |
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.
|
static boolean |
isMirrorWrapped(ContentContext ctx,
IContentVisualComponent comp) |
boolean |
isModify() |
protected boolean |
isNeedDelete(ContentContext ctx) |
boolean |
isNeedRefresh()
return true if the modifition of the component need a refresh of the edit
page (ajax).
|
protected boolean |
isNeedRenderer()
return true if this component need renderer from template.
|
boolean |
isNew(ContentContext ctx)
check if this component has maked has new in the current request
|
boolean |
isNextSame()
return true if the next component have the same type.
|
boolean |
isNextSame(ContentContext ctx) |
boolean |
isNolink() |
boolean |
isNoLinkable() |
boolean |
isPreviousSame()
return true if the previous component have the same type.
|
boolean |
isPreviousSame(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 |
isRepeat() |
boolean |
isRepeatable() |
boolean |
isRestMatch(ContentContext ctx,
Map<String,String> params) |
boolean |
isReversedLink(ContentContext ctx) |
boolean |
isUnique()
return true if the component must be unique on a page
|
boolean |
isValueProperties()
if content of the component is a list of properties (key=value) this
method must return true.
|
protected boolean |
isValueTranslatable() |
protected boolean |
isViewDataFile(ContentContext ctx) |
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
|
protected boolean |
isWrapped(ContentContext ctx) |
protected boolean |
isXML() |
void |
loadViewData(ContentContext ctx)
load special data file.
|
static void |
main(String[] args) |
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.
|
protected void |
onStyleChange(ContentContext ctx) |
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.
|
void |
performUpdate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
prepareView(ContentContext ctx)
prepare the rendering of a component. default attributes put in request :
style, value, type, compid
|
IContentVisualComponent |
previous()
get the next component on the page. if null this is the last component.
|
protected String |
processView(ContentContext ctx)
prepare the rendering of the page.
|
protected String |
renderViewXHTMLCode(ContentContext ctx) |
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 |
resetContentCache(ContentContext ctx) |
void |
resetViewData(ContentContext ctx)
reset the view data.
|
void |
setBackgroundColor(String bgcol) |
void |
setComponentBean(ComponentBean componentBean) |
void |
setContainerPage(ContentContext ctx,
MenuElement page)
set the page of a container (page mirror, component mirror).
|
void |
setContentCache(ContentContext ctx,
String contentCache) |
void |
setContentTimeCache(ContentContext ctx,
String contentCache) |
void |
setDisplayHidden(boolean hidden)
hide component in display mode
|
protected static void |
setForcedId(ContentContext ctx,
String id) |
void |
setHidden(boolean hidden) |
void |
setHiddenInMode(int mode,
boolean hidden) |
void |
setList(boolean inList)
put the component is a list
|
void |
setMessage(GenericMessage inMsg) |
static void |
setMirrorWrapped(ContentContext ctx,
IContentVisualComponent comp,
MirrorComponent mirror) |
void |
setModify() |
void |
setNeedRefresh(boolean needRefresh)
if you set true the page is refresh after update
|
void |
setNextComponent(IContentVisualComponent nextComponent)
change the previous component
|
void |
setNolink(boolean noLink) |
void |
setPage(MenuElement inPage) |
void |
setPreviousComponent(IContentVisualComponent previousComponent)
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 |
setTextColor(String textcol) |
void |
setValid(boolean inVisible) |
void |
setValue(String inContent)
set the content without rendering
|
void |
setWidth(String width) |
void |
stored()
call this method when the component is stored.
|
void |
storeViewData(ContentContext ctx) |
Reader |
stringToReader(String str) |
Reader |
stringToReader(String str,
String encoding) |
InputStream |
stringToStream(String str) |
String |
textToXHTML(String text)
Deprecated.
use XHTMLHelper.textToXHTML(String text)
|
boolean |
transflateFrom(ContentContext ctx,
ITranslator translator,
String lang)
translate the content of the component to the current language
|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getType
public static final String SCROLL_TO_COMP_ID_ATTRIBUTE_NAME
public static final String NOT_EDIT_PREVIEW_PARAM_NAME
public static final String CACHE_KEY_SUFFIX_PARAM_NAME
protected static final String EDIT_CLASS
public static Logger logger
public static final String COMPONENT_KEY
public static final String I18N_FILE
public static final String TIME_CACHE_NAME
protected static final String VALUE_SEPARATOR
public static final String HIDDEN
public static final String FORCE_COMPONENT_ID
protected ComponentConfig config
public static final String getComponentId(javax.servlet.http.HttpServletRequest request)
public static final IContentVisualComponent getRequestComponent(javax.servlet.http.HttpServletRequest request)
request
- the HTTP requestprotected void deleteMySelf(ContentContext ctx) throws Exception
Exception
public void clearReplacement()
IContentVisualComponent
clearReplacement
in interface IContentVisualComponent
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Object.clone()
protected int countLine()
public void delete(ContentContext ctx)
IContentVisualComponent
delete
in interface IContentVisualComponent
protected String executeJSP(ContentContext ctx, String jsp) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
protected String executeRenderer(ContentContext ctx) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
public String getArea()
IContentVisualComponent
getArea
in interface IContentVisualComponent
protected String getBaseHelpURL(ContentContext ctx)
public boolean isHelpURL(ContentContext ctx)
isHelpURL
in interface IContentVisualComponent
public int getComplexityLevel(ContentContext ctx)
IContentVisualComponent
getComplexityLevel
in interface IContentVisualComponent
ctx
- TODOpublic ComponentBean getComponentBean()
IContentVisualComponent
getComponentBean
in interface IContentVisualComponent
protected String getComponentCSS(javax.servlet.ServletContext application, String css) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
public String getComponentLabel(ContentContext ctx, String lg)
IContentVisualComponent
getComponentLabel
in interface IContentVisualComponent
lg
- language of the labelprotected String getComponentPath()
public ComponentConfig getConfig(ContentContext ctx)
IContentVisualComponent
getConfig
in interface IContentVisualComponent
public String getContentTimeCache(ContentContext ctx)
public String getContentName()
getContentName
in interface IContentVisualComponent
public String getContentCache(ContentContext ctx)
public MenuElement getCurrentPage(ContentContext ctx, boolean componentPage) throws Exception
componentPage
- if true return the page of the component, if false return the
current page (in case of repeat component)Exception
public String getCurrentRenderer(ContentContext ctx)
getCurrentRenderer
in interface IContentVisualComponent
public List<String> extractFieldsFromRenderer(ContentContext ctx) throws IOException
IContentVisualComponent
extractFieldsFromRenderer
in interface IContentVisualComponent
IOException
public String getDebugHeader(ContentContext ctx)
protected String getEditorComplexity(ContentContext ctx)
public String getEditText(ContentContext ctx, String key)
IContentVisualComponent
getEditText
in interface IContentVisualComponent
key
- the key of the textprotected String getEditXHTMLCode(ContentContext ctx) throws Exception
Exception
public boolean isAskWidth(ContentContext ctx)
public String getWidth()
public void setWidth(String width)
protected boolean isFreeInputLayout()
protected boolean isAutoDeletable()
public String getXHTMLConfig(ContentContext ctx) throws Exception
IContentVisualComponent
getXHTMLConfig
in interface IContentVisualComponent
Exception
protected boolean isHiddable()
public boolean isConfig(ContentContext ctx)
IContentVisualComponent
isConfig
in interface IContentVisualComponent
public String performConfig(ContentContext ctx) throws Exception
IContentVisualComponent
performConfig
in interface IContentVisualComponent
Exception
protected String getEmptyCode(ContentContext ctx) throws Exception
Exception
public boolean isDispayEmptyXHTMLCode(ContentContext ctx) throws Exception
IContentVisualComponent
isDispayEmptyXHTMLCode
in interface IContentVisualComponent
Exception
public String getErrorMessage(String fieldName) throws ResourceNotFoundException
IContentVisualComponent
getErrorMessage
in interface IContentVisualComponent
ResourceNotFoundException
public Collection<String> getExternalResources(ContentContext ctx)
IContentVisualComponent
getExternalResources
in interface IContentVisualComponent
public String getFirstPrefix(ContentContext ctx)
IContentVisualComponent
getFirstPrefix
in interface IContentVisualComponent
protected String getListClass(ContentContext ctx)
protected String getListTag(ContentContext ctx)
protected String getListItemTag(ContentContext ctx)
public String getFormName()
public String getHeaderContent(ContentContext ctx)
IContentVisualComponent
getHeaderContent
in interface IContentVisualComponent
public final String getHelpURL(ContentContext ctx)
IContentVisualComponent
getHelpURL
in interface IContentVisualComponent
protected String getHelpType()
protected String getDefaultHelpURI(ContentContext ctx)
protected String getHelpURI(ContentContext ctx)
public String getHexColor()
IContentVisualComponent
getHexColor
in interface IContentVisualComponent
public List<String> getI18nEditableKeys(ContentContext ctx)
IContentVisualComponent
getI18nEditableKeys
in interface IContentVisualComponent
public final String getId()
IContentVisualComponent
getId
in interface IContentVisualComponent
org.javlo.itf.IContentVisualComponent#getContentLanguage()
public String getInputNameRenderer()
IContentVisualComponent
getInputNameRenderer
in interface IContentVisualComponent
public String getInputNameRendererTitle()
public List<SuffixPrefix> getItalicAndStrongLanguageMarkerList(ContentContext ctx)
public String getJSOnSubmit()
IContentVisualComponent
getJSOnSubmit
in interface IContentVisualComponent
public String getKey()
IContentVisualComponent
getKey
in interface IContentVisualComponent
public String getLastSufix(ContentContext ctx)
IContentVisualComponent
getLastSufix
in interface IContentVisualComponent
public List<SuffixPrefix> getMarkerList(ContentContext ctx)
IContentVisualComponent
getMarkerList
in interface IContentVisualComponent
public GenericMessage getMessage()
IContentVisualComponent
getMessage
in interface IContentVisualComponent
public String getDisplayMessage()
public IContentVisualComponent getNextComponent()
IContentVisualComponent
getNextComponent
in interface IContentVisualComponent
public MenuElement getPage()
IContentVisualComponent
getPage
in interface IContentVisualComponent
public void setContainerPage(ContentContext ctx, MenuElement page)
IContentVisualComponent
setContainerPage
in interface IContentVisualComponent
public MenuElement getContainerPage(ContentContext ctx)
ctx
- protected String getTag(ContentContext ctx)
protected boolean isWrapped(ContentContext ctx)
public String getPrefixViewXHTMLCode(ContentContext ctx)
IContentVisualComponent
getPrefixViewXHTMLCode
in interface IContentVisualComponent
protected String contructViewStyle(ContentContext ctx)
protected String getForcedPrefixViewXHTMLCode(ContentContext ctx)
protected String getCSSStyle(ContentContext ctx)
protected String getInlineStyle(ContentContext ctx)
public IContentVisualComponent getPreviousComponent()
IContentVisualComponent
getPreviousComponent
in interface IContentVisualComponent
public boolean isPreviousSame()
public boolean isNextSame()
public boolean isNextSame(ContentContext ctx)
public boolean isPreviousSame(ContentContext ctx)
public List<SuffixPrefix> getQuotationLanguageMarkerList(ContentContext ctx)
public String getDefaultRenderer(ContentContext ctx)
public Map<String,String> getRenderes(ContentContext ctx)
protected boolean isAutoRenderer()
public String getRenderer(ContentContext ctx)
getRenderer
in interface IContentVisualComponent
protected String getRendererTitle()
public int getSearchLevel()
IContentVisualComponent
getSearchLevel
in interface IContentVisualComponent
protected String getSelectRendererXHTML(ContentContext ctx, boolean justDisplay) throws Exception, IOException
Exception
IOException
protected String getSpecialInputTag()
request
public String getSpecificClass(ContentContext ctx)
protected String getPreviewCssClass(ContentContext ctx, String currentClass)
protected String getSpecialPreviewCssClass(ContentContext ctx, String currentClass)
protected String getForcedId(ContentContext ctx)
protected static void setForcedId(ContentContext ctx, String id)
public String getPreviewCssId(ContentContext ctx)
public String getSpecialPreviewCssId(ContentContext ctx)
protected String getViewID(ContentContext ctx)
public boolean isAjaxWrapper(ContentContext ctx)
public String getAjaxId()
public String getStyle()
public final String getComponentCssClass(ContentContext ctx)
IContentVisualComponent
getComponentCssClass
in interface IContentVisualComponent
public boolean isColored()
public boolean isBackgroundColored()
public String getStyleLabel(ContentContext ctx)
IContentVisualComponent
getStyleLabel
in interface IContentVisualComponent
public void setRenderer(ContentContext ctx, String renderer)
IContentVisualComponent
setRenderer
in interface IContentVisualComponent
public String[] getStyleLabelList(ContentContext ctx)
IContentVisualComponent
getStyleLabelList
in interface IContentVisualComponent
public String[] getStyleList(ContentContext ctx)
IContentVisualComponent
getStyleList
in interface IContentVisualComponent
public String getStyleTitle(ContentContext ctx)
IContentVisualComponent
getStyleTitle
in interface IContentVisualComponent
public String getSuffixViewXHTMLCode(ContentContext ctx)
IContentVisualComponent
getSuffixViewXHTMLCode
in interface IContentVisualComponent
protected String getForcedSuffixViewXHTMLCode(ContentContext ctx)
public String getTextForSearch(ContentContext ctx)
IContentVisualComponent
getTextForSearch
in interface IContentVisualComponent
public String getTextLabel(ContentContext ctx)
IContentVisualComponent
getTextLabel
in interface IContentVisualComponent
public String getTextTitle(ContentContext ctx)
IContentVisualComponent
getTextTitle
in interface IContentVisualComponent
public int getTitleLevel(ContentContext ctx)
IContentVisualComponent
getTitleLevel
in interface IContentVisualComponent
protected String getTypeInputName()
public String getValue()
public String getBackgroundColor()
public String getTextColor()
public String getValue(ContentContext ctx)
IContentVisualComponent
getValue
in interface IContentVisualComponent
public Properties getViewData(ContentContext ctx) throws IOException
IOException
protected File getViewDataFile(ContentContext ctx) throws IOException
IOException
public String getViewText(ContentContext ctx, String key) throws ResourceNotFoundException
IContentVisualComponent
getViewText
in interface IContentVisualComponent
key
- the key of the textResourceNotFoundException
protected String executeCurrentRenderer(ContentContext ctx) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
protected String executeRenderer(ContentContext ctx, String url) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
protected String renderViewXHTMLCode(ContentContext ctx) throws Exception
Exception
protected String cleanValue(ContentContext ctx, String value)
public String getViewXHTMLCode(ContentContext ctx) throws Exception
Exception
public int getWordCount(ContentContext ctx)
IContentVisualComponent
getWordCount
in interface IContentVisualComponent
public final String getXHTMLCode(ContentContext ctx)
IContentVisualComponent
getXHTMLCode
in interface IContentVisualComponent
protected Object getLock(ContentContext ctx)
protected String getPreviewAttributes(ContentContext ctx)
public void prepareView(ContentContext ctx) throws Exception
ctx
- Exception
protected void includeComponentJSP(ContentContext ctx, String jsp) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
protected String getDisplayAsInputName()
protected void includePage(ContentContext ctx, String jsp) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
protected void init() throws ResourceNotFoundException
ResourceNotFoundException
protected void init(ComponentBean bean, ContentContext ctx) throws Exception
Exception
public void insert(String text)
insert
in interface IContentVisualComponent
text
- the text to be inseredpublic boolean isContentCachable(ContentContext ctx)
IContentVisualComponent
isContentCachable
in interface IContentVisualComponent
public boolean isContentCachableByQuery(ContentContext ctx)
public boolean isContentTimeCachable(ContentContext ctx)
public boolean isDefaultValue(ContentContext ctx)
IContentVisualComponent
isDefaultValue
in interface IContentVisualComponent
protected boolean isFirstElementOfRepeatSequence(ContentContext ctx) throws Exception
Exception
public boolean isFirstRepeated()
IContentVisualComponent
isFirstRepeated
in interface IContentVisualComponent
public boolean isHidden(ContentContext ctx)
IContentVisualComponent
isHidden
in interface IContentVisualComponent
public boolean isInline()
IContentVisualComponent
isInline
in interface IContentVisualComponent
protected boolean isCanAddClass()
public boolean isInsertable()
isInsertable
in interface IContentVisualComponent
public int getLabelLevel(ContentContext ctx)
IContentVisualComponent
getLabelLevel
in interface IContentVisualComponent
public boolean isList(ContentContext ctx)
IContentVisualComponent
isList
in interface IContentVisualComponent
protected Date getDeleteDate(ContentContext ctx)
protected boolean isNeedDelete(ContentContext ctx) throws Exception
Exception
public boolean isListable()
IContentVisualComponent
isListable
in interface IContentVisualComponent
public boolean isModify()
isModify
in interface IContentVisualComponent
org.javlo.itf.IContentVisualComponent#isModify()
public boolean isNeedRefresh()
IContentVisualComponent
isNeedRefresh
in interface IContentVisualComponent
public boolean isRealContent(ContentContext ctx)
IContentVisualComponent
isRealContent
in interface IContentVisualComponent
ctx
- current contextpublic boolean isRepeat()
isRepeat
in interface IContentVisualComponent
public boolean isNolink()
isNolink
in interface IContentVisualComponent
public boolean isRepeatable()
isRepeatable
in interface IContentVisualComponent
public boolean isNoLinkable()
public boolean isUnique()
IContentVisualComponent
isUnique
in interface IContentVisualComponent
protected boolean isViewDataFile(ContentContext ctx) throws IOException
IOException
public boolean isVisible()
isVisible
in interface IContentVisualComponent
public boolean isVisible(ContentContext ctx)
IContentVisualComponent
isVisible
in interface IContentVisualComponent
public boolean isVisibleFromCookies(ContentContext ctx)
IContentVisualComponent
isVisibleFromCookies
in interface IContentVisualComponent
public void loadViewData(ContentContext ctx) throws IOException
IContentVisualComponent
loadViewData
in interface IContentVisualComponent
IOException
public IContentVisualComponent newInstance(ComponentBean bean, ContentContext newCtx, MenuElement page) throws Exception
IContentVisualComponent
newInstance
in interface IContentVisualComponent
newCtx
- the context of the content manager.Exception
public IContentVisualComponent next()
IContentVisualComponent
next
in interface IContentVisualComponent
protected void onStyleChange(ContentContext ctx)
public IContentVisualComponent previous()
IContentVisualComponent
previous
in interface IContentVisualComponent
protected String processView(ContentContext ctx) throws Exception
ctx
- Exception
public String performEdit(ContentContext ctx) throws Exception
IContentVisualComponent
performEdit
in interface IContentVisualComponent
Exception
public final void performUpdate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
Exception
public void replaceAllInContent(Map<String,String> replacement)
IContentVisualComponent
replaceAllInContent
in interface IContentVisualComponent
public void replaceInContent(String source, String target)
IContentVisualComponent
replaceInContent
in interface IContentVisualComponent
source
- the source element (sample. : test)target
- the target element (sample. : -- test --)public void resetContentCache(ContentContext ctx)
public void resetViewData(ContentContext ctx) throws IOException
IContentVisualComponent
resetViewData
in interface IContentVisualComponent
IOException
public void setComponentBean(ComponentBean componentBean)
public void setContentCache(ContentContext ctx, String contentCache)
public void setContentTimeCache(ContentContext ctx, String contentCache)
public void setHidden(boolean hidden)
public void setList(boolean inList)
IContentVisualComponent
setList
in interface IContentVisualComponent
inList
- true for put in a list, false for remove from a listpublic void setDisplayHidden(boolean hidden)
IContentVisualComponent
setDisplayHidden
in interface IContentVisualComponent
public boolean isDisplayHidden()
IContentVisualComponent
isDisplayHidden
in interface IContentVisualComponent
public void setBackgroundColor(String bgcol)
public void setTextColor(String textcol)
public void setMessage(GenericMessage inMsg)
public void setModify()
public void setNeedRefresh(boolean needRefresh)
IContentVisualComponent
setNeedRefresh
in interface IContentVisualComponent
public void setNextComponent(IContentVisualComponent nextComponent)
IContentVisualComponent
setNextComponent
in interface IContentVisualComponent
public void setPage(MenuElement inPage)
setPage
in interface IContentVisualComponent
public void setPreviousComponent(IContentVisualComponent previousComponent)
IContentVisualComponent
setPreviousComponent
in interface IContentVisualComponent
public void setRepeat(boolean newRepeat)
setRepeat
in interface IContentVisualComponent
public void setNolink(boolean noLink)
public void setStyle(ContentContext ctx, String inStyle)
IContentVisualComponent
setStyle
in interface IContentVisualComponent
inStyle
- new stylepublic void setValid(boolean inVisible)
setValid
in interface IContentVisualComponent
public void setValue(String inContent)
IContentVisualComponent
setValue
in interface IContentVisualComponent
public void stored()
IContentVisualComponent
stored
in interface IContentVisualComponent
org.javlo.itf.IContentVisualComponent#stored()
public void storeViewData(ContentContext ctx) throws IOException
IOException
public InputStream stringToStream(String str)
public Reader stringToReader(String str, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingException
public Reader stringToReader(String str) throws UnsupportedEncodingException
UnsupportedEncodingException
@Deprecated public String textToXHTML(String text)
text
- public boolean isMetaTitle()
IContentVisualComponent
isMetaTitle
in interface IContentVisualComponent
public String getClassName()
IContentVisualComponent
getClassName
in interface IContentVisualComponent
public boolean isValueProperties()
public String getVersion()
IContentVisualComponent
getVersion
in interface IContentVisualComponent
public String getDescription(Locale local)
IContentVisualComponent
getDescription
in interface IContentVisualComponent
public String getAuthors()
IContentVisualComponent
getAuthors
in interface IContentVisualComponent
public boolean initContent(ContentContext ctx) throws Exception
IContentVisualComponent
initContent
in interface IContentVisualComponent
Exception
public Date getCreationDate()
getCreationDate
in interface IContentVisualComponent
public Date getModificationDate()
getModificationDate
in interface IContentVisualComponent
public boolean isHiddenInMode(int mode)
IContentVisualComponent
isHiddenInMode
in interface IContentVisualComponent
public int getCookiesDisplayStatus()
public void setHiddenInMode(int mode, boolean hidden)
public String getSpecialTagTitle(ContentContext ctx) throws Exception
getSpecialTagTitle
in interface IContentVisualComponent
Exception
public String getSpecialTagXHTML(ContentContext ctx) throws Exception
getSpecialTagXHTML
in interface IContentVisualComponent
Exception
protected boolean isNeedRenderer()
public int compareTo(IContentVisualComponent comp)
compareTo
in interface Comparable<IContentVisualComponent>
public ComponentLayout getLayout()
IContentVisualComponent
getLayout
in interface IContentVisualComponent
public boolean equals(ContentContext ctx, IContentVisualComponent comp)
IContentVisualComponent
equals
in interface IContentVisualComponent
public String getEmptyXHTMLCode(ContentContext ctx) throws Exception
IContentVisualComponent
getEmptyXHTMLCode
in interface IContentVisualComponent
Exception
public String getPageDescription(ContentContext ctx)
IContentVisualComponent
getPageDescription
in interface IContentVisualComponent
public String getListGroup()
IContentVisualComponent
getListGroup
in interface IContentVisualComponent
public boolean isReversedLink(ContentContext ctx)
public GenericMessage getContentMessage(ContentContext ctx)
IContentVisualComponent
getContentMessage
in interface IContentVisualComponent
public GenericMessage getTextMessage(ContentContext ctx)
IContentVisualComponent
getTextMessage
in interface IContentVisualComponent
public GenericMessage getConfigMessage(ContentContext ctx)
IContentVisualComponent
getConfigMessage
in interface IContentVisualComponent
public void markAsNew(ContentContext ctx)
markAsNew
in interface IContentVisualComponent
ctx
- public boolean isNew(ContentContext ctx)
isNew
in interface IContentVisualComponent
ctx
- public boolean isEditOnCreate(ContentContext ctx)
isEditOnCreate
in interface IContentVisualComponent
ctx
- public static void main(String[] args)
public Map<String,Object> getContentAsMap(ContentContext ctx) throws Exception
getContentAsMap
in interface IRestItem
Exception
public static void setMirrorWrapped(ContentContext ctx, IContentVisualComponent comp, MirrorComponent mirror)
public static boolean isMirrorWrapped(ContentContext ctx, IContentVisualComponent comp)
public static MirrorComponent getMirrorWrapper(ContentContext ctx, IContentVisualComponent comp)
public boolean isMirroredByDefault(ContentContext ctx)
IContentVisualComponent
isMirroredByDefault
in interface IContentVisualComponent
public String getContentAsText(ContentContext ctx)
IContentVisualComponent
getContentAsText
in interface IContentVisualComponent
public static String getImportFolderPath(ContentContext ctx, MenuElement page) throws Exception
Exception
public String getImportFolderPath(ContentContext ctx) throws Exception
Exception
protected boolean isXML()
public String getErrorMessage(ContentContext ctx)
IContentVisualComponent
getErrorMessage
in interface IContentVisualComponent
public boolean isDisplayable(ContentContext ctx) throws Exception
IContentVisualComponent
isDisplayable
in interface IContentVisualComponent
Exception
public boolean isRestMatch(ContentContext ctx, Map<String,String> params)
isRestMatch
in interface IContentVisualComponent
public String getFontAwesome()
getFontAwesome
in interface IContentVisualComponent
public boolean haveRight(ContentContext ctx, String action)
protected boolean isValueTranslatable()
public boolean transflateFrom(ContentContext ctx, ITranslator translator, String lang)
IContentVisualComponent
transflateFrom
in interface IContentVisualComponent
ctx
- contextContext of the current renderingtranslator
- class to translatelang
- the language of the current content (source language)Copyright © 2012-2018. All Rights Reserved.