Package org.cedj.geekseek.domain.conference.model

Examples of org.cedj.geekseek.domain.conference.model.Conference


    @SuppressWarnings({ "unchecked", "rawtypes" })
    @GET
    @Path("/{c_id}/session")
    @Produces({ BASE_JSON_MEDIA_TYPE, BASE_XML_MEDIA_TYPE })
    public Response getSessions(@PathParam("c_id") String conferenceId) {
        Conference conference = getRepository().get(conferenceId);
        if (conference == null) {
            return Response.status(Status.BAD_REQUEST).build(); // TODO: Need Business Exception type to explain why?
        }

        Collection<SessionRepresentation> sessions = sessionConverter.from(getUriInfo(), (Collection)conference.getSessions());

        return Response.ok(new GenericEntity<Collection<SessionRepresentation>>(sessions){})
            .type(matchMediaType(
                SessionResource.SESSION_XML_MEDIA_TYPE,
                SessionResource.SESSION_JSON_MEDIA_TYPE))
View Full Code Here


        return rep;
    }

    @Override
    public Conference to(UriInfo uriInfo, ConferenceRepresentation representation) {
        Conference conf = new Conference(
            representation.getName(),
            representation.getTagLine(),
            new Duration(representation.getStart(), representation.getEnd()));
        return conf;
    }
View Full Code Here

TOP

Related Classes of org.cedj.geekseek.domain.conference.model.Conference

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.