Start page
Start page

Start page / Template development / Template syntax / Data types / Link

Link data typeAvailable from FirstSpirit Version 4.0

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 .

The object is generated by the following form objects:
CMS_INPUT_LINK
Method name Return type Brief description Available since
compareTo(Comparable) int
equals(Object) boolean
findReferences(Language) List
get(Object) Object
getClass Class Class of the invoking object
getContentID String
getFormData FormData
getLinkLanguage Language
getNode Element
getSectiontemplate String
getTemplate LinkTemplate
getText String Link text
isCase(Object) boolean
isNull boolean Checks whether an expression is null (zero)
isSet(Object) boolean
print void
set(String, Object) Object
setFormData(FormData) void
setTemplate(LinkTemplate) void
setText(String) void
toJson String Convert to JSON string representtion (only handles Maps, Collections, Arrays, Numbers, and Strings) 4.2.14
toString String
type String

compareTo(Comparable)

Method name Return type Available since
compareTo(Comparable) int

equals(Object)

Method name Return type Available since
equals(Object) boolean

findReferences(Language)

Method name Return type Available since
findReferences(Language) List

get(Object)

Method name Return type Available since
get(Object) Object

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

getContentID

Method name Return type Available since
getContentID String

getFormData

Method name Return type Available since
getFormData FormData

getLinkLanguage

Method name Return type Available since
getLinkLanguage Language

getNode

Method name Return type Available since
getNode Element

getSectiontemplate

Method name Return type Available since
getSectiontemplate String

getTemplate

Method name Return type Available since
getTemplate LinkTemplate

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

isCase(Object)

Method name Return type Available since
isCase(Object) boolean

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

isSet(Object)

Method name Return type Available since
isSet(Object) boolean

print

Method name Return type Available since
print void

set(String, Object)

Method name Return type Available since
set(String, Object) Object

setFormData(FormData)

Method name Return type Available since
setFormData(FormData) void

setTemplate(LinkTemplate)

Method name Return type Available since
setTemplate(LinkTemplate) void

setText(String)

Method name Return type Available since
setText(String) void

toJson

Convert to JSON string representtion (only handles Maps, Collections, Arrays, Numbers, and Strings)
Method name Return type Available since
toJson String 4.2.14

toString

Method name Return type Available since
toString String

type

Method name Return type Available since
type String

© 2005 - 2015 e-Spirit AG | All rights reserved. | Last change: 2014-01-08