Package service.exception

Examples of service.exception.AppointmentNotFoundException


    }

    @Override
    public List<User> getRegisteredUsers(T appointment, User requester) throws AppointmentNotFoundException {
        if (!registrations.containsKey(appointment)) {
            throw new AppointmentNotFoundException();
        }

        List<User> users = registrations.get(appointment);

        if (users == null) {
View Full Code Here


    private T getRealAppointment1(T appointment) throws AppointmentNotFoundException {
        T real = getRealAppointment0(appointment);

        if (real == null) {
            throw new AppointmentNotFoundException();
        }
        return real;
    }
View Full Code Here

    @Override
    public void unregister(User user, Lva appointment) throws UnregisterPeriodOverException, NotRegisteredException, AppointmentNotFoundException {
        Lva real = getRealAppointment(appointment);

        if (real != null && real.isDeleted()) {
            throw new AppointmentNotFoundException();
        }

        delegate.unregister(user, appointment);
    }
View Full Code Here

    @Override
    public void rescheduleAppointment(Lva appointment, User responsibleUser) throws AppointmentNotFoundException, NotAllowedException {
        Lva real = getRealAppointment(appointment);

        if (real != null && real.isDeleted() && !real.getLecturer().equals(responsibleUser) && responsibleUser != User.ADMIN) {
            throw new AppointmentNotFoundException();
        }

        delegate.rescheduleAppointment(appointment, responsibleUser);
    }
View Full Code Here

    @Override
    public void register(User user, Lva appointment, User responsibleUser) throws RegisterPeriodOverException, AlreadyRegisteredException, MaximumMemberCountExceededException, RequirementsNotFullfilledException, AppointmentNotFoundException, NotAllowedException {
        Lva real = getRealAppointment(appointment);

        if (real == null || real.isDeleted()) {
            throw new AppointmentNotFoundException();
        }

        if (!(user instanceof Student)) {
            throw new IllegalArgumentException("Only students can register to a Lva!");
        }
View Full Code Here

    @Override
    public List<User> getRegisteredUsers(Lva appointment, User requester) throws AppointmentNotFoundException {
        Lva real = getRealAppointment(appointment);

        if (real != null && real.isDeleted() && !real.getLecturer().equals(requester) && requester != User.ADMIN) {
            throw new AppointmentNotFoundException();
        }

        return delegate.getRegisteredUsers(appointment, requester);
    }
View Full Code Here

    @Override
    public int getRegisteredUserCount(Lva appointment, User requester) throws AppointmentNotFoundException {
        Lva real = getRealAppointment(appointment);

        if (real != null && real.isDeleted() && !real.getLecturer().equals(requester) && requester != User.ADMIN) {
            throw new AppointmentNotFoundException();
        }

        return delegate.getRegisteredUserCount(appointment, requester);
    }
View Full Code Here

    @Override
    public void cancelAppointment(Lva appointment, User responsibleUser) throws AppointmentNotFoundException, NotAllowedException {
        Lva real = getRealAppointment(appointment);

        if (real != null && real.isDeleted() && !real.getLecturer().equals(responsibleUser) && responsibleUser != User.ADMIN) {
            throw new AppointmentNotFoundException();
        }

        delegate.cancelAppointment(appointment, responsibleUser);
    }
View Full Code Here

TOP

Related Classes of service.exception.AppointmentNotFoundException

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.