Class AbstractUserUtilities

  • Direct Known Subclasses:
    ClientUserUtilities

    public abstract class AbstractUserUtilities
    extends java.lang.Object
    • Constructor Detail

      • AbstractUserUtilities

        public AbstractUserUtilities()
    • Method Detail

      • getUsers

        public java.util.List<PyUser> getUsers​(java.lang.String userSource)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getUser

        public User getUser​(java.lang.String userSource,
                            java.lang.String username)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getNewUser

        public User getNewUser​(java.lang.String userSource,
                               java.lang.String username)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addUser

        public UIResponse addUser​(java.lang.String userSource,
                                  User user)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • editUser

        public UIResponse editUser​(java.lang.String userSource,
                                   User user)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • removeUser

        public UIResponse removeUser​(java.lang.String userSource,
                                     java.lang.String username)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addRole

        public UIResponse addRole​(java.lang.String userSource,
                                  java.lang.String role)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • editRole

        public UIResponse editRole​(java.lang.String userSource,
                                   java.lang.String oldName,
                                   java.lang.String newName)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • removeRole

        public UIResponse removeRole​(java.lang.String userSource,
                                     java.lang.String role)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getRoles

        public java.util.List<java.lang.String> getRoles​(java.lang.String userSource)
                                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getScheduleNames

        public java.util.List<java.lang.String> getScheduleNames()
                                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getSchedule

        @Nullable
        public AbstractScheduleModel getSchedule​(java.lang.String scheduleName)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getSchedules

        public java.util.List<AbstractScheduleModel> getSchedules()
                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • removeSchedule

        public UIResponse removeSchedule​(java.lang.String scheduleName)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • editSchedule

        public UIResponse editSchedule​(java.lang.String scheduleName,
                                       AbstractScheduleModel schedule)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addCompositeSchedule

        public UIResponse addCompositeSchedule​(java.lang.String name,
                                               java.lang.String scheduleOne,
                                               java.lang.String scheduleTwo)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addCompositeSchedule

        public UIResponse addCompositeSchedule​(java.lang.String name,
                                               java.lang.String scheduleOne,
                                               java.lang.String scheduleTwo,
                                               java.lang.String description)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createScheduleAdjustment

        public ScheduleAdjustment createScheduleAdjustment​(java.util.Date startDate,
                                                           java.util.Date endDate,
                                                           boolean isAvailable,
                                                           java.lang.String note)
      • getHolidayNames

        public java.util.List<java.lang.String> getHolidayNames()
                                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getHoliday

        public HolidayModel getHoliday​(java.lang.String holidayName)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getHolidays

        public java.util.List<HolidayModel> getHolidays()
                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • removeHoliday

        public UIResponse removeHoliday​(java.lang.String holidayName)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • editHoliday

        public UIResponse editHoliday​(java.lang.String holidayName,
                                      HolidayModel holiday)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addHoliday

        public UIResponse addHoliday​(HolidayModel holiday)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isUserScheduled

        public boolean isUserScheduled​(User user)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isUserScheduled

        public boolean isUserScheduled​(User user,
                                       long date)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isUserScheduled

        public java.lang.Boolean isUserScheduled​(User user,
                                                 java.util.Date date)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getScheduledUsers

        public java.util.Collection<User> getScheduledUsers​(java.lang.String userSource)
                                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getScheduledUsers

        public java.util.Collection<User> getScheduledUsers​(java.lang.String userSource,
                                                            long date)
                                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getScheduledUsers

        public java.util.Collection<User> getScheduledUsers​(java.lang.String userSource,
                                                            java.util.Date date)
                                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getUsersImpl

        protected abstract java.util.Collection<User> getUsersImpl​(java.lang.String userSource)
                                                            throws java.lang.Exception
        List all users in a user source
        Throws:
        java.lang.Exception
      • getUserImpl

        protected abstract User getUserImpl​(java.lang.String userSource,
                                            java.lang.String username)
                                     throws java.lang.Exception
        Find a specific user based on username. Return null if the user is not found.
        Throws:
        java.lang.Exception
      • getNewUserImpl

        protected abstract User getNewUserImpl​(java.lang.String userSource,
                                               java.lang.String username)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addUserImpl

        protected abstract UIResponse addUserImpl​(java.lang.String userSource,
                                                  User user)
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • editUserImpl

        protected abstract UIResponse editUserImpl​(java.lang.String userSource,
                                                   User user)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • removeUserImpl

        protected abstract UIResponse removeUserImpl​(java.lang.String userSource,
                                                     java.lang.String username)
                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addRoleImpl

        protected abstract UIResponse addRoleImpl​(java.lang.String userSource,
                                                  java.lang.String role)
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • editRoleImpl

        protected abstract UIResponse editRoleImpl​(java.lang.String userSource,
                                                   java.lang.String oldName,
                                                   java.lang.String newName)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • removeRoleImpl

        protected abstract UIResponse removeRoleImpl​(java.lang.String userSource,
                                                     java.lang.String role)
                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getRolesImpl

        protected abstract java.util.Collection<java.lang.String> getRolesImpl​(java.lang.String userSource)
                                                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getScheduleImpl

        @Nullable
        protected abstract AbstractScheduleModel getScheduleImpl​(java.lang.String scheduleName)
                                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getSchedulesImpl

        protected abstract java.util.Collection<AbstractScheduleModel> getSchedulesImpl()
                                                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getScheduleNamesImpl

        protected abstract java.util.Collection<java.lang.String> getScheduleNamesImpl()
                                                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • removeScheduleImpl

        protected abstract UIResponse removeScheduleImpl​(java.lang.String schedule)
                                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • editScheduleImpl

        protected abstract UIResponse editScheduleImpl​(java.lang.String scheduleName,
                                                       AbstractScheduleModel schedule)
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addScheduleImpl

        protected abstract UIResponse addScheduleImpl​(AbstractScheduleModel schedule)
                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addCompositeScheduleImpl

        protected abstract UIResponse addCompositeScheduleImpl​(java.lang.String name,
                                                               java.lang.String scheduleOne,
                                                               java.lang.String scheduleTwo,
                                                               java.lang.String description)
                                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getHolidayImpl

        protected abstract HolidayModel getHolidayImpl​(java.lang.String holidayName)
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getHolidayNamesImpl

        protected abstract java.util.Collection<java.lang.String> getHolidayNamesImpl()
                                                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getHolidaysImpl

        protected abstract java.util.Collection<HolidayModel> getHolidaysImpl()
                                                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • removeHolidayImpl

        protected abstract UIResponse removeHolidayImpl​(java.lang.String holidayName)
                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • editHolidayImpl

        protected abstract UIResponse editHolidayImpl​(java.lang.String holidayName,
                                                      HolidayModel holiday)
                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addHolidayImpl

        protected abstract UIResponse addHolidayImpl​(HolidayModel holiday)
                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isUserScheduledImpl

        protected abstract java.lang.Boolean isUserScheduledImpl​(User user,
                                                                 long date)
                                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getScheduledUsersImpl

        protected abstract java.util.Collection<User> getScheduledUsersImpl​(java.lang.String userSource,
                                                                            long date)
                                                                     throws java.lang.Exception
        Throws:
        java.lang.Exception