Package io.ryos.rhino.sdk.dsl.impl
Class ForEachDslImpl<S,R extends java.lang.Iterable<S>>
- java.lang.Object
-
- io.ryos.rhino.sdk.dsl.impl.AbstractDSLItem
-
- io.ryos.rhino.sdk.dsl.impl.AbstractMeasurableDsl
-
- io.ryos.rhino.sdk.dsl.impl.AbstractSessionDslItem
-
- io.ryos.rhino.sdk.dsl.impl.ForEachDslImpl<S,R>
-
- All Implemented Interfaces:
DslItem
,ForEachDsl
,MaterializableDsl
,MaterializableDslItem
,MeasurableDsl
,ResultingDsl
,SessionDslItem
public class ForEachDslImpl<S,R extends java.lang.Iterable<S>> extends AbstractSessionDslItem implements ForEachDsl
For-each loop Dsl.- Author:
- Erhan Bagdemir
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.ryos.rhino.sdk.dsl.SessionDslItem
SessionDslItem.Scope
-
-
Constructor Summary
Constructors Constructor Description ForEachDslImpl(java.lang.String name, java.util.List<MaterializableDslItem> children, java.lang.String sessionKey, SessionDslItem.Scope scope, java.util.function.Function<UserSession,R> iterableSupplier, java.util.function.Function<S,? extends MaterializableDslItem> forEachFunction, java.util.function.Function<S,java.lang.Object> mapper)
Constructs a newForEachDsl
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<MaterializableDslItem>
getChildren()
java.util.function.Function<S,? extends MaterializableDslItem>
getForEachFunction()
java.util.function.Function<UserSession,R>
getIterableSupplier()
java.util.function.Function<S,java.lang.Object>
getMapper()
java.lang.String
getSaveTo()
UserSession
handleResult(UserSession userSession, java.lang.Object response)
DslMaterializer
materializer()
Create materializer instance for this spec instance.-
Methods inherited from class io.ryos.rhino.sdk.dsl.impl.AbstractSessionDslItem
getObjectFunction, getSessionKey, getSessionScope, setSessionKey, setSessionScope
-
Methods inherited from class io.ryos.rhino.sdk.dsl.impl.AbstractMeasurableDsl
cumulative, getMeasurementPoint, isCumulative, isMeasurementEnabled, noMeasurement
-
Methods inherited from class io.ryos.rhino.sdk.dsl.impl.AbstractDSLItem
getName, getParent, getParentName, hasParent, setName, setParent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.ryos.rhino.sdk.dsl.DslItem
getName, getParent, getParentName, hasParent, setName, setParent
-
Methods inherited from interface io.ryos.rhino.sdk.dsl.SessionDslItem
getObjectFunction, getSessionKey, getSessionScope, setSessionKey, setSessionScope
-
-
-
-
Constructor Detail
-
ForEachDslImpl
public ForEachDslImpl(java.lang.String name, java.util.List<MaterializableDslItem> children, java.lang.String sessionKey, SessionDslItem.Scope scope, java.util.function.Function<UserSession,R> iterableSupplier, java.util.function.Function<S,? extends MaterializableDslItem> forEachFunction, java.util.function.Function<S,java.lang.Object> mapper)
Constructs a newForEachDsl
instance.- Parameters:
name
- Spec name.children
- Child DSL items.sessionKey
- Session key.scope
- Session scope.iterableSupplier
- Supplier for iterable.
-
-
Method Detail
-
materializer
public DslMaterializer materializer()
Description copied from interface:MaterializableDsl
Create materializer instance for this spec instance.- Specified by:
materializer
in interfaceMaterializableDsl
- Returns:
DslMaterializer
instance.
-
getChildren
public java.util.List<MaterializableDslItem> getChildren()
- Specified by:
getChildren
in interfaceDslItem
-
getIterableSupplier
public java.util.function.Function<UserSession,R> getIterableSupplier()
- Specified by:
getIterableSupplier
in interfaceForEachDsl<S,R extends java.lang.Iterable<S>>
-
getForEachFunction
public java.util.function.Function<S,? extends MaterializableDslItem> getForEachFunction()
- Specified by:
getForEachFunction
in interfaceForEachDsl<S,R extends java.lang.Iterable<S>>
-
getMapper
public java.util.function.Function<S,java.lang.Object> getMapper()
- Specified by:
getMapper
in interfaceForEachDsl<S,R extends java.lang.Iterable<S>>
-
handleResult
public UserSession handleResult(UserSession userSession, java.lang.Object response)
- Specified by:
handleResult
in interfaceResultingDsl<S>
-
getSaveTo
public java.lang.String getSaveTo()
- Specified by:
getSaveTo
in interfaceResultingDsl<S>
-
-