|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.shephertz.app42.paas.sdk.android.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.ArrayList<java.lang.String> roleList)
Add Role for the App |
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)
Change 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 User for the App |
User |
createUser(java.lang.String uName,
java.lang.String pwd,
java.lang.String emailAddress,
java.util.ArrayList<java.lang.String> roleList)
Create User for the App |
App42Response |
deleteUser(java.lang.String userName)
Deletes a particular user based on userName. |
java.lang.String |
fillParamsWithProfileData(User.Profile profileData)
|
java.util.ArrayList<User> |
getAllUsers()
Gets All users details |
java.util.ArrayList<User> |
getAllUsers(int max,
int offset)
Gets All users By Paging |
App42Response |
getAllUsersCount()
Gets the count of all the users |
java.util.ArrayList<User> |
getLockedUsers()
Gets All the locked users details |
java.util.ArrayList<User> |
getLockedUsers(int max,
int offset)
Gets All the locked users details By paging. |
App42Response |
getLockedUsersCount()
Gets the count of all the locked users |
User |
getRolesByUser(java.lang.String userName)
Get Roles based on userName |
User |
getUser(java.lang.String userName)
Gets user details based on userName |
User |
getUserByEmailId(java.lang.String emailId)
Gets user details based on emailId |
java.util.ArrayList<User> |
getUsersByProfileData(User.Profile profileData)
Get Users based on Profile Data |
java.util.ArrayList<User> |
getUsersByRole(java.lang.String role)
Get Users based on Role |
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 based on userName. |
App42Response |
revokeAllRoles(java.lang.String userName)
Revokes the specified role 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)
Unlock the user based on the userName. |
User |
updateEmail(java.lang.String uName,
java.lang.String emailAddress)
Updates the User 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.ArrayList<java.lang.String> roleList) throws App42Exception
uName
- UserName which should be unique for the ApproleList
- 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
- UserName which should be unique for the Apppwd
- 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.ArrayList<java.lang.String> roleList) throws App42Exception
uName
- UserName which should be unique for the Apppwd
- 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.lang.String fillParamsWithProfileData(User.Profile profileData)
public java.util.ArrayList<User> getAllUsers() throws App42Exception
App42Exception
public java.util.ArrayList<User> getAllUsers(int max, int 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.ArrayList<User> getLockedUsers() throws App42Exception
App42Exception
public java.util.ArrayList<User> getLockedUsers(int max, int 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
- UserName which should be unique for the App
App42Exception
public User getUser(java.lang.String userName) throws App42Exception
userName
- UserName which should be unique for the App
App42Exception
public User getUserByEmailId(java.lang.String emailId) throws App42Exception
emailId
- EmailId of the user to be retrieved
App42Exception
public java.util.ArrayList<User> getUsersByProfileData(User.Profile profileData) throws App42Exception
profileData
- Profile Data key/value for which Users need to be retrieved
App42Exception
public java.util.ArrayList<User> getUsersByRole(java.lang.String role) throws App42Exception
role
- Role for which User 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 AppemailAddress
- Email address of the user
App42Exception
public App42Response revokeAllRoles(java.lang.String userName) throws App42Exception
userName
- UserName which should be unique for the App
App42Exception
public App42Response revokeRole(java.lang.String userName, java.lang.String role) throws App42Exception
userName
- UserName which should be unique for the App
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 |