org.acme.travels.services.StoreTravellerService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of process-service-calls-quarkus
Show all versions of process-service-calls-quarkus
Kogito service invocation - Quarkus
package org.acme.travels.services;
import java.util.HashMap;
import java.util.Map;
import javax.enterprise.context.ApplicationScoped;
import org.acme.travels.Traveller;
@ApplicationScoped
public class StoreTravellerService {
private Map store = new HashMap<>();
public boolean storeTraveller(Traveller traveller) {
Traveller stored = store.putIfAbsent(traveller.getEmail(), traveller);
if (stored == null) {
return true;
}
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy