Class GadgetIdentifier
java.lang.Object
de.espirit.firstspirit.ui.gadgets.GadgetIdentifier
Identifier for gadgets providing information to find named form elements in a gadget model.
The original gadget's identifier will be identified having the
FORM_TAG
as key.
A gadget may decide to identify inner components by handing over an identifier with a custom key.
Hierarchical gadgets should envelop
inner forms to enable hierarchic identification.- Since:
- 4.2.405
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionenvelop
(@NotNull String name, @NotNull Serializable key) Envelop this identifier as inner node of a new identifier.forLanguage
(@NotNull Language language) Get an identifier from this instance for a specific language.static GadgetIdentifier
from
(@NotNull GomFormElement form) Get a default identifier for a given form element.@Nullable GadgetIdentifier
Get the inner node of a hierarchical identifier.@NotNull Serializable
getKey()
Get the key of the specific gadget component.@Nullable Language
Get the language this identifier was created for.@NotNull String
getName()
Get the name of the gadget.static GadgetIdentifier
on
(@NotNull String name, @NotNull Serializable key) Get an identifier based on the given name and key.
-
Field Details
-
FORM_TAG
The generic default form-based identifier's key.- Since:
- 4.2.405
- See Also:
-
-
Method Details
-
from
Get a default identifier for a given form element.- Parameters:
form
- The form element to base the identifier upon.- Returns:
- The form-related identifier.
- Since:
- 4.2.405
-
on
public static GadgetIdentifier on(@NotNull @NotNull String name, @NotNull @NotNull Serializable key) Get an identifier based on the given name and key.- Parameters:
name
- The name of the gadget.key
- The key of a specific component.- Returns:
- The gadget identifier.
- Since:
- 4.2.405
-
envelop
Envelop this identifier as inner node of a new identifier.- Parameters:
name
- The name of the outer gadget node.key
- A tag for gadget specific identification means.- Returns:
- A new identifier containing the original one as inner node.
- Since:
- 4.2.405
-
forLanguage
Get an identifier from this instance for a specific language.- Parameters:
language
- The language to get the identifier for.- Returns:
- A gadget identifier.
- Since:
- 4.2.405
-
getName
Get the name of the gadget.- Returns:
- The gadget's name.
- Since:
- 4.2.405
-
getKey
Get the key of the specific gadget component.- Returns:
- The specific component's key.
- Since:
- 4.2.405
-
getLanguage
Get the language this identifier was created for.- Returns:
- The language or
null
- Since:
- 4.2.405
-
getInnerNode
Get the inner node of a hierarchical identifier.- Returns:
- The inner node or
null
. - Since:
- 4.2.405
-