Package org.javlo.component.links
Class InternalLink
- java.lang.Object
-
- org.javlo.component.core.AbstractVisualComponent
-
- org.javlo.component.core.ComplexPropertiesLink
-
- org.javlo.component.links.InternalLink
-
- All Implemented Interfaces:
Comparable<IContentVisualComponent>
,IContentVisualComponent
,IInternalLink
,ILink
,IReverseLinkComponent
,IRestItem
- Direct Known Subclasses:
UnsubsribeLink
public class InternalLink extends ComplexPropertiesLink implements IInternalLink, IReverseLinkComponent, ILink
- Author:
- pvandermaesen
-
-
Field Summary
Fields Modifier and Type Field Description protected static Logger
logger
create a static logger.static String
TYPE
-
Fields inherited from class org.javlo.component.core.ComplexPropertiesLink
HEADER_V1_0, LABEL_KEY, LINK_KEY, properties, REVERSE_LINK_KEY
-
Fields inherited from class org.javlo.component.core.AbstractVisualComponent
CACHE_KEY_SUFFIX_PARAM_NAME, COMPONENT_KEY, config, EDIT_CLASS, FLUID_COL_SIZE, FORCE_COMPONENT_ID, I18N_FILE, MAX_COL_VALUE, MOBILE_TYPE, NOT_EDIT_PREVIEW_PARAM_NAME, SCROLL_TO_COMP_ID_ATTRIBUTE_NAME, TIME_CACHE_NAME, VALUE_SEPARATOR
-
Fields inherited from interface org.javlo.component.core.IContentVisualComponent
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 Summary
Constructors Constructor Description InternalLink()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
getColumnableDefaultValue()
protected String
getEditXHTMLCode(ContentContext ctx)
String
getHexColor()
get the exadecimal color for representation of the component.String
getIcon()
String
getLabel()
Date
getLatestValidDate()
String
getLinkId()
String
getLinkText(ContentContext ctx)
this text must be replace with a link.String
getLinkURL(ContentContext ctx)
return the link code (in HTML) with the link text in.String
getListGroup()
return the name of group component.protected Object
getLock(ContentContext ctx)
protected String
getParam()
String
getReverseLinkName()
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
getType()
return the type of the element.String
getURL(ContentContext ctx)
generate a URL or URI link with all elements to click on.String
getViewXHTMLCode(ContentContext ctx)
void
init(ComponentBean bean, ContentContext newContext)
boolean
isInline()
check if the component can be inserd inline.boolean
isLinkValid(ContentContext ctx)
return true if the link on the component is enabledboolean
isListable()
you display the composant as a list (if you want)boolean
isMirroredByDefault(ContentContext ctx)
if this component is duplicated, by default it is mirrored.boolean
isOnlyFirstOccurrence()
only modify the first occurrence on the pageboolean
isOnlyPreviousComponent()
change only the component juste before link componentboolean
isOnlyThisPage()
only if reverse link change text only on the same page than the component.boolean
isReverseLink()
return true if the component must be use as reverselink.String
performEdit(ContentContext ctx)
action call when update the content page.void
prepareView(ContentContext ctx)
prepare the rendering of a component. default attributes put in request : style, value, type, compidvoid
setLatestValidDate(Date date)
-
Methods inherited from class org.javlo.component.core.ComplexPropertiesLink
equals, getField, getField, getFontAwesome, getLinkLabelName, getLinkName, init, isContentCachable, isRealContent, isValueTranslatable, reloadProperties, setField, setValue, storeProperties, transflateFrom
-
Methods inherited from class org.javlo.component.core.AbstractVisualComponent
applyReplacement, cleanResources, cleanValue, clearReplacement, clone, compareTo, contructViewStyle, countLine, delete, deleteMySelf, drawColumn, equals, executeCurrentRenderer, executeJSP, executeRenderer, executeRenderer, extractFieldsFromRenderer, forceInit, getAjaxId, getArea, getAuthors, getBackgroundColor, getBaseHelpURL, getClassName, getColomnablePrefix, getColomnableSuffix, getColumn, getColumnMaxSize, getColumnSize, getColumnSizes, getColumnStyle, getComplexityLevel, getComponentBean, getComponentCSS, getComponentCssClass, getComponentId, getComponentLabel, getComponentPath, getConfig, getConfigInValue, getConfigMessage, getContainerPage, getContentAsMap, getContentAsText, getContentCache, getContentMessage, getContentName, getContentTimeCache, getCookiesDisplayStatus, getCreationDate, getCSSStyle, getCurrentPage, getCurrentRenderer, getDataAttributes, getDebugHeader, getDefaultHelpURI, getDefaultRenderer, getDeleteDate, getDescription, getDisplayAsInputName, getDisplayMessage, getEditorComplexity, getEditRenderer, getEditText, getEmptyCode, getEmptyXHTMLCode, getErrorMessage, getErrorMessage, getExternalModules, getExternalResources, getFileDirectory, getFirstPrefix, getForcedId, getForcedPrefixViewXHTMLCode, getForcedRenderer, getForcedSuffixViewXHTMLCode, getFormName, getGroup, getHeaderContent, getHelpText, getHelpType, getHelpURI, getHelpURL, getI18nEditableKeys, getId, getImportFolderPath, getImportFolderPath, getInlineStyle, getInputName, getInputNameColomn, getInputNameColomnStyle, getInputNameRenderer, getInputNameRendererTitle, getItalicAndStrongLanguageMarkerList, getJSOnSubmit, getKey, getLabelLevel, getLastSufix, getLayout, getListClass, getListItemTag, getListTag, getLocalMessage, getManualCssClass, getMarkerList, getMessage, getMirrorWrapper, getModificationDate, getNextComponent, getPage, getPageDescription, getPrefixCssClass, getPrefixViewXHTMLCode, getPreviewAttributes, getPreviewCssClass, getPreviewCssId, getPreviousComponent, getQuotationLanguageMarkerList, getReferenceComponent, getRemplacement, getRenderer, getRendererTitle, getRenderes, getRequestComponent, getSearchLevel, getSelectRendererXHTML, getSpecialInputTag, getSpecialPreviewCssId, getSpecialTagTitle, getSpecialTagXHTML, getSpecificClass, getSpecificCssClass, getStyle, getStyleLabel, getStyleTitle, getSuffixViewXHTMLCode, getTag, getTextColor, getTextForSearch, getTextLabel, getTextMessage, getTextPosition, getTextTitle, getTitleLevel, getTypeInputName, getValue, getValue, getVersion, getViewData, getViewDataFile, getViewID, getViewText, getWidth, getWordCount, getXHTMLCode, getXHTMLConfig, haveRight, includeComponentJSP, includePage, initContent, insert, isAjaxWrapper, isAskWidth, isAutoDeletable, isAutoRenderer, isBackgroundColored, isCanAddClass, isCloseRow, isColored, isColumnable, isConfig, isContentCachableByQuery, isContentTimeCachable, isDefaultValue, isDispayEmptyXHTMLCode, isDisplayable, isDisplayHidden, isEditOnCreate, isFirstElementOfRepeatSequence, isFirstRepeated, isFreeInputLayout, isHelpURL, isHiddable, isHidden, isHiddenInMode, isHiddenInModeValue, isInsertable, isList, isMetaTitle, isMirrorWrapped, isModify, isNeedDelete, isNeedRefresh, isNeedRenderer, isNew, isNextSame, isNextSame, isNolink, isNoLinkable, isOpenRow, isPreviousSame, isPreviousSame, isRepeat, isRepeatable, isRestMatch, isReversedLink, isStyleHidden, isUnique, isValueProperties, isViewDataFile, isVisible, isVisible, isVisibleFromCookies, isWrapped, isXML, loadViewData, markAsNew, newInstance, next, onStyleChange, performColumnable, performConfig, performUpdate, prepareEdit, previous, processView, renderOtherComponent, renderViewXHTMLCode, replaceAllInContent, replaceInContent, resetContentCache, resetViewData, setBackgroundColor, setColumnSize, setColumnStyle, setComponentBean, setContainerPage, setContentCache, setContentTimeCache, setDisplayHidden, setForcedId, setForcedRenderer, setGroup, setHidden, setHiddenInMode, setList, setLocalMessage, setMessage, setMirrorWrapped, setModify, setNeedRefresh, setNextComponent, setNolink, setPage, setPreviousComponent, setRenderer, setRepeat, setStyle, setTextColor, setTextPosition, setValid, setWidth, stored, storeViewData, stringToReader, stringToReader, stringToStream, textToXHTML, toString, updateCache
-
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.javlo.component.core.IReverseLinkComponent
getPage
-
-
-
-
Field Detail
-
logger
protected static Logger logger
create a static logger.
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getEditXHTMLCode
protected String getEditXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getEditXHTMLCode
in classAbstractVisualComponent
- Throws:
Exception
-
getHexColor
public String getHexColor()
Description copied from interface:IContentVisualComponent
get the exadecimal color for representation of the component.- Specified by:
getHexColor
in interfaceIContentVisualComponent
- Overrides:
getHexColor
in classAbstractVisualComponent
- Returns:
- a exadecimal color (sample : a5b499)
-
getLabel
public String getLabel()
-
getLinkId
public String getLinkId()
- Specified by:
getLinkId
in interfaceIInternalLink
-
getLinkText
public String getLinkText(ContentContext ctx)
Description copied from interface:IReverseLinkComponent
this text must be replace with a link.- Specified by:
getLinkText
in interfaceIReverseLinkComponent
- Returns:
-
getLinkURL
public String getLinkURL(ContentContext ctx)
Description copied from interface:IReverseLinkComponent
return the link code (in HTML) with the link text in.- Specified by:
getLinkURL
in interfaceIReverseLinkComponent
- Returns:
-
getReverseLinkName
public String getReverseLinkName()
-
getStyleLabelList
public String[] getStyleLabelList(ContentContext ctx)
Description copied from interface:IContentVisualComponent
return a list of label define the style.- Specified by:
getStyleLabelList
in interfaceIContentVisualComponent
- Overrides:
getStyleLabelList
in classAbstractVisualComponent
- Returns:
- a list of label.
-
getStyleList
public String[] getStyleList(ContentContext ctx)
Description copied from interface:IContentVisualComponent
get the list of style possible for this component.- Specified by:
getStyleList
in interfaceIContentVisualComponent
- Overrides:
getStyleList
in classAbstractVisualComponent
- Returns:
- a list of string represent a style.
-
getType
public String getType()
Description copied from interface:IContentVisualComponent
return the type of the element.- Specified by:
getType
in interfaceIContentVisualComponent
- Returns:
- the type of the element.
-
prepareView
public void prepareView(ContentContext ctx) throws Exception
Description copied from class:AbstractVisualComponent
prepare the rendering of a component. default attributes put in request : style, value, type, compid- Specified by:
prepareView
in interfaceIContentVisualComponent
- Overrides:
prepareView
in classAbstractVisualComponent
- Throws:
Exception
-
getViewXHTMLCode
public String getViewXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getViewXHTMLCode
in classAbstractVisualComponent
- Throws:
Exception
- See Also:
org.javlo.itf.IContentVisualComponent#getXHTMLCode()
-
init
public void init(ComponentBean bean, ContentContext newContext) throws Exception
- Overrides:
init
in classAbstractVisualComponent
- Throws:
Exception
-
isInline
public boolean isInline()
Description copied from interface:IContentVisualComponent
check if the component can be inserd inline.- Specified by:
isInline
in interfaceIContentVisualComponent
- Overrides:
isInline
in classAbstractVisualComponent
- Returns:
- true if component is a inline component. (text, link, image)...
-
isListable
public boolean isListable()
Description copied from interface:IContentVisualComponent
you display the composant as a list (if you want)- Specified by:
isListable
in interfaceIContentVisualComponent
- Overrides:
isListable
in classAbstractVisualComponent
- Returns:
- true if a text is listable
-
isOnlyFirstOccurrence
public boolean isOnlyFirstOccurrence()
Description copied from interface:IReverseLinkComponent
only modify the first occurrence on the page- Specified by:
isOnlyFirstOccurrence
in interfaceIReverseLinkComponent
-
isOnlyThisPage
public boolean isOnlyThisPage()
Description copied from interface:IReverseLinkComponent
only if reverse link change text only on the same page than the component.- Specified by:
isOnlyThisPage
in interfaceIReverseLinkComponent
- Returns:
-
isOnlyPreviousComponent
public boolean isOnlyPreviousComponent()
Description copied from interface:IReverseLinkComponent
change only the component juste before link component- Specified by:
isOnlyPreviousComponent
in interfaceIReverseLinkComponent
- Returns:
-
isReverseLink
public boolean isReverseLink()
Description copied from interface:IReverseLinkComponent
return true if the component must be use as reverselink.- Specified by:
isReverseLink
in interfaceIReverseLinkComponent
- Returns:
-
performEdit
public String performEdit(ContentContext ctx)
Description copied from interface:IContentVisualComponent
action call when update the content page.- Specified by:
performEdit
in interfaceIContentVisualComponent
- Overrides:
performEdit
in classAbstractVisualComponent
- Returns:
- the error message, null if no error
-
getURL
public String getURL(ContentContext ctx) throws Exception
Description copied from interface:ILink
generate a URL or URI link with all elements to click on.
-
isLinkValid
public boolean isLinkValid(ContentContext ctx) throws Exception
Description copied from interface:ILink
return true if the link on the component is enabled- Specified by:
isLinkValid
in interfaceILink
- Returns:
- Throws:
Exception
-
getLock
protected Object getLock(ContentContext ctx)
- Overrides:
getLock
in classAbstractVisualComponent
-
getListGroup
public String getListGroup()
Description copied from interface:IContentVisualComponent
return the name of group component.- Specified by:
getListGroup
in interfaceIContentVisualComponent
- Overrides:
getListGroup
in classAbstractVisualComponent
- Returns:
-
isMirroredByDefault
public boolean isMirroredByDefault(ContentContext ctx)
Description copied from interface:IContentVisualComponent
if this component is duplicated, by default it is mirrored.- Specified by:
isMirroredByDefault
in interfaceIContentVisualComponent
- Overrides:
isMirroredByDefault
in classAbstractVisualComponent
- Returns:
-
setLatestValidDate
public void setLatestValidDate(Date date)
- Specified by:
setLatestValidDate
in interfaceILink
-
getLatestValidDate
public Date getLatestValidDate()
- Specified by:
getLatestValidDate
in interfaceILink
-
getIcon
public String getIcon()
- Specified by:
getIcon
in interfaceIContentVisualComponent
- Overrides:
getIcon
in classAbstractVisualComponent
-
getColumnableDefaultValue
protected boolean getColumnableDefaultValue()
- Overrides:
getColumnableDefaultValue
in classAbstractVisualComponent
-
-