public interface Link extends Dict<String,Object>
getTemplate()
. getGomProvider()
.Modifier and Type | Field and Description |
---|---|
static String |
GENERIC_LINK
Deprecated.
since 5.1.43 - no replacement, since 5.0 every link should be "generic".
|
Modifier and Type | Method and Description |
---|---|
Data |
getData()
Deprecated.
since 4.2.440 - use
getFormData() instead |
FormData |
getFormData()
Gets the
formdata container for this link. |
Language |
getLinkLanguage()
Provides the language the link is created for.
|
Element |
getNode()
Deprecated.
since 5.2.21 - use
getFormData() and setFormData(FormData) instead. |
LinkTemplate |
getTemplate()
Returns the link template this link is based on.
|
String |
getText()
The display text.
|
void |
setData(Data data)
Deprecated.
since 4.2.440 - use
setFormData(de.espirit.firstspirit.forms.FormData) instead |
void |
setFormData(FormData formData)
Sets the given
formdata container for this link. |
void |
setTemplate(LinkTemplate linkTemplate)
Switch the template - use with caution.
|
void |
setText(String text)
Sets the text for this link.
|
@Deprecated static final String GENERIC_LINK
@Deprecated @NotNull Data getData()
getFormData()
insteadsetData(de.espirit.firstspirit.access.store.Data)
@Deprecated void setData(@NotNull Data data)
setFormData(de.espirit.firstspirit.forms.FormData)
insteaddata
- the new data container for this link, must be not null
@ApiDoc(comment="Gets the formdata container for this link.", since="4.2.440") @NotNull FormData getFormData()
formdata container
for this link.@ApiDoc(comment="Sets the given formdata container for this link.", since="4.2.440") void setFormData(@NotNull FormData formData)
formdata container
for this link.formData
- the form data container to be set for this link.@Deprecated Element getNode()
getFormData()
and setFormData(FormData)
instead.@ApiDoc(comment="Returns the link template this link is based on.", since="2.3.17") @Nullable LinkTemplate getTemplate()
null
if the template does not exist.@ApiDoc(comment="Switch the template - use with caution.", since="2.3.17") void setTemplate(LinkTemplate linkTemplate)
data
will be discarded andparsed again on next access corresponding to the form
of the providedtemplate.@ApiDoc(comment="The display text.", since="2.3.17") String getText()
LinkTemplate.getTextEditorName()
.@ApiDoc(comment="Sets the text for this link.", since="2.3.17") void setText(String text)
generic link
thegiven text will be stored in the text editor
definedin the belonging link template
. This call may not result in a change and getText()
may return the old value, e.g. if the providedvalue is not valid or if getTemplate()
. getTextEditorName()
delivers null
. You may use this code instead: final LinkTemplate linkTemplate = link.getTemplate(); final String editorName = linkTemplate.getTextEditorName(); if (editorName != null) { link.getFormData().get(link.getLanguage(), editorName).set(text); }
Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210