/** @return registration status text. */ public String getStatusText() { if (registration.getStatus() == RegistrationStatus.NOT_STARTED) { return registration.getStatus().getDisplay(); } String[] args = {registration.getStatus().getDisplay(), getStatusDateDisplay()}; return action.getText("registration.status.with.date", args); }
private void setUpMockRegistrationServiceToReturnRegistration( AbstractProtocolRegistration registration) { when(mockRegistrationService.getByStatusForUser(registration.getStatus(), sponsor, groupNames)) .thenReturn(Lists.newArrayList(registration)); }
/** @return current registration's id (only if revised). */ public Long getCurrentRegistrationId() { if (registration.getCurrentRegistration() != null) { return registration.getCurrentRegistration().getId(); } return null; }
/** @return the comments */ public String getComments() { return registration.getSponsorComments(); }
/** @return investigator in registration. */ public Person getPrimaryInvestigator() { return registration.getPrimaryRegistration() == null ? null : registration.getPrimaryRegistration().getProfile().getPerson(); }
/** @return primary registration id. */ public Long getPrimaryRegistrationId() { return registration.getPrimaryRegistration() == null ? null : registration.getPrimaryRegistration().getId(); }
/** @return invitation status text with date. */ public String getInvitationStatusText() { String key = registration.getInvitation().getInvitationStatus().getKey() + ".with.date"; String[] args = {dateFormat.format(registration.getInvitation().getInvitationChangeDate())}; return action.getText(key, args); }
/** @return the invitation status object. */ public InvitationStatus getInvitationStatus() { return registration.getInvitation().getInvitationStatus(); }
private String getStatusDateDisplay() { return dateFormat.format(registration.getStatusDate()); }
/** @return investigator in registration. */ public Person getInvestigator() { return registration.getProfile().getPerson(); }
/** @return registration id. */ public Long getId() { return registration.getId(); }