class GuestDataProcessor implements ItemProcessor {

    @Override
    public Object processItem(Object o) throws Exception {
        LOGGER.info(() -> "Processing item " + o);

        String[] split = ((String) o).split(",");

        if (split.length != 3) {
            throw new IllegalArgumentException("Unexpected format in " + o);
        }

        String publicId = split[0].trim();
        String name = split[1].trim();
        String email = split[2].trim();

        if (!email.matches("\\p{Alnum}+@\\p{Alnum}+.\\p{Alnum}+")) {
            throw new IllegalArgumentException("Unexpected email '" + email + "'");
        }

        return new Guest(publicId, name, email);
    }

    public  GuestDataProcessor();
    @Inject public  GuestDataProcessor(JobContext jobContext);

}