congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Conference
Code IndexAdd Tabnine to your IDE (free)

How to use
Conference
in
org.cedj.geekseek.domain.conference.model

Best Java code snippets using org.cedj.geekseek.domain.conference.model.Conference (Showing top 20 results out of 315)

origin: arquillian/continuous-enterprise-development

@Test(expected = IllegalArgumentException.class)
public void shouldNotAllowNullConstructorDuration() throws Exception {
  new Conference("", "", null);
}
origin: arquillian/continuous-enterprise-development

@Override
public ConferenceRepresentation from(UriInfo uriInfo, Conference source) {
  ConferenceRepresentation rep = new ConferenceRepresentation(source.getId(), uriInfo);
  rep.setName(source.getName());
  rep.setTagLine(source.getTagLine());
  if(source.getDuration() != null) {
    rep.setStart(source.getDuration().getStart());
    rep.setEnd(source.getDuration().getEnd());
  }
  return rep;
}
origin: arquillian/continuous-enterprise-development

  @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))
      .build();
  }
}
origin: arquillian/continuous-enterprise-development

  @Override
  public Conference update(UriInfo uriInfo, ConferenceRepresentation representation, Conference target) {
    target.setName(representation.getName());
    target.setTagLine(representation.getTagLine());
    target.setDuration(new Duration(representation.getStart(), representation.getEnd()));
    return target;
  }
}
origin: arquillian/continuous-enterprise-development

@Test(expected = IllegalArgumentException.class)
public void shouldNotAllowNullSetterTagLine() throws Exception {
  Conference conf = new Conference("", "", new Duration(new Date(), new Date()));
  conf.setTagLine(null);
}
origin: arquillian/continuous-enterprise-development

@Override
protected ResponseSpecification responseValidation(ResponseSpecification spec, Conference conference) {
  return spec.
    root("conference").
      body("name", equalTo(conference.getName())).
      body("tagLine", equalTo(conference.getTagLine())).
      body("start", equalToXmlDate(conference.getDuration().getStart())).
      body("end", equalToXmlDate(conference.getDuration().getEnd()));
}
origin: arquillian/continuous-enterprise-development

  @Test(expected = UnsupportedOperationException.class)
  public void shouldNotAllowToAddSessionToSessions() throws Exception {
    Conference conf = new Conference("", "", new Duration(new Date(), new Date()));
    Session sess = new Session("", "", new Duration(new Date(), new Date()));
    conf.getSessions().add(sess);
  }
}
origin: arquillian/continuous-enterprise-development

@Test
@UsingDataSet({ "conference.yml", "session.yml" })
@ShouldMatchDataSet({ "conference.yml", "session_empty.yml" })
public void shouldBeAbleToRemoveConferenceWithSession() {
  Conference conference = repository.get("CA");
  Session session = conference.getSessions().toArray(new Session[0])[0];
  conference.removeSession(session);
  repository.store(conference);
}
origin: arquillian/continuous-enterprise-development

@Test(expected = IllegalArgumentException.class)
public void shouldNotAllowNullSetterDuration() throws Exception {
  Conference conf = new Conference("", "", new Duration(new Date(), new Date()));
  conf.setDuration(null);
}
origin: arquillian/continuous-enterprise-development

@Test(expected = IllegalArgumentException.class)
public void shouldNotAllowNullSetterName() throws Exception {
  Conference conf = new Conference("", "", new Duration(new Date(), new Date()));
  conf.setName(null);
}
origin: arquillian/continuous-enterprise-development

@Test(expected = IllegalArgumentException.class)
public void shouldNotAllowToAddNullSession() throws Exception {
  Conference conf = new Conference("", "", new Duration(new Date(), new Date()));
  conf.addSession(null);
}
origin: arquillian/continuous-enterprise-development

  @PreRemove
  public void removeConferenceRef() {
    if(conference != null) {
      conference.removeSession(this);
    }
  }
}
origin: arquillian/continuous-enterprise-development

@Override
protected void validateUpdatedDomainObject(Conference domain) {
  Assert.assertEquals(UPDATED_NAME, domain.getName());
}
origin: arquillian/continuous-enterprise-development

@POST
@Path("/{c_id}/session")
@Consumes({ BASE_JSON_MEDIA_TYPE, BASE_XML_MEDIA_TYPE })
public Response createSession(@PathParam("c_id") String conferenceId, SessionRepresentation sessionRepresentation) {
  Conference conference = getRepository().get(conferenceId);
  if (conference == null) {
    return Response.status(Status.BAD_REQUEST).build(); // TODO: Need Business Exception type to explain why?
  }
  Session session = sessionConverter.to(getUriInfo(), sessionRepresentation);
  conference.addSession(session);
  getRepository().store(conference);
  return Response.created(
    UriBuilder.fromResource(
      SessionResource.class).segment("{id}")
      .build(session.getId()))
    .build();
}
origin: arquillian/continuous-enterprise-development

@Override
protected Conference updateDomainObject(Conference domain) {
  return domain.setName(UPDATED_NAME);
}
origin: arquillian/continuous-enterprise-development

@Override
public void remove(Session entity) {
  Conference conf = conferenceRepository.getConferenceBySessionId(entity.getId());
  if(conf != null) {
    conf.removeSession(entity);
  }
  sessions.remove(entity);
}
origin: arquillian/continuous-enterprise-development

@Test
@ShouldMatchDataSet(value = { "conference.yml", "session.yml" }, excludeColumns = { "*id" })
public void shouldBeAbleToCreateConferenceWithSession() {
  Conference conference = createConference();
  conference.addSession(createSession());
  repository.store(conference);
}
origin: arquillian/continuous-enterprise-development

@Test
@UsingDataSet("conference.yml")
@ShouldMatchDataSet(value = { "conference_updated.yml" })
public void shouldBeAbleToChangeConference() {
  Conference conference = repository.get("CA");
  conference.setName("UPDATED");
  repository.store(conference);
}
origin: arquillian/continuous-enterprise-development

@Override
protected Conference createInstance() {
  return new Conference("", "", new Duration(new Date(), new Date()));
}
origin: arquillian/continuous-enterprise-development

Session getSessionById(String id) {
  for(Conference conf : getStored()) {
    for(Session session : conf.getSessions()) {
      if(session.getId().equals(id)) {
        return session;
      }
    }
  }
  return null;
}
org.cedj.geekseek.domain.conference.modelConference

Most used methods

  • <init>
  • getName
  • getSessions
  • removeSession
  • addSession
  • getDuration
  • getTagLine
  • setDuration
  • setName
  • setTagLine
  • getId
  • getId

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Path (java.nio.file)
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • JFileChooser (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now