|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.shephertz.app42.paas.sdk.jme.user.UserService
public class UserService
Creates User for the App. App42 Cloud API's provides a complete User Management for any mobile or web app. It supports User registration, retrieval, state management e.g. lock, delete and Authentication. Along with User Management the platform provides API's for persistent SessionManagement
SessionService
,
User
,
App42Response
Constructor Summary | |
---|---|
UserService(java.lang.String apiKey,
java.lang.String secretKey,
java.lang.String baseURL)
This is a constructor that takes |
Method Summary | |
---|---|
User |
assignRoles(java.lang.String uName,
java.util.Vector roleList)
Assign Roles to the existing User |
App42Response |
authenticate(java.lang.String uName,
java.lang.String pwd)
Authenticate user based on userName and password |
App42Response |
changeUserPassword(java.lang.String uName,
java.lang.String oldPwd,
java.lang.String newPwd)
Changes the password for user based on the userName. |
User |
createOrUpdateProfile(User user)
Creates or Updates User Profile. |
User |
createUser(java.lang.String uName,
java.lang.String pwd,
java.lang.String emailAddress)
Create a User with userName, password & emailAddress |
User |
createUser(java.lang.String uName,
java.lang.String pwd,
java.lang.String emailAddress,
java.util.Vector roleList)
Create a User with userName, password & emailAddress and assigns the roles to the created User |
App42Response |
deleteUser(java.lang.String userName)
Deletes a particular user based on userName. |
java.util.Vector |
getAllUsers()
Gets the details of all users |
java.util.Vector |
getAllUsers(java.lang.Integer max,
java.lang.Integer offset)
Gets all users by Paging |
App42Response |
getAllUsersCount()
Gets the count of all the users |
java.util.Vector |
getLockedUsers()
Gets the details of all the locked users |
java.util.Vector |
getLockedUsers(java.lang.Integer max,
java.lang.Integer offset)
Gets the details of all the locked users By paging. |
App42Response |
getLockedUsersCount()
Gets the count of all the locked users |
User |
getRolesByUser(java.lang.String userName)
Get the roles from the specified User |
User |
getUser(java.lang.String userName)
Gets the User details based on userName |
User |
getUserByEmailId(java.lang.String emailId)
Gets user details based on emailId |
java.util.Vector |
getUsersByProfileData(User.Profile profileData)
Gets the list of Users based on Profile Data |
java.util.Vector |
getUsersByRole(java.lang.String role)
Get all the Users who have the specified role assigned |
User |
lockUser(java.lang.String uName)
Locks the user based on the userName. |
App42Response |
resetUserPassword(java.lang.String uName,
java.lang.String pwd)
Updates the User password based on userName. |
App42Response |
revokeAllRoles(java.lang.String userName)
Revokes all the roles from the user. |
App42Response |
revokeRole(java.lang.String userName,
java.lang.String role)
Revokes the specified role from the user. |
User |
unlockUser(java.lang.String uName)
Unlocks the user based on the userName. |
User |
updateEmail(java.lang.String uName,
java.lang.String emailAddress)
Updates the User's Email Address based on userName. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserService(java.lang.String apiKey, java.lang.String secretKey, java.lang.String baseURL)
apiKey
- secretKey
- baseURL
- Method Detail |
---|
public User assignRoles(java.lang.String uName, java.util.Vector roleList) throws App42Exception
uName
- - Name of the User to whom the roles have to be assignedroleList
- - List of roles to be added to User
App42Exception
public App42Response authenticate(java.lang.String uName, java.lang.String pwd) throws App42Exception
uName
- - UserName which should be unique for the Apppwd
- - Password for the User
App42Exception
- if authentication fails or username/password is blank or nullpublic App42Response changeUserPassword(java.lang.String uName, java.lang.String oldPwd, java.lang.String newPwd) throws App42Exception
uName
- - UserName which should be unique for the AppoldPwd
- - Old Password for the user for authenticationnewPwd
- - New Password for the user to change
App42Exception
public User createOrUpdateProfile(User user) throws App42Exception
user
- - User for which profile has to be updated, this should
contain the userName and profile object in it.
App42Exception
User.Profile
public User createUser(java.lang.String uName, java.lang.String pwd, java.lang.String emailAddress) throws App42Exception
uName
- - Name of the Userpwd
- - Password for the UseremailAddress
- - Email address of the user
App42Exception
public User createUser(java.lang.String uName, java.lang.String pwd, java.lang.String emailAddress, java.util.Vector roleList) throws App42Exception
uName
- - Name of the Userpwd
- - Password for the UseremailAddress
- - Email address of the userroleList
- - List of roles to be assigned to User
App42Exception
public App42Response deleteUser(java.lang.String userName) throws App42Exception
userName
- - UserName which should be unique for the App
App42Exception
public java.util.Vector getAllUsers() throws App42Exception
App42Exception
public java.util.Vector getAllUsers(java.lang.Integer max, java.lang.Integer offset) throws App42Exception
max
- - Maximum number of records to be fetchedoffset
- - From where the records are to be fetched
App42Exception
public App42Response getAllUsersCount() throws App42Exception
App42Exception
public java.util.Vector getLockedUsers() throws App42Exception
App42Exception
public java.util.Vector getLockedUsers(java.lang.Integer max, java.lang.Integer offset) throws App42Exception
max
- - Maximum number of records to be fetchedoffset
- - From where the records are to be fetched
App42Exception
public App42Response getLockedUsersCount() throws App42Exception
App42Exception
public User getRolesByUser(java.lang.String userName) throws App42Exception
userName
- - Name of the User for whom roles have to be retrieved
App42Exception
public User getUser(java.lang.String userName) throws App42Exception
userName
- - Name of the User to retrieve
App42Exception
public User getUserByEmailId(java.lang.String emailId) throws App42Exception
emailId
- - EmailId of the user to be retrieved
App42Exception
public java.util.Vector getUsersByProfileData(User.Profile profileData) throws App42Exception
profileData
- - Profile Data key/value for which Users need to be retrieved
App42Exception
public java.util.Vector getUsersByRole(java.lang.String role) throws App42Exception
role
- - Role for which Users needs to be retrieved
App42Exception
public User lockUser(java.lang.String uName) throws App42Exception
uName
- - UserName which should be unique for the App
App42Exception
public App42Response resetUserPassword(java.lang.String uName, java.lang.String pwd) throws App42Exception
uName
- - UserName which should be unique for the Apppwd
- - Password to be reset
App42Exception
public App42Response revokeAllRoles(java.lang.String userName) throws App42Exception
userName
- - Name of the User from whom Roles have to be revoked
App42Exception
public App42Response revokeRole(java.lang.String userName, java.lang.String role) throws App42Exception
userName
- - UserName from whom the role has to be revokedrole
- - Role that has to be revoked
App42Exception
public User unlockUser(java.lang.String uName) throws App42Exception
uName
- - UserName which should be unique for the App
App42Exception
public User updateEmail(java.lang.String uName, java.lang.String emailAddress) throws App42Exception
uName
- - UserName which should be unique for the AppemailAddress
- - Email address of the user
App42Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |