Value range of the Link data type
FirstSpirit provides the data type Link for the processing/editing of values which represent a link within or outside the project.
For further information about links and link templates in FirstSpirit please see Chapter Link templates.
Definition using the standard input components
Different input components can be defined in the form area of a page or section template. These form elements can then be used to insert the actual editorial contents into the page. The Standard input components supported by FirstSpirit return different data types.
The following standard input components return an object of data type Link or a list of Link objects;
Then, with the help of a $CMS_VALUE(...)$ instruction, methods can then be applied to this object:
$CMS_VALUE(IDENTIFIER.METHOD)$
Methods on link objects
The table below lists all methods which can be invoked on objects of data type Link.
equals(Object)
Method name |
Return type |
Available since |
equals(Object) |
boolean |
|
Overview
findReferences(Language)
Method name |
Return type |
Available since |
findReferences(Language) |
List |
|
Overview
get(Object)
Returns the value mapped to the given key or null if the given key isn't mapped.
Method name |
Return type |
Available since |
get(Object) |
Object |
4.0.17 |
Overview
getClass
The .getClass() (in Bean syntax: .class) method returns the class of the invoking object (cf. java.lang.Class).
Invocation:
$CMS_VALUE(myString.class)$
$CMS_VALUE(myString.getClass())$
Output:
java.lang.String
Method name |
Return type |
Available since |
getClass |
Class |
|
Overview
getContentID
Method name |
Return type |
Available since |
getContentID |
String |
|
Overview
getFormData
Gets the formdata container for this link.
Method name |
Return type |
Available since |
getFormData |
FormData |
4.2.440 |
Overview
getLinkLanguage
Provides the language the link is created for.
Method name |
Return type |
Available since |
getLinkLanguage |
Language |
4.2.400 |
Overview
getSectiontemplate
Method name |
Return type |
Available since |
getSectiontemplate |
String |
|
Overview
getTemplate
Returns the link template this link is based on.
Method name |
Return type |
Available since |
getTemplate |
LinkTemplate |
2.3.17 |
Overview
getText
The method getText returns the content of the input component of a link which is selected in the drop down box "Link text" on the tab "Properties. (See also Chapter Link templates).
Method name |
Return type |
Available since |
getText |
String |
2.3.17 |
Overview
isCase(Object)
Method name |
Return type |
Available since |
isCase(Object) |
boolean |
|
Overview
isNull
The .isNull() (in Bean syntax: .isNull) method checks whether an expression or object is null , e.g. storeElement.isNull(). In the case of objects with complex values or objects, the object decides when it is null. The data type DomElement for example always contains an empty document, thus it is never null. For this reason, checking an empty DOM editor input component by using the method .isNull() returns the value false, whereas checking the component with .isEmpty() would return the value true.
The method .isNull() returns a Boolean value as the check result. true is the check result if the expression or object is null and false if not.
Method name |
Return type |
Available since |
isNull |
boolean |
|
Overview
isSet(Object)
Indicates whether the given key is set or not.
Method name |
Return type |
Available since |
isSet(Object) |
boolean |
4.0.17 |
Overview
print
Method name |
Return type |
Available since |
print |
void |
|
Overview
set(String, Object)
Method name |
Return type |
Available since |
set(String, Object) |
Object |
|
Overview
setFormData(FormData)
Sets the given formdata container for this link.
Method name |
Return type |
Available since |
setFormData(FormData) |
void |
4.2.440 |
Overview
setTemplate(LinkTemplate)
Switch the template - use with caution.
Method name |
Return type |
Available since |
setTemplate(LinkTemplate) |
void |
2.3.17 |
Overview
setText(String)
Sets the text for this link.
Method name |
Return type |
Available since |
setText(String) |
void |
2.3.17 |
Overview
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.
Method name |
Return type |
Available since |
toJSON |
String |
5.2.11 |
Overview
toString
Method name |
Return type |
Available since |
toString |
String |
|
Overview
type
Method name |
Return type |
Available since |
type |
String |
|
Overview