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, waitgetTypepublic 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
Exceptionpublic void clearReplacement()
IContentVisualComponentclearReplacement in interface IContentVisualComponentprotected Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionObject.clone()protected int countLine()
public void delete(ContentContext ctx)
IContentVisualComponentdelete in interface IContentVisualComponentprotected String executeJSP(ContentContext ctx, String jsp) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionprotected String executeRenderer(ContentContext ctx) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionpublic String getArea()
IContentVisualComponentgetArea in interface IContentVisualComponentprotected String getBaseHelpURL(ContentContext ctx)
public boolean isHelpURL(ContentContext ctx)
isHelpURL in interface IContentVisualComponentpublic int getComplexityLevel(ContentContext ctx)
IContentVisualComponentgetComplexityLevel in interface IContentVisualComponentctx - TODOpublic ComponentBean getComponentBean()
IContentVisualComponentgetComponentBean in interface IContentVisualComponentprotected String getComponentCSS(javax.servlet.ServletContext application, String css) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionpublic String getComponentLabel(ContentContext ctx, String lg)
IContentVisualComponentgetComponentLabel in interface IContentVisualComponentlg - language of the labelprotected String getComponentPath()
public ComponentConfig getConfig(ContentContext ctx)
IContentVisualComponentgetConfig in interface IContentVisualComponentpublic String getContentTimeCache(ContentContext ctx)
public String getContentName()
getContentName in interface IContentVisualComponentpublic 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)Exceptionpublic String getCurrentRenderer(ContentContext ctx)
getCurrentRenderer in interface IContentVisualComponentpublic List<String> extractFieldsFromRenderer(ContentContext ctx) throws IOException
IContentVisualComponentextractFieldsFromRenderer in interface IContentVisualComponentIOExceptionpublic String getDebugHeader(ContentContext ctx)
protected String getEditorComplexity(ContentContext ctx)
public String getEditText(ContentContext ctx, String key)
IContentVisualComponentgetEditText in interface IContentVisualComponentkey - the key of the textprotected String getEditXHTMLCode(ContentContext ctx) throws Exception
Exceptionpublic 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
IContentVisualComponentgetXHTMLConfig in interface IContentVisualComponentExceptionprotected boolean isHiddable()
public boolean isConfig(ContentContext ctx)
IContentVisualComponentisConfig in interface IContentVisualComponentpublic String performConfig(ContentContext ctx) throws Exception
IContentVisualComponentperformConfig in interface IContentVisualComponentExceptionprotected String getEmptyCode(ContentContext ctx) throws Exception
Exceptionpublic boolean isDispayEmptyXHTMLCode(ContentContext ctx) throws Exception
IContentVisualComponentisDispayEmptyXHTMLCode in interface IContentVisualComponentExceptionpublic String getErrorMessage(String fieldName) throws ResourceNotFoundException
IContentVisualComponentgetErrorMessage in interface IContentVisualComponentResourceNotFoundExceptionpublic Collection<String> getExternalResources(ContentContext ctx)
IContentVisualComponentgetExternalResources in interface IContentVisualComponentpublic String getFirstPrefix(ContentContext ctx)
IContentVisualComponentgetFirstPrefix in interface IContentVisualComponentprotected String getListClass(ContentContext ctx)
protected String getListTag(ContentContext ctx)
protected String getListItemTag(ContentContext ctx)
public String getFormName()
public String getHeaderContent(ContentContext ctx)
IContentVisualComponentgetHeaderContent in interface IContentVisualComponentpublic final String getHelpURL(ContentContext ctx)
IContentVisualComponentgetHelpURL in interface IContentVisualComponentprotected String getHelpType()
protected String getDefaultHelpURI(ContentContext ctx)
protected String getHelpURI(ContentContext ctx)
public String getHexColor()
IContentVisualComponentgetHexColor in interface IContentVisualComponentpublic List<String> getI18nEditableKeys(ContentContext ctx)
IContentVisualComponentgetI18nEditableKeys in interface IContentVisualComponentpublic final String getId()
IContentVisualComponentgetId in interface IContentVisualComponentorg.javlo.itf.IContentVisualComponent#getContentLanguage()public String getInputNameRenderer()
IContentVisualComponentgetInputNameRenderer in interface IContentVisualComponentpublic String getInputNameRendererTitle()
public List<SuffixPrefix> getItalicAndStrongLanguageMarkerList(ContentContext ctx)
public String getJSOnSubmit()
IContentVisualComponentgetJSOnSubmit in interface IContentVisualComponentpublic String getKey()
IContentVisualComponentgetKey in interface IContentVisualComponentpublic String getLastSufix(ContentContext ctx)
IContentVisualComponentgetLastSufix in interface IContentVisualComponentpublic List<SuffixPrefix> getMarkerList(ContentContext ctx)
IContentVisualComponentgetMarkerList in interface IContentVisualComponentpublic GenericMessage getMessage()
IContentVisualComponentgetMessage in interface IContentVisualComponentpublic String getDisplayMessage()
public IContentVisualComponent getNextComponent()
IContentVisualComponentgetNextComponent in interface IContentVisualComponentpublic MenuElement getPage()
IContentVisualComponentgetPage in interface IContentVisualComponentpublic void setContainerPage(ContentContext ctx, MenuElement page)
IContentVisualComponentsetContainerPage in interface IContentVisualComponentpublic MenuElement getContainerPage(ContentContext ctx)
ctx - protected String getTag(ContentContext ctx)
protected boolean isWrapped(ContentContext ctx)
public String getPrefixViewXHTMLCode(ContentContext ctx)
IContentVisualComponentgetPrefixViewXHTMLCode in interface IContentVisualComponentprotected String contructViewStyle(ContentContext ctx)
protected String getForcedPrefixViewXHTMLCode(ContentContext ctx)
protected String getCSSStyle(ContentContext ctx)
protected String getInlineStyle(ContentContext ctx)
public IContentVisualComponent getPreviousComponent()
IContentVisualComponentgetPreviousComponent in interface IContentVisualComponentpublic 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 IContentVisualComponentprotected String getRendererTitle()
public int getSearchLevel()
IContentVisualComponentgetSearchLevel in interface IContentVisualComponentprotected String getSelectRendererXHTML(ContentContext ctx, boolean justDisplay) throws Exception, IOException
ExceptionIOExceptionprotected String getSpecialInputTag()
requestpublic 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)
IContentVisualComponentgetComponentCssClass in interface IContentVisualComponentpublic boolean isColored()
public boolean isBackgroundColored()
public String getStyleLabel(ContentContext ctx)
IContentVisualComponentgetStyleLabel in interface IContentVisualComponentpublic void setRenderer(ContentContext ctx, String renderer)
IContentVisualComponentsetRenderer in interface IContentVisualComponentpublic String[] getStyleLabelList(ContentContext ctx)
IContentVisualComponentgetStyleLabelList in interface IContentVisualComponentpublic String[] getStyleList(ContentContext ctx)
IContentVisualComponentgetStyleList in interface IContentVisualComponentpublic String getStyleTitle(ContentContext ctx)
IContentVisualComponentgetStyleTitle in interface IContentVisualComponentpublic String getSuffixViewXHTMLCode(ContentContext ctx)
IContentVisualComponentgetSuffixViewXHTMLCode in interface IContentVisualComponentprotected String getForcedSuffixViewXHTMLCode(ContentContext ctx)
public String getTextForSearch(ContentContext ctx)
IContentVisualComponentgetTextForSearch in interface IContentVisualComponentpublic String getTextLabel(ContentContext ctx)
IContentVisualComponentgetTextLabel in interface IContentVisualComponentpublic String getTextTitle(ContentContext ctx)
IContentVisualComponentgetTextTitle in interface IContentVisualComponentpublic int getTitleLevel(ContentContext ctx)
IContentVisualComponentgetTitleLevel in interface IContentVisualComponentprotected String getTypeInputName()
public String getValue()
public String getBackgroundColor()
public String getTextColor()
public String getValue(ContentContext ctx)
IContentVisualComponentgetValue in interface IContentVisualComponentpublic Properties getViewData(ContentContext ctx) throws IOException
IOExceptionprotected File getViewDataFile(ContentContext ctx) throws IOException
IOExceptionpublic String getViewText(ContentContext ctx, String key) throws ResourceNotFoundException
IContentVisualComponentgetViewText in interface IContentVisualComponentkey - the key of the textResourceNotFoundExceptionprotected String executeCurrentRenderer(ContentContext ctx) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionprotected String executeRenderer(ContentContext ctx, String url) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionprotected String renderViewXHTMLCode(ContentContext ctx) throws Exception
Exceptionprotected String cleanValue(ContentContext ctx, String value)
public String getViewXHTMLCode(ContentContext ctx) throws Exception
Exceptionpublic int getWordCount(ContentContext ctx)
IContentVisualComponentgetWordCount in interface IContentVisualComponentpublic final String getXHTMLCode(ContentContext ctx)
IContentVisualComponentgetXHTMLCode in interface IContentVisualComponentprotected Object getLock(ContentContext ctx)
protected String getPreviewAttributes(ContentContext ctx)
public void prepareView(ContentContext ctx) throws Exception
ctx - Exceptionprotected void includeComponentJSP(ContentContext ctx, String jsp) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionprotected String getDisplayAsInputName()
protected void includePage(ContentContext ctx, String jsp) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionprotected void init()
throws ResourceNotFoundException
ResourceNotFoundExceptionprotected void init(ComponentBean bean, ContentContext ctx) throws Exception
Exceptionpublic void insert(String text)
insert in interface IContentVisualComponenttext - the text to be inseredpublic boolean isContentCachable(ContentContext ctx)
IContentVisualComponentisContentCachable in interface IContentVisualComponentpublic boolean isContentCachableByQuery(ContentContext ctx)
public boolean isContentTimeCachable(ContentContext ctx)
public boolean isDefaultValue(ContentContext ctx)
IContentVisualComponentisDefaultValue in interface IContentVisualComponentprotected boolean isFirstElementOfRepeatSequence(ContentContext ctx) throws Exception
Exceptionpublic boolean isFirstRepeated()
IContentVisualComponentisFirstRepeated in interface IContentVisualComponentpublic boolean isHidden(ContentContext ctx)
IContentVisualComponentisHidden in interface IContentVisualComponentpublic boolean isInline()
IContentVisualComponentisInline in interface IContentVisualComponentprotected boolean isCanAddClass()
public boolean isInsertable()
isInsertable in interface IContentVisualComponentpublic int getLabelLevel(ContentContext ctx)
IContentVisualComponentgetLabelLevel in interface IContentVisualComponentpublic boolean isList(ContentContext ctx)
IContentVisualComponentisList in interface IContentVisualComponentprotected Date getDeleteDate(ContentContext ctx)
protected boolean isNeedDelete(ContentContext ctx) throws Exception
Exceptionpublic boolean isListable()
IContentVisualComponentisListable in interface IContentVisualComponentpublic boolean isModify()
isModify in interface IContentVisualComponentorg.javlo.itf.IContentVisualComponent#isModify()public boolean isNeedRefresh()
IContentVisualComponentisNeedRefresh in interface IContentVisualComponentpublic boolean isRealContent(ContentContext ctx)
IContentVisualComponentisRealContent in interface IContentVisualComponentctx - current contextpublic boolean isRepeat()
isRepeat in interface IContentVisualComponentpublic boolean isNolink()
isNolink in interface IContentVisualComponentpublic boolean isRepeatable()
isRepeatable in interface IContentVisualComponentpublic boolean isNoLinkable()
public boolean isUnique()
IContentVisualComponentisUnique in interface IContentVisualComponentprotected boolean isViewDataFile(ContentContext ctx) throws IOException
IOExceptionpublic boolean isVisible()
isVisible in interface IContentVisualComponentpublic boolean isVisible(ContentContext ctx)
IContentVisualComponentisVisible in interface IContentVisualComponentpublic boolean isVisibleFromCookies(ContentContext ctx)
IContentVisualComponentisVisibleFromCookies in interface IContentVisualComponentpublic void loadViewData(ContentContext ctx) throws IOException
IContentVisualComponentloadViewData in interface IContentVisualComponentIOExceptionpublic IContentVisualComponent newInstance(ComponentBean bean, ContentContext newCtx, MenuElement page) throws Exception
IContentVisualComponentnewInstance in interface IContentVisualComponentnewCtx - the context of the content manager.Exceptionpublic IContentVisualComponent next()
IContentVisualComponentnext in interface IContentVisualComponentprotected void onStyleChange(ContentContext ctx)
public IContentVisualComponent previous()
IContentVisualComponentprevious in interface IContentVisualComponentprotected String processView(ContentContext ctx) throws Exception
ctx - Exceptionpublic String performEdit(ContentContext ctx) throws Exception
IContentVisualComponentperformEdit in interface IContentVisualComponentExceptionpublic final void performUpdate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws Exception
Exceptionpublic void replaceAllInContent(Map<String,String> replacement)
IContentVisualComponentreplaceAllInContent in interface IContentVisualComponentpublic void replaceInContent(String source, String target)
IContentVisualComponentreplaceInContent in interface IContentVisualComponentsource - the source element (sample. : test)target - the target element (sample. : -- test --)public void resetContentCache(ContentContext ctx)
public void resetViewData(ContentContext ctx) throws IOException
IContentVisualComponentresetViewData in interface IContentVisualComponentIOExceptionpublic 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)
IContentVisualComponentsetList in interface IContentVisualComponentinList - true for put in a list, false for remove from a listpublic void setDisplayHidden(boolean hidden)
IContentVisualComponentsetDisplayHidden in interface IContentVisualComponentpublic boolean isDisplayHidden()
IContentVisualComponentisDisplayHidden in interface IContentVisualComponentpublic void setBackgroundColor(String bgcol)
public void setTextColor(String textcol)
public void setMessage(GenericMessage inMsg)
public void setModify()
public void setNeedRefresh(boolean needRefresh)
IContentVisualComponentsetNeedRefresh in interface IContentVisualComponentpublic void setNextComponent(IContentVisualComponent nextComponent)
IContentVisualComponentsetNextComponent in interface IContentVisualComponentpublic void setPage(MenuElement inPage)
setPage in interface IContentVisualComponentpublic void setPreviousComponent(IContentVisualComponent previousComponent)
IContentVisualComponentsetPreviousComponent in interface IContentVisualComponentpublic void setRepeat(boolean newRepeat)
setRepeat in interface IContentVisualComponentpublic void setNolink(boolean noLink)
public void setStyle(ContentContext ctx, String inStyle)
IContentVisualComponentsetStyle in interface IContentVisualComponentinStyle - new stylepublic void setValid(boolean inVisible)
setValid in interface IContentVisualComponentpublic void setValue(String inContent)
IContentVisualComponentsetValue in interface IContentVisualComponentpublic void stored()
IContentVisualComponentstored in interface IContentVisualComponentorg.javlo.itf.IContentVisualComponent#stored()public void storeViewData(ContentContext ctx) throws IOException
IOExceptionpublic InputStream stringToStream(String str)
public Reader stringToReader(String str, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic Reader stringToReader(String str) throws UnsupportedEncodingException
UnsupportedEncodingException@Deprecated public String textToXHTML(String text)
text - public boolean isMetaTitle()
IContentVisualComponentisMetaTitle in interface IContentVisualComponentpublic String getClassName()
IContentVisualComponentgetClassName in interface IContentVisualComponentpublic boolean isValueProperties()
public String getVersion()
IContentVisualComponentgetVersion in interface IContentVisualComponentpublic String getDescription(Locale local)
IContentVisualComponentgetDescription in interface IContentVisualComponentpublic String getAuthors()
IContentVisualComponentgetAuthors in interface IContentVisualComponentpublic boolean initContent(ContentContext ctx) throws Exception
IContentVisualComponentinitContent in interface IContentVisualComponentExceptionpublic Date getCreationDate()
getCreationDate in interface IContentVisualComponentpublic Date getModificationDate()
getModificationDate in interface IContentVisualComponentpublic boolean isHiddenInMode(int mode)
IContentVisualComponentisHiddenInMode in interface IContentVisualComponentpublic int getCookiesDisplayStatus()
public void setHiddenInMode(int mode,
boolean hidden)
public String getSpecialTagTitle(ContentContext ctx) throws Exception
getSpecialTagTitle in interface IContentVisualComponentExceptionpublic String getSpecialTagXHTML(ContentContext ctx) throws Exception
getSpecialTagXHTML in interface IContentVisualComponentExceptionprotected boolean isNeedRenderer()
public int compareTo(IContentVisualComponent comp)
compareTo in interface Comparable<IContentVisualComponent>public ComponentLayout getLayout()
IContentVisualComponentgetLayout in interface IContentVisualComponentpublic boolean equals(ContentContext ctx, IContentVisualComponent comp)
IContentVisualComponentequals in interface IContentVisualComponentpublic String getEmptyXHTMLCode(ContentContext ctx) throws Exception
IContentVisualComponentgetEmptyXHTMLCode in interface IContentVisualComponentExceptionpublic String getPageDescription(ContentContext ctx)
IContentVisualComponentgetPageDescription in interface IContentVisualComponentpublic String getListGroup()
IContentVisualComponentgetListGroup in interface IContentVisualComponentpublic boolean isReversedLink(ContentContext ctx)
public GenericMessage getContentMessage(ContentContext ctx)
IContentVisualComponentgetContentMessage in interface IContentVisualComponentpublic GenericMessage getTextMessage(ContentContext ctx)
IContentVisualComponentgetTextMessage in interface IContentVisualComponentpublic GenericMessage getConfigMessage(ContentContext ctx)
IContentVisualComponentgetConfigMessage in interface IContentVisualComponentpublic void markAsNew(ContentContext ctx)
markAsNew in interface IContentVisualComponentctx - public boolean isNew(ContentContext ctx)
isNew in interface IContentVisualComponentctx - public boolean isEditOnCreate(ContentContext ctx)
isEditOnCreate in interface IContentVisualComponentctx - public static void main(String[] args)
public Map<String,Object> getContentAsMap(ContentContext ctx) throws Exception
getContentAsMap in interface IRestItemExceptionpublic 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)
IContentVisualComponentisMirroredByDefault in interface IContentVisualComponentpublic String getContentAsText(ContentContext ctx)
IContentVisualComponentgetContentAsText in interface IContentVisualComponentpublic static String getImportFolderPath(ContentContext ctx, MenuElement page) throws Exception
Exceptionpublic String getImportFolderPath(ContentContext ctx) throws Exception
Exceptionprotected boolean isXML()
public String getErrorMessage(ContentContext ctx)
IContentVisualComponentgetErrorMessage in interface IContentVisualComponentpublic boolean isDisplayable(ContentContext ctx) throws Exception
IContentVisualComponentisDisplayable in interface IContentVisualComponentExceptionpublic boolean isRestMatch(ContentContext ctx, Map<String,String> params)
isRestMatch in interface IContentVisualComponentpublic String getFontAwesome()
getFontAwesome in interface IContentVisualComponentpublic boolean haveRight(ContentContext ctx, String action)
protected boolean isValueTranslatable()
public boolean transflateFrom(ContentContext ctx, ITranslator translator, String lang)
IContentVisualComponenttransflateFrom in interface IContentVisualComponentctx - contextContext of the current renderingtranslator - class to translatelang - the language of the current content (source language)Copyright © 2012-2018. All Rights Reserved.