Startseite / Vorlagenentwicklung / Vorlagensyntax / Datentypen / TargetReference

Datentyp TargetReferenceVerfügbar ab FirstSpirit-Version 4.2

Wertebereich des Datentyps TargetReference

Für die Bearbeitung von Werten, die eine Referenz auf ein FirstSpirit-Objekt repräsentieren, stellt FirstSpirit den Datentyp TargetReference zur Verfügung.

Der Datentyp TargetReference liefert eine Referenz zu einem beliebigen FirstSpirit-Objekt zurück. Der Typ des referenzierten Objekts ist dabei nicht festgelegt: es können Referenzen zu Medien (Bilder und Dateien), zu Dokumentengruppen, zu Ordnern, zu Seiten (Inhalte-Verwaltung), zu Seitenreferenzen (Struktur-Verwaltung) und Content2-Objekten (Datenquellen-Verwaltung) sowie zu jedem anderen Verwaltungsbereich ausgewählt sein.

Weitere Informationen zum Datentyp TargetReference siehe API-Dokumentation:

de.espirit.firstspirit.access.editor.value.TargetReference

Definition über die Standard-Eingabekomponenten

Die Eingabekomponente FS_REFERENCE dient zur Aufnahme von Referenzen auf FirstSpirit-Objekte (Seitenreferenzen, Seiten aus der Inhalte-Verwaltung, Medien usw.).

Diese Eingabekomponente liefert dann beim Zugriff auf den gespeicherten Wert mithilfe einer $CMS_VALUE(...)$-Anweisung den Datentyp TargetReference zurück.

Methoden auf TargetReference-Objekten

In der unten angegebenen Tabelle werden alle Methoden aufgelistet, die auf Objekten von Datentyp TargetReference aufgerufen werden können:

Objekt wird von folgenden Formular-Objekten erzeugt:
FS_REFERENCE
Methodenname Rückgabetyp Kurzbeschreibung Verfügbar seit
equals(Object) boolean
get IDProvider Get the reference of the element currently set in this TargetReference. 4.2
getClass Class Klasse des aufrufenden Objektes
getContent Content2 Returns a Content2 reference or null if reference is not a type of Content2. 4.2
getDocumentGroup DocumentGroup Returns a DocumentGroup reference or null if the referenced instance is not a DocumentGroup. 4.2.17
getLanguage Language Get the language of the selected reference. 4.2
getMedia Media Returns a set medium if any or null if reference is not a type of Media. 4.2
getPage Page Returns a set page or null if referenced element is not type of Page. 4.2
getPageRef PageRef Returns a set page reference or null if referenced element is not type of PageRef. 4.2
getRemoteSymName String Return the symbolic remote project name set in the local remote project configuration. 4.2
getSection Section Get the referenced section. 4.2
getSectionName String Return the name of the Section if the referenced element is of type Section. 4.2
getStoreType Store$Type Get the kind of Store.Type for the selected item. 4.2
getUid String Retrieve the referenced element's unique id. 4.2
getUidType IDProvider$UidType Get the IDProvider.UidType of the given element. 4.2
isCase(Object) boolean
isEmpty boolean Prüft, ob ein Ausdruck leer ist 4.2
isNull boolean Prüft, ob ein Ausdruck Null ist
loadSection(Page, String) Section Load a section of the given referenced page identified by its section name. 4.2
print void
resetTo(IDProvider, String) void Reset the reference and the remote information and infer settings for UID and UidType. 4.2.202
set(IDProvider) void Set a new element reference of type IDProvider and infer settings for UID and UidType. 4.2
set(String, Object) Object
setRemoteSymName(String) void If the set element is a remote project reference, this method set the symbolic remote project name definied in the local project configuration. 4.2
setSection(Section) void Set the section to be referenced. 4.2
setSectionName(String) void Use this to set the section. 4.2
setUid(String) void Set the Uid of the referenced element. 4.2
setUidType(IDProvider$UidType) void Set the IDProvider.UidType of the referenced element. 4.2
toJSON String Convert to a JSON-compatible string representation including necessary quotes and escaping for immediate use. Handles Maps, Collections, Arrays, Numbers, Strings, Boolean, Date, and JsonElement. A date instance will be converted to an ISO-8601 formatted date string. Any object other than above will be converted using its 'toString()' value. 5.2.11
toString String
type String

equals(Object)

Methodenname Rückgabetyp Verfügbar seit
equals(Object) boolean

get

Get the reference of the element currently set in this TargetReference.
Methodenname Rückgabetyp Verfügbar seit
get IDProvider 4.2

getClass

Die Methode .getClass() (in Bean-Syntax: .class) liefert die Klasse des aufrufendes Objektes zurück (vgl. java.lang.Class).

Aufruf:

$CMS_VALUE(myString.class)$
$CMS_VALUE(myString.getClass())$

Ausgabe:

java.lang.String
Methodenname Rückgabetyp Verfügbar seit
getClass Class

getContent

Returns a Content2 reference or null if reference is not a type of Content2.
Methodenname Rückgabetyp Verfügbar seit
getContent Content2 4.2

getDocumentGroup

Returns a DocumentGroup reference or null if the referenced instance is not a DocumentGroup.
Methodenname Rückgabetyp Verfügbar seit
getDocumentGroup DocumentGroup 4.2.17

getLanguage

Get the language of the selected reference.
Methodenname Rückgabetyp Verfügbar seit
getLanguage Language 4.2

getMedia

Returns a set medium if any or null if reference is not a type of Media.
Methodenname Rückgabetyp Verfügbar seit
getMedia Media 4.2

getPage

Returns a set page or null if referenced element is not type of Page.
Methodenname Rückgabetyp Verfügbar seit
getPage Page 4.2

getPageRef

Returns a set page reference or null if referenced element is not type of PageRef.
Methodenname Rückgabetyp Verfügbar seit
getPageRef PageRef 4.2

getRemoteSymName

Return the symbolic remote project name set in the local remote project configuration.
Methodenname Rückgabetyp Verfügbar seit
getRemoteSymName String 4.2

getSection

Get the referenced section.
Methodenname Rückgabetyp Verfügbar seit
getSection Section 4.2

getSectionName

Return the name of the Section if the referenced element is of type Section.
Methodenname Rückgabetyp Verfügbar seit
getSectionName String 4.2

getStoreType

Get the kind of Store.Type for the selected item.
Methodenname Rückgabetyp Verfügbar seit
getStoreType Store$Type 4.2

getUid

Retrieve the referenced element's unique id.
Methodenname Rückgabetyp Verfügbar seit
getUid String 4.2

getUidType

Get the IDProvider.UidType of the given element.
Methodenname Rückgabetyp Verfügbar seit
getUidType IDProvider$UidType 4.2

isCase(Object)

Methodenname Rückgabetyp Verfügbar seit
isCase(Object) boolean

isEmpty

Die Methode .isEmpty() (in Bean-Syntax: .isEmpty) prüft, ob ein Ausdruck bzw. Objekt leer ist, z. B. storeElement.isEmpty(). Das Ergebnis der semantischen Prüfung hängt vom Ausdruck bzw. Objekt ab, z. B. eine Zeichenkette ist dann leer, wenn sie kein Zeichen enthält. Bei Objekten mit komplexen Werten oder Objekten entscheidet das Objekt, wann es leer ist. Der Datentyp DomElement enthält beispielsweise immer ein leeres Dokument, ist also nie null. Die Prüfung einer leeren DOM-Editor-Eingabekomponente mit der Methode .isNull() liefert daher den Wert false, während die Prüfung der Komponente auf .isEmpty() den Wert true liefern würde.

Die Methode .isEmpty() gibt einen booleschen Wert als Ergebnis der Prüfung zurück. true (=wahr) ist die Prüfung, wenn der Ausdruck bzw. das Objekt leer ist und false (=unwahr) wenn nicht.

Methodenname Rückgabetyp Verfügbar seit
isEmpty boolean 4.2

isNull

Die Methode .isNull() (in Bean-Syntax: .isNull) prüft, ob ein Ausdruck bzw. Objekt Null ist, z. B. storeElement.isNull(). Bei Objekten mit komplexen Werten oder Objekten entscheidet das Objekt, wann es null ist. Der Datentyp DomElement enthält beispielsweise immer ein leeres Dokument, ist also nie null. Die Prüfung einer leeren DOM-Editor-Eingabekomponente mit der Methode .isNull() liefert daher den Wert false, während die Prüfung der Komponente auf .isEmpty() den Wert true liefern würde.

Die Methode .isNull() gibt einen booleschen Wert als Ergebnis der Prüfung zurück. true (=wahr) ist die Prüfung, wenn der Ausdruck bzw. das Objekt Null ist und false (=unwahr) wenn nicht.

Methodenname Rückgabetyp Verfügbar seit
isNull boolean

loadSection(Page, String)

Load a section of the given referenced page identified by its section name.
Methodenname Rückgabetyp Verfügbar seit
loadSection(Page, String) Section 4.2

print

Methodenname Rückgabetyp Verfügbar seit
print void

resetTo(IDProvider, String)

Reset the reference and the remote information and infer settings for UID and UidType.
Methodenname Rückgabetyp Verfügbar seit
resetTo(IDProvider, String) void 4.2.202

set(IDProvider)

Set a new element reference of type IDProvider and infer settings for UID and UidType.
Methodenname Rückgabetyp Verfügbar seit
set(IDProvider) void 4.2

set(String, Object)

Methodenname Rückgabetyp Verfügbar seit
set(String, Object) Object

setRemoteSymName(String)

If the set element is a remote project reference, this method set the symbolic remote project name definied in the local project configuration.
Methodenname Rückgabetyp Verfügbar seit
setRemoteSymName(String) void 4.2

setSection(Section)

Set the section to be referenced.
Methodenname Rückgabetyp Verfügbar seit
setSection(Section) void 4.2

setSectionName(String)

Use this to set the section.
Methodenname Rückgabetyp Verfügbar seit
setSectionName(String) void 4.2

setUid(String)

Set the Uid of the referenced element.
Methodenname Rückgabetyp Verfügbar seit
setUid(String) void 4.2

setUidType(IDProvider$UidType)

Set the IDProvider.UidType of the referenced element.
Methodenname Rückgabetyp Verfügbar seit
setUidType(IDProvider$UidType) void 4.2

toJSON

Convert to a JSON-compatible string representation including necessary quotes and escaping for immediate use. Handles Maps, Collections, Arrays, Numbers, Strings, Boolean, Date, and JsonElement. A date instance will be converted to an ISO-8601 formatted date string. Any object other than above will be converted using its 'toString()' value.
Methodenname Rückgabetyp Verfügbar seit
toJSON String 5.2.11

toString

Methodenname Rückgabetyp Verfügbar seit
toString String

type

Methodenname Rückgabetyp Verfügbar seit
type String

© 2005 - 2024 Crownpeak Technology GmbH | Alle Rechte vorbehalten. | FirstSpirit 2024.5 | Datenschutz