1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- package io .serverlessworkflow .fluent .java ;
16+ package io .serverlessworkflow .fluent .func ;
1717
1818import io .serverlessworkflow .api .types .CallJava ;
1919import io .serverlessworkflow .api .types .CallTaskJava ;
2020import io .serverlessworkflow .api .types .ForTaskConfiguration ;
2121import io .serverlessworkflow .api .types .ForTaskFunction ;
2222import io .serverlessworkflow .api .types .Task ;
2323import io .serverlessworkflow .api .types .TaskItem ;
24- import io .serverlessworkflow .fluent .standard .TaskBaseBuilder ;
24+ import io .serverlessworkflow .fluent .spec .TaskBaseBuilder ;
2525import io .serverlessworkflow .impl .expressions .LoopFunction ;
2626import io .serverlessworkflow .impl .expressions .LoopPredicate ;
2727import io .serverlessworkflow .impl .expressions .LoopPredicateIndex ;
3232import java .util .function .Consumer ;
3333import java .util .function .Function ;
3434
35- public class ForTaskJavaBuilder extends TaskBaseBuilder <ForTaskJavaBuilder >
36- implements JavaTransformationHandlers < ForTaskJavaBuilder > {
35+ public class FuncForTaskBuilder extends TaskBaseBuilder <FuncForTaskBuilder >
36+ implements FuncTransformations < FuncForTaskBuilder > {
3737
3838 private final ForTaskFunction forTaskFunction ;
3939 private final List <TaskItem > items ;
4040
41- ForTaskJavaBuilder () {
41+ FuncForTaskBuilder () {
4242 this .forTaskFunction = new ForTaskFunction ();
4343 this .forTaskFunction .withFor (new ForTaskConfiguration ());
4444 this .items = new ArrayList <>();
4545 super .setTask (forTaskFunction );
4646 }
4747
4848 @ Override
49- protected ForTaskJavaBuilder self () {
49+ protected FuncForTaskBuilder self () {
5050 return this ;
5151 }
5252
53- public <T , V > ForTaskJavaBuilder whileC (LoopPredicate <T , V > predicate ) {
53+ public <T , V > FuncForTaskBuilder whileC (LoopPredicate <T , V > predicate ) {
5454 this .forTaskFunction .withWhile (predicate );
5555 return this ;
5656 }
5757
58- public <T , V > ForTaskJavaBuilder whileC (LoopPredicateIndex <T , V > predicate ) {
58+ public <T , V > FuncForTaskBuilder whileC (LoopPredicateIndex <T , V > predicate ) {
5959 this .forTaskFunction .withWhile (predicate );
6060 return this ;
6161 }
6262
63- public <T > ForTaskJavaBuilder collection (Function <T , Collection <?>> collectionF ) {
63+ public <T > FuncForTaskBuilder collection (Function <T , Collection <?>> collectionF ) {
6464 this .forTaskFunction .withCollection (collectionF );
6565 return this ;
6666 }
6767
68- public <T , V , R > ForTaskJavaBuilder tasks (String name , LoopFunction <T , V , R > function ) {
68+ public <T , V , R > FuncForTaskBuilder tasks (String name , LoopFunction <T , V , R > function ) {
6969 this .items .add (
7070 new TaskItem (
7171 name ,
@@ -77,12 +77,12 @@ public <T, V, R> ForTaskJavaBuilder tasks(String name, LoopFunction<T, V, R> fun
7777 return this ;
7878 }
7979
80- public <T , V , R > ForTaskJavaBuilder tasks (LoopFunction <T , V , R > function ) {
80+ public <T , V , R > FuncForTaskBuilder tasks (LoopFunction <T , V , R > function ) {
8181 return this .tasks (UUID .randomUUID ().toString (), function );
8282 }
8383
84- public ForTaskJavaBuilder tasks (Consumer <TaskItemListJavaBuilder > consumer ) {
85- final TaskItemListJavaBuilder builder = new TaskItemListJavaBuilder ();
84+ public FuncForTaskBuilder tasks (Consumer <FuncTaskItemListBuilder > consumer ) {
85+ final FuncTaskItemListBuilder builder = new FuncTaskItemListBuilder ();
8686 consumer .accept (builder );
8787 this .items .addAll (builder .build ());
8888 return this ;
0 commit comments