public class UserHelper extends Object
Constructor and Description |
---|
UserHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
generateRandomGroupPassword(co.ecg.alpaca.toolkit.generated.Group group)
Method to retrieve password rules for the specific group and then use
those to create a randomized password that meets the BroadWorks
requirements.
|
static String |
generateRandomServiceProviderPassword(co.ecg.alpaca.toolkit.generated.ServiceProvider serviceProvider)
Method to retrieve password rules for the specific Service Provider and then use
those to create a randomized password that meets the BroadWorks
requirements.
|
static String |
generateRandomUserPasscode(co.ecg.alpaca.toolkit.generated.User user)
Method to retrieve passcode rules for the specific user and then use
those to create a randomized passcode that meets the BroadWorks
requirements.
|
static String |
generateRandomUserPassword(co.ecg.alpaca.toolkit.generated.User user)
Method to create a randomly generated password for a User based on the
Group password requirements
|
static List<co.ecg.alpaca.toolkit.generated.User> |
getAllUsersInSystem(co.ecg.alpaca.toolkit.model.BroadWorksServer broadWorksServer)
Retrieves a list of all Users in the BroadWorks system.
|
static <R extends co.ecg.alpaca.toolkit.messaging.response.Response> |
getResponsePerUserMap(co.ecg.alpaca.toolkit.model.BroadWorksServer bws,
List<co.ecg.alpaca.toolkit.generated.User> users,
Class<? extends co.ecg.alpaca.toolkit.messaging.request.Request<R>> request)
Runs a request for every user in a list.
|
static List<co.ecg.alpaca.toolkit.generated.AccessDevice> |
getUserAccessDeviceList(co.ecg.alpaca.toolkit.generated.User user)
Retrieves the list of Access Devices for a given User
|
static co.ecg.alpaca.toolkit.generated.UserServices |
getUserServicesForAllAssignedServices(co.ecg.alpaca.toolkit.model.BroadWorksUser user)
Retrieves a UserServices object populated with information from all
services and service packs assigned to the User.
|
static void |
populateUserList(co.ecg.alpaca.toolkit.model.BroadWorksServer bws,
List<co.ecg.alpaca.toolkit.generated.User> users)
Populates a list of User objects using asynchronous calls to perform the
population in an efficient manner
|
static boolean |
randomizeUser(PrintStream out,
co.ecg.alpaca.toolkit.generated.User user,
boolean includeUser)
Randomizes a User's authentication information optional resetting the
underlying Group Access Devices.
|
static String |
resetUserPasscode(co.ecg.alpaca.toolkit.generated.User user)
Generates a random User passcode and sets the new value in BroadWorks
|
static String |
resetUserPassword(co.ecg.alpaca.toolkit.generated.User user)
Generates a random User password and sets the new value in BroadWorks
|
static List<AnnouncementFile> |
retrieveAnnouncementResourceList(co.ecg.alpaca.toolkit.model.BroadWorksUser user)
Retrieves a list of
AnnouncementFile that represent the Announcement files
for the User. |
public static String generateRandomUserPasscode(co.ecg.alpaca.toolkit.generated.User user) throws HelperException
user
- The user to generate the passcodeHelperException
- Thrown if unable to create the passcodepublic static String generateRandomGroupPassword(co.ecg.alpaca.toolkit.generated.Group group) throws HelperException
group
- The Group to generate the passwordHelperException
- Thrown if unable to generate the group passwordpublic static String generateRandomServiceProviderPassword(co.ecg.alpaca.toolkit.generated.ServiceProvider serviceProvider) throws HelperException
serviceProvider
- The ServiceProvider to generate the passwordHelperException
- Thrown if unable to generate the service provider passwordpublic static String generateRandomUserPassword(co.ecg.alpaca.toolkit.generated.User user) throws HelperException
user
- The User to generate the password forHelperException
- Thrown if unable to generate a password for the userpublic static List<co.ecg.alpaca.toolkit.generated.User> getAllUsersInSystem(co.ecg.alpaca.toolkit.model.BroadWorksServer broadWorksServer) throws HelperException
broadWorksServer
- The BroadWorks server objectArrayList
of UsersHelperException
- Thrown if unable to retrieve the system's user list.public static <R extends co.ecg.alpaca.toolkit.messaging.response.Response> HashMap<co.ecg.alpaca.toolkit.generated.User,R> getResponsePerUserMap(co.ecg.alpaca.toolkit.model.BroadWorksServer bws, List<co.ecg.alpaca.toolkit.generated.User> users, Class<? extends co.ecg.alpaca.toolkit.messaging.request.Request<R>> request) throws HelperException
bws
- The BroadWorksServer connection to use for the requestsusers
- The list of Users to populaterequest
- The request class to call. Must be a request with a
constructor as a User as single argument.HelperException
- Thrown if unable to retrieve the response per user list.public static List<co.ecg.alpaca.toolkit.generated.AccessDevice> getUserAccessDeviceList(co.ecg.alpaca.toolkit.generated.User user) throws HelperException
user
- The User
to retrieveArrayList
of AccessDevicesHelperException
- Thrown if unable to retrieve the AccessDevice list.public static co.ecg.alpaca.toolkit.generated.UserServices getUserServicesForAllAssignedServices(co.ecg.alpaca.toolkit.model.BroadWorksUser user) throws HelperException
user
- The User to retrieve service information.HelperException
- Thrown if unable to retrieve the user's servicespublic static void populateUserList(co.ecg.alpaca.toolkit.model.BroadWorksServer bws, List<co.ecg.alpaca.toolkit.generated.User> users) throws HelperException, co.ecg.alpaca.toolkit.exception.RequestException
bws
- The BroadWorksServer connection to use for the requestsusers
- The list of Users to populateHelperException
- Thrown if unable to populate the provided user listco.ecg.alpaca.toolkit.exception.RequestException
public static List<AnnouncementFile> retrieveAnnouncementResourceList(co.ecg.alpaca.toolkit.model.BroadWorksUser user) throws HelperException
AnnouncementFile
that represent the Announcement files
for the User.user
- The user to retrieve announcement informationHelperException
- Thrown if unable to retrieve the announcement resourcespublic static String resetUserPassword(co.ecg.alpaca.toolkit.generated.User user) throws HelperException
user
- The User to ResetHelperException
- Thrown if an error occurs while trying to reset the password.public static String resetUserPasscode(co.ecg.alpaca.toolkit.generated.User user) throws HelperException
user
- The User to ResetHelperException
- Thrown if an error occurs while trying to reset the passcode.public static boolean randomizeUser(PrintStream out, co.ecg.alpaca.toolkit.generated.User user, boolean includeUser) throws co.ecg.alpaca.toolkit.exception.AlpacaException
out
- The print stream to report new authentication informationuser
- The user to modifyincludeUser
- To include the username in the randomizationco.ecg.alpaca.toolkit.exception.AlpacaException
- Thrown if an unexpected error occurs during randomizationCopyright © 2016. All rights reserved.