Class AbstractUserUtilities
- java.lang.Object
-
- com.inductiveautomation.ignition.common.script.builtin.AbstractUserUtilities
-
- Direct Known Subclasses:
ClientUserUtilities
public abstract class AbstractUserUtilities extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AbstractUserUtilities()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description UIResponseaddCompositeSchedule(java.lang.String name, java.lang.String scheduleOne, java.lang.String scheduleTwo)UIResponseaddCompositeSchedule(java.lang.String name, java.lang.String scheduleOne, java.lang.String scheduleTwo, java.lang.String description)protected abstract UIResponseaddCompositeScheduleImpl(java.lang.String name, java.lang.String scheduleOne, java.lang.String scheduleTwo, java.lang.String description)UIResponseaddHoliday(HolidayModel holiday)protected abstract UIResponseaddHolidayImpl(HolidayModel holiday)UIResponseaddRole(java.lang.String userSource, java.lang.String role)protected abstract UIResponseaddRoleImpl(java.lang.String userSource, java.lang.String role)UIResponseaddSchedule(AbstractScheduleModel schedule)protected abstract UIResponseaddScheduleImpl(AbstractScheduleModel schedule)UIResponseaddUser(java.lang.String userSource, User user)protected abstract UIResponseaddUserImpl(java.lang.String userSource, User user)ScheduleAdjustmentcreateScheduleAdjustment(java.util.Date startDate, java.util.Date endDate, boolean isAvailable, java.lang.String note)UIResponseeditHoliday(java.lang.String holidayName, HolidayModel holiday)protected abstract UIResponseeditHolidayImpl(java.lang.String holidayName, HolidayModel holiday)UIResponseeditRole(java.lang.String userSource, java.lang.String oldName, java.lang.String newName)protected abstract UIResponseeditRoleImpl(java.lang.String userSource, java.lang.String oldName, java.lang.String newName)UIResponseeditSchedule(java.lang.String scheduleName, AbstractScheduleModel schedule)protected abstract UIResponseeditScheduleImpl(java.lang.String scheduleName, AbstractScheduleModel schedule)UIResponseeditUser(java.lang.String userSource, User user)protected abstract UIResponseeditUserImpl(java.lang.String userSource, User user)HolidayModelgetHoliday(java.lang.String holidayName)protected abstract HolidayModelgetHolidayImpl(java.lang.String holidayName)java.util.List<java.lang.String>getHolidayNames()protected abstract java.util.Collection<java.lang.String>getHolidayNamesImpl()java.util.List<HolidayModel>getHolidays()protected abstract java.util.Collection<HolidayModel>getHolidaysImpl()UsergetNewUser(java.lang.String userSource, java.lang.String username)protected abstract UsergetNewUserImpl(java.lang.String userSource, java.lang.String username)java.util.List<java.lang.String>getRoles(java.lang.String userSource)protected abstract java.util.Collection<java.lang.String>getRolesImpl(java.lang.String userSource)AbstractScheduleModelgetSchedule(java.lang.String scheduleName)java.util.Collection<User>getScheduledUsers(java.lang.String userSource)java.util.Collection<User>getScheduledUsers(java.lang.String userSource, long date)java.util.Collection<User>getScheduledUsers(java.lang.String userSource, java.util.Date date)protected abstract java.util.Collection<User>getScheduledUsersImpl(java.lang.String userSource, long date)protected abstract AbstractScheduleModelgetScheduleImpl(java.lang.String scheduleName)java.util.List<java.lang.String>getScheduleNames()protected abstract java.util.Collection<java.lang.String>getScheduleNamesImpl()java.util.List<AbstractScheduleModel>getSchedules()protected abstract java.util.Collection<AbstractScheduleModel>getSchedulesImpl()UsergetUser(java.lang.String userSource, java.lang.String username)protected abstract UsergetUserImpl(java.lang.String userSource, java.lang.String username)Find a specific user based on username.java.util.List<PyUser>getUsers(java.lang.String userSource)protected abstract java.util.Collection<User>getUsersImpl(java.lang.String userSource)List all users in a user sourcebooleanisUserScheduled(User user)booleanisUserScheduled(User user, long date)java.lang.BooleanisUserScheduled(User user, java.util.Date date)protected abstract java.lang.BooleanisUserScheduledImpl(User user, long date)UIResponseremoveHoliday(java.lang.String holidayName)protected abstract UIResponseremoveHolidayImpl(java.lang.String holidayName)UIResponseremoveRole(java.lang.String userSource, java.lang.String role)protected abstract UIResponseremoveRoleImpl(java.lang.String userSource, java.lang.String role)UIResponseremoveSchedule(java.lang.String scheduleName)protected abstract UIResponseremoveScheduleImpl(java.lang.String schedule)UIResponseremoveUser(java.lang.String userSource, java.lang.String username)protected abstract UIResponseremoveUserImpl(java.lang.String userSource, java.lang.String username)
-
-
-
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
-
addSchedule
public UIResponse addSchedule(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
-
-