Interface Link
The form can be retrieved via
getTemplate()
. getGomProvider()
.- Since:
- 2.3.17
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Deprecated.since 5.1.43 - no replacement, since 5.0 every link should be "generic". -
Method Summary
Modifier and TypeMethodDescription@NotNull Data
getData()
Deprecated.since 4.2.440 - usegetFormData()
instead@NotNull FormData
Gets theformdata container
for this link.Provides the language the link is created for.getNode()
Deprecated.since 5.2.21 - usegetFormData()
andsetFormData(FormData)
instead.@Nullable LinkTemplate
Returns the link template this link is based on.getText()
The display text.void
Deprecated.since 4.2.440 - usesetFormData(de.espirit.firstspirit.forms.FormData)
insteadvoid
setFormData
(@NotNull FormData formData) Sets the givenformdata container
for this link.void
setTemplate
(LinkTemplate linkTemplate) void
Sets the text for this link.
-
Field Details
-
GENERIC_LINK
Deprecated.since 5.1.43 - no replacement, since 5.0 every link should be "generic".The type identifier for a generic link.- Since:
- 4.2.2
- See Also:
-
-
Method Details
-
getData
Deprecated.since 4.2.440 - usegetFormData()
insteadGet the data container for this link.- Since:
- 4.2.2
- See Also:
-
setData
Deprecated.since 4.2.440 - usesetFormData(de.espirit.firstspirit.forms.FormData)
insteadSet the data container for this link.- Parameters:
data
- the new data container for this link, must be notnull
- Since:
- 4.2.2
-
getFormData
@ApiDoc(comment="Gets the formdata container for this link.", since="4.2.440") @NotNull @NotNull FormData getFormData()Gets theformdata container
for this link.- Returns:
- the form data container for this link.
- Since:
- 4.2.440
-
setFormData
@ApiDoc(comment="Sets the given formdata container for this link.", since="4.2.440") void setFormData(@NotNull @NotNull FormData formData) Sets the givenformdata container
for this link.- Parameters:
formData
- the form data container to be set for this link.- Since:
- 4.2.440
-
getNode
Deprecated.since 5.2.21 - usegetFormData()
andsetFormData(FormData)
instead.For backward compatibility with FirstSpirit 4.1.- Since:
- 2.3.17
-
getTemplate
@ApiDoc(comment="Returns the link template this link is based on.", since="2.3.17") @Nullable @Nullable LinkTemplate getTemplate()Returns the link template this link is based on. May returnnull
if the template does not exist.- Since:
- 2.3.17
-
setTemplate
@ApiDoc(comment="Switch the template - use with caution.", since="2.3.17") void setTemplate(LinkTemplate linkTemplate) Switch the template - use with caution. The storeddata
will be discarded andparsed again on next access corresponding to theform
of the providedtemplate.- Since:
- 2.3.17
-
getText
The display text. SeeLinkTemplate.getTextEditorName()
.- Since:
- 2.3.17
-
setText
Sets the text for this link. If this link is ageneric link
thegiven text will be stored in thetext editor
definedin the belonginglink template
.
This call may not result in a change andgetText()
may return the old value, e.g. if the providedvalue is not valid or ifgetTemplate()
.getTextEditorName()
deliversnull
. 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); }
- Since:
- 2.3.17
-
getLinkLanguage
@ApiDoc(comment="Provides the language the link is created for.", since="4.2.400") Language getLinkLanguage()Provides the language the link is created for.- Returns:
- The link's language.
- Since:
- 4.2.400
-