Package org.javlo.component.links
Class SimpleInternalLink
- java.lang.Object
-
- org.javlo.component.core.AbstractVisualComponent
-
- org.javlo.component.core.ComplexPropertiesLink
-
- org.javlo.component.links.SimpleInternalLink
-
- All Implemented Interfaces:
Comparable<IContentVisualComponent>,IContentVisualComponent,IInternalLink,IReverseLinkComponent,IRestItem
public class SimpleInternalLink extends ComplexPropertiesLink implements IInternalLink, IReverseLinkComponent
- Author:
- pvandermaesen
-
-
Field Summary
Fields Modifier and Type Field Description protected static Loggerloggercreate a static logger.static StringTYPE-
Fields inherited from class org.javlo.component.core.ComplexPropertiesLink
HEADER_V1_0, LABEL_KEY, LINK_KEY, properties
-
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, HIDDEN, 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 SimpleInternalLink()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetEditXHTMLCode(ContentContext ctx)StringgetFontAwesome()protected StringgetForcedPrefixViewXHTMLCode(ContentContext ctx)StringgetHelpURI(ContentContext ctx)StringgetHexColor()get the exadecimal color for representation of the component.StringgetLabel()StringgetLinkId()StringgetLinkText(ContentContext ctx)this text must be replace with a link.StringgetLinkURL(ContentContext ctx)return the link code (in HTML) with the link text in.StringgetListGroup()return the name of group component.protected StringgetParam()StringgetReverseLinkName()StringgetSuffixViewXHTMLCode(ContentContext ctx)code for sufix the view XHTML code.protected StringgetTag(ContentContext ctx)StringgetType()return the type of the element.StringgetViewXHTMLCode(ContentContext ctx)voidinit(ComponentBean bean, ContentContext newContext)booleaninitContent(ContentContext ctx)init the content with a default value. sample : "lorem ipsum" for text component.booleanisInline()check if the component can be inserd inline.booleanisListable()you display the composant as a list (if you want)booleanisOnlyFirstOccurrence()only modify the first occurrence on the pagebooleanisOnlyPreviousComponent()change only the component juste before link componentbooleanisOnlyThisPage()only if reverse link change text only on the same page than the component.booleanisReverseLink()return true if the component must be use as reverselink.StringperformEdit(ContentContext ctx)action call when update the content page.voidprepareView(ContentContext ctx)prepare the rendering of a component. default attributes put in request : style, value, type, compid-
Methods inherited from class org.javlo.component.core.ComplexPropertiesLink
equals, getField, getField, 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, getColumnableDefaultValue, 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, getForcedRenderer, getForcedSuffixViewXHTMLCode, getFormName, getGroup, getHeaderContent, getHelpText, getHelpType, getHelpURL, getI18nEditableKeys, getIcon, getId, getImportFolderPath, getImportFolderPath, getInlineStyle, getInputName, getInputNameColomn, getInputNameColomnStyle, getInputNameRenderer, getInputNameRendererTitle, getItalicAndStrongLanguageMarkerList, getJSOnSubmit, getKey, getLabelLevel, getLastSufix, getLayout, getListClass, getListItemTag, getListTag, getLocalMessage, getLock, 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, getStyleLabelList, getStyleList, getStyleTitle, getTextColor, getTextForSearch, getTextLabel, getTextMessage, getTextPosition, getTextTitle, getTitleLevel, getTypeInputName, getValue, getValue, getVersion, getViewData, getViewDataFile, getViewID, getViewText, getWidth, getWordCount, getXHTMLCode, getXHTMLConfig, haveRight, includeComponentJSP, includePage, 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, isMirroredByDefault, 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
-
init
public void init(ComponentBean bean, ContentContext newContext) throws Exception
- Overrides:
initin classAbstractVisualComponent- Throws:
Exception
-
isInline
public boolean isInline()
Description copied from interface:IContentVisualComponentcheck if the component can be inserd inline.- Specified by:
isInlinein interfaceIContentVisualComponent- Overrides:
isInlinein classAbstractVisualComponent- Returns:
- true if component is a inline component. (text, link, image)...
-
getTag
protected String getTag(ContentContext ctx)
- Overrides:
getTagin classAbstractVisualComponent
-
prepareView
public void prepareView(ContentContext ctx) throws Exception
Description copied from class:AbstractVisualComponentprepare the rendering of a component. default attributes put in request : style, value, type, compid- Specified by:
prepareViewin interfaceIContentVisualComponent- Overrides:
prepareViewin classAbstractVisualComponent- Throws:
Exception
-
getForcedPrefixViewXHTMLCode
protected String getForcedPrefixViewXHTMLCode(ContentContext ctx)
- Overrides:
getForcedPrefixViewXHTMLCodein classAbstractVisualComponent
-
getSuffixViewXHTMLCode
public String getSuffixViewXHTMLCode(ContentContext ctx)
Description copied from interface:IContentVisualComponentcode for sufix the view XHTML code.- Specified by:
getSuffixViewXHTMLCodein interfaceIContentVisualComponent- Overrides:
getSuffixViewXHTMLCodein classAbstractVisualComponent- Returns:
- XHTML code.
-
getViewXHTMLCode
public String getViewXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getViewXHTMLCodein classAbstractVisualComponent- Throws:
Exception- See Also:
org.javlo.itf.IContentVisualComponent#getXHTMLCode()
-
getLinkId
public String getLinkId()
- Specified by:
getLinkIdin interfaceIInternalLink
-
getLabel
public String getLabel()
-
getReverseLinkName
public String getReverseLinkName()
-
getEditXHTMLCode
protected String getEditXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getEditXHTMLCodein classAbstractVisualComponent- Throws:
Exception
-
getType
public String getType()
Description copied from interface:IContentVisualComponentreturn the type of the element.- Specified by:
getTypein interfaceIContentVisualComponent- Returns:
- the type of the element.
-
performEdit
public String performEdit(ContentContext ctx)
Description copied from interface:IContentVisualComponentaction call when update the content page.- Specified by:
performEditin interfaceIContentVisualComponent- Overrides:
performEditin classAbstractVisualComponent- Returns:
- the error message, null if no error
-
getHexColor
public String getHexColor()
Description copied from interface:IContentVisualComponentget the exadecimal color for representation of the component.- Specified by:
getHexColorin interfaceIContentVisualComponent- Overrides:
getHexColorin classAbstractVisualComponent- Returns:
- a exadecimal color (sample : a5b499)
-
isListable
public boolean isListable()
Description copied from interface:IContentVisualComponentyou display the composant as a list (if you want)- Specified by:
isListablein interfaceIContentVisualComponent- Overrides:
isListablein classAbstractVisualComponent- Returns:
- true if a text is listable
-
getHelpURI
public String getHelpURI(ContentContext ctx)
- Overrides:
getHelpURIin classAbstractVisualComponent
-
getLinkText
public String getLinkText(ContentContext ctx)
Description copied from interface:IReverseLinkComponentthis text must be replace with a link.- Specified by:
getLinkTextin interfaceIReverseLinkComponent- Returns:
-
getLinkURL
public String getLinkURL(ContentContext ctx)
Description copied from interface:IReverseLinkComponentreturn the link code (in HTML) with the link text in.- Specified by:
getLinkURLin interfaceIReverseLinkComponent- Returns:
-
isReverseLink
public boolean isReverseLink()
Description copied from interface:IReverseLinkComponentreturn true if the component must be use as reverselink.- Specified by:
isReverseLinkin interfaceIReverseLinkComponent- Returns:
-
isOnlyFirstOccurrence
public boolean isOnlyFirstOccurrence()
Description copied from interface:IReverseLinkComponentonly modify the first occurrence on the page- Specified by:
isOnlyFirstOccurrencein interfaceIReverseLinkComponent
-
isOnlyThisPage
public boolean isOnlyThisPage()
Description copied from interface:IReverseLinkComponentonly if reverse link change text only on the same page than the component.- Specified by:
isOnlyThisPagein interfaceIReverseLinkComponent- Returns:
-
isOnlyPreviousComponent
public boolean isOnlyPreviousComponent()
Description copied from interface:IReverseLinkComponentchange only the component juste before link component- Specified by:
isOnlyPreviousComponentin interfaceIReverseLinkComponent- Returns:
-
initContent
public boolean initContent(ContentContext ctx) throws Exception
Description copied from interface:IContentVisualComponentinit the content with a default value. sample : "lorem ipsum" for text component.- Specified by:
initContentin interfaceIContentVisualComponent- Overrides:
initContentin classAbstractVisualComponent- Returns:
- true if content is create.
- Throws:
Exception
-
getListGroup
public String getListGroup()
Description copied from interface:IContentVisualComponentreturn the name of group component.- Specified by:
getListGroupin interfaceIContentVisualComponent- Overrides:
getListGroupin classAbstractVisualComponent- Returns:
-
getFontAwesome
public String getFontAwesome()
- Specified by:
getFontAwesomein interfaceIContentVisualComponent- Overrides:
getFontAwesomein classComplexPropertiesLink
-
-