RuntimeObjectModel
.RuntimeExtension
RuntimeExtension
s.collection
to a comma separated values String
representation.cause
.cause
.baseName
get + BaseName
is + BaseName
iterator
, this method will return a Collection
.null
if this outcome is a success or no cause has been defined with the
ProviderOutcome.failure(Throwable)
method.object
, this method will return the value of the public field identified by fieldName
.object
(i.e.RuntimeObjectModel
that will be used for resolving objects' properties or type conversion / coercion.object
, this method will invoke the public method without parameters identified by methodName
and
return the invocation's result.Collection
or is backed by one.true
if the method is not one of the Object
's class declared methods, with the exception of
Object.toString()
.object
is an instance of a primitive class.RuntimeExtension
name.null
return a successful outcome
, with the given result.ObjectModel
class provides various static models for object conversion and object property resolution.UseProvider
.Record
is a key-value immutable object understood by the HTL runtime, used for abstracting complex objects like Sightly
templates (declared with the data-sly-template
block element) or objects that need to be translated from Java to JavaScript
and back.RenderContext
defines the context for executing HTL scripts.target
object, this method attempts to resolve and return the value of the passed property
.RuntimeExtension
represents a HTL runtime construct that provides some processing capabilities for the various
data-sly-*
block elements.RuntimeObjectModel
provides various utility object inspection & conversion methods that can be applied to runtime
objects when executing HTL scripts.object
to a boolean value, applying the following rules:
if the object
is null
the returned value is false
if the object
is a Number
the method will return false
only if the number's value is 0
if the String
representation of the object
is equal irrespective of its casing to "true", the method will
return true
if the object
is a Collection
or a Map
, the method will return true
only if the collection /
map is not empty
if the object is an array, the method will return true
only if the array is not empty
object
to a collection, according to the following rules:
if the object
is null
an empty collection will be returned
if the object
is an array a list transformation of the array will be returned
if the object
is a Collection
the object itself will be returned
if the object
is an instance of a Map
the map's key set will be returned (see Map.keySet()
)
if the object
is an instance of an Enumeration
a list transformation will be returned
if the object
is an instance of an Iterator
or Iterable
the result of ObjectModel.fromIterator(Iterator)
will be returned
if the object
is an instance of a String
or Number
a Collection
containing only this
object will be returned
any other case not covered by the previous rules will result in an empty Collection
Date
objectobject
to a numeric value.object
to a String
.Use
interface can be implemented by Java objects which are instantiated as part of processing data-sly-use
attributes.UseProvider
instantiates objects for the Use-API.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.