All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vanillabp.springboot.parameters.TaskEventMethodParameter Maven / Gradle / Ivy

There is a newer version: 1.1.3
Show newest version
package io.vanillabp.springboot.parameters;

import io.vanillabp.spi.service.TaskEvent;
import io.vanillabp.spi.service.TaskEvent.Event;

import java.util.HashSet;
import java.util.Set;

public class TaskEventMethodParameter extends MethodParameter {

    private final Set events;

    public TaskEventMethodParameter(
            final int index,
            final String parameter,
            final Event[] annotationParameter) {

        super(index, parameter);
        
        events = new HashSet();
        
        for (final var event : annotationParameter) {

            if (event == Event.ALL) {
                events.add(Event.CREATED);
                events.add(Event.CANCELED);
            } else {
                events.add(event);
            }

        }
        
    }

    public Set getEvents() {

        return events;

    }
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy