public class JSUserManager extends JSBaseScriptableObject
Modifier and Type | Field and Description |
---|---|
static JSMap |
myUserStatusMap
Map of the valid user status.
|
static JSMap |
myUserTypesMap
Map of the valid user types.
|
Constructor and Description |
---|
JSUserManager() |
Modifier and Type | Method and Description |
---|---|
void |
(JavaScript Function) addToGroup(java.lang.String theUserName,
java.lang.String theGroupName)
Adds a user to a group.
|
User |
(JavaScript Function) createUser(java.lang.String theUserName,
java.lang.String thePassword)
Creates and returns a new user.
|
User |
(JavaScript Function) duplicateUser(User theUserToDuplicate,
java.lang.String theUserName)
Duplicates the given user to create a new user.
|
User |
(JavaScript Function) findByUserId(int theUserId)
Finds user by numeric ID.
|
User |
(JavaScript Function) findUserByUsername(java.lang.String theUsername)
Finds user with the given user name.
|
User[] |
(JavaScript Function) findUsersByPartialName(java.lang.String thePartialName,
int theGroupId)
Finds users that belong to group specified by id and contain given partial name.
|
java.lang.String |
(JavaScript Function) generateRandomPassword()
Generates a random password that meets the system's current password requirements.
|
ACL[] |
(JavaScript Function) getACLs(int theId,
boolean theGetUserACLs)
Returns the list of user or group ACLs for the specified id, where theId is either a user id or group id
depending on whether theGetUserACLs is true or false.
|
int |
(JavaScript Function) getEditLevel(java.lang.String theUserName,
java.lang.String theGroupName)
Returns the edit level for the specified user/group.
|
Group[] |
(JavaScript Function) getUserGroups(java.lang.String theUserName)
Returns an array of Groups that the specified user is in.
|
int[] |
(JavaScript Function) getUserIdsWithEmail(java.lang.String theEmail)
Returns a list of user id's for users who have the specified email address.
|
int |
(JavaScript Function) getViewLevel(java.lang.String theUserName,
java.lang.String theGroupName)
Returns the view level for the specified user/group.
|
void |
(JavaScript Function) insertGroupMembership(java.lang.String theGroup,
java.lang.String theUser,
boolean thePrimary)
Creates group membership entry for a user.
|
boolean |
(JavaScript Function) isLDAPUser(int theUserId)
Is the user an LDAP user?
|
boolean |
(JavaScript Function) isLDAPUserExists(java.lang.String theUserName)
Checks to see if a user with the given name exists on ldap server.
|
void |
(JavaScript Function) removeFromGroup(java.lang.String theUserName,
java.lang.String theGroupName)
Removes a user from a group.
|
void |
(JavaScript Function) setPrimaryGroup(java.lang.String theUserName,
java.lang.String theGroupName)
Sets the primary group for the user.
|
void |
(JavaScript Function) updateContactInfo(java.lang.String theUserName,
java.lang.String theFirstName,
java.lang.String theLastName,
java.lang.String theEmail)
Updates basic contact info for the user specified by theUserName.
|
void |
(JavaScript Function) updatePasswordChangeRequired(java.lang.String theUserName,
java.lang.String theStatus)
Update the password change required value for the specified user.
|
boolean |
(JavaScript Function) userExists(java.lang.String theUserName)
Checks to see if a user with the given user name exists.
|
JSMap |
(JavaScript Getter) userStatus() |
JSMap |
(JavaScript Getter) userTypes() |
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, isConst, isEmpty, isExtensible, isSealed, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
public static JSMap myUserStatusMap
public static JSMap myUserTypesMap
public JSMap (JavaScript Getter) userStatus()
public JSMap (JavaScript Getter) userTypes()
public java.lang.String (JavaScript Function) generateRandomPassword()
public User (JavaScript Function) findUserByUsername(java.lang.String theUsername)
theUsername
- user namenull
if the user is not foundpublic User[] (JavaScript Function) findUsersByPartialName(java.lang.String thePartialName, int theGroupId)
thePartialName
- the partial user nametheGroupId
- the group id, if group id equals -1, all users will be found that contain given partial namepublic User (JavaScript Function) findByUserId(int theUserId)
theUserId
- user IDnull
public int[] (JavaScript Function) getUserIdsWithEmail(java.lang.String theEmail)
theEmail
- the emailpublic boolean (JavaScript Function) userExists(java.lang.String theUserName)
theUserName
- user namepublic boolean (JavaScript Function) isLDAPUserExists(java.lang.String theUserName)
theUserName
- the user namepublic boolean (JavaScript Function) isLDAPUser(int theUserId)
theUserId
- user id to check forpublic void (JavaScript Function) insertGroupMembership(java.lang.String theGroup, java.lang.String theUser, boolean thePrimary) throws java.lang.Exception
theGroup
- grouptheUser
- user namethePrimary
- primary group or notjava.lang.Exception
public User (JavaScript Function) createUser(java.lang.String theUserName, java.lang.String thePassword)
theUserName
- usernamethePassword
- passwordpublic User (JavaScript Function) duplicateUser(User theUserToDuplicate, java.lang.String theUserName)
theUserToDuplicate
- The user to duplicate.theUserName
- The new user's name.public void (JavaScript Function) updateContactInfo(java.lang.String theUserName, java.lang.String theFirstName, java.lang.String theLastName, java.lang.String theEmail)
theUserName
- theFirstName
- theLastName
- theEmail
- public void (JavaScript Function) updatePasswordChangeRequired(java.lang.String theUserName, java.lang.String theStatus)
theUserName
- the user nametheStatus
- the new statuspublic void (JavaScript Function) addToGroup(java.lang.String theUserName, java.lang.String theGroupName)
theUserName
- the user nametheGroupName
- the name for the grouppublic void (JavaScript Function) setPrimaryGroup(java.lang.String theUserName, java.lang.String theGroupName)
theUserName
- the user nametheGroupName
- the group namepublic void (JavaScript Function) removeFromGroup(java.lang.String theUserName, java.lang.String theGroupName)
theUserName
- the user nametheGroupName
- the name for the grouppublic Group[] (JavaScript Function) getUserGroups(java.lang.String theUserName)
theUserName
- public ACL[] (JavaScript Function) getACLs(int theId, boolean theGetUserACLs)
theId
- the user id or group id for which to get either user or group ACLstheGetUserACLs
- specifies whether theId is for a user (for user ACLs) or group (for group ACLs)public int (JavaScript Function) getViewLevel(java.lang.String theUserName, java.lang.String theGroupName)
theUserName
- the username.theGroupName
- the group name.public int (JavaScript Function) getEditLevel(java.lang.String theUserName, java.lang.String theGroupName)
theUserName
- the username.theGroupName
- the group name.Copyright © 2017 MediaBeacon, Inc. All Rights Reserved.