Package org.netmelody.cieye.core.domain

Examples of org.netmelody.cieye.core.domain.Sponsor


                                                                "]}"));
    }
   
    @Test public void
    translatesToAppropriateJsonRepresentationWithDohList() {
        final LandscapeObservation observation = new LandscapeObservation().withDoh(newHashSet(new Sponsor("S1", "P1")));
       
        assertThat(new JsonTranslator().toJson(observation), is("{\"targets\":[],\"dohGroup\":[{\"name\":\"S1\",\"picture\":\"P1\"}]}"));
    }
View Full Code Here


                }
               
                final String pictureUrl = getPictureUrl(matcher.group(1));
                final Iterable<String> fingerprints = filter(skip(data, 1), notBlank());
                final String name = getFirst(fingerprints, pictureUrl);
                return new Biometric(new Sponsor(name, pictureUrl), fingerprints);
            }
        };
    }
View Full Code Here

    @Override
    public CiEyeResponse respond(Request request) throws IOException {
        String fingerprint = "";
        try {
            fingerprint = request.getForm().get("fingerprint");
            final Sponsor sponsor = tracker.sponsorWith(fingerprint);
            return CiEyeResponse.withJson(new JsonTranslator().toJson(sponsor)).expiringInMillis(10000L);
        } catch (Exception e) {
            LOG.error("Failed to handle request for sponsor with fingerprint " + fingerprint , e);
        }
        return CiEyeResponse.withJson("");
View Full Code Here

TOP

Related Classes of org.netmelody.cieye.core.domain.Sponsor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.