Interface Link
The form can be retrieved via
getTemplate().getGomProvider().- Since:
- 2.3.17
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.since 5.1.43 - no replacement, since 5.0 every link should be "generic". -
Method Summary
Modifier and TypeMethodDescription@NotNull DatagetData()Deprecated.since 4.2.440 - usegetFormData()instead@NotNull FormDataGets theformdata containerfor this link.Provides the language the link is created for.getNode()Deprecated.since 5.2.21 - usegetFormData()andsetFormData(FormData)instead.@Nullable LinkTemplateReturns the link template this link is based on.getText()The display text.voidDeprecated.since 4.2.440 - usesetFormData(de.espirit.firstspirit.forms.FormData)insteadvoidsetFormData(@NotNull FormData formData) Sets the givenformdata containerfor this link.voidsetTemplate(LinkTemplate linkTemplate) voidSets 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 containerfor 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 containerfor 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 returnnullif 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 storeddatawill be discarded and parsed again on next access corresponding to theformof the provided template.- 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 linkthe given text will be stored in thetext editordefined in the belonginglink template.
This call may not result in a change andgetText()may return the old value, e.g. if the provided value 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
-