Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- signInWithLink(TransactionTypeEnum, String, String, DeviceTypeEnum, LanguageTypeEnum)
- recoverPassword(String)
- validateUser(String)
- validateUserInOffice(Long)
- signIn(String, String, String, DeviceTypeEnum, LanguageTypeEnum)
- createUser(String, DeviceTypeEnum, User)
- createUserInOffice(User)
- listUserByOffice(Long)
- deleteUserInOffice(Long)
- signInSocial(String, DeviceTypeEnum, User)
- deleteUserAndOffice(String)
- signOut(String)
- getUserAndOffice(Long)
- updateOfficeAndUserOPI(Account)
- getOffice(Long)
- cancelSubscription(Long)
- getUserById(Long)
- updateAccount(Account)
- userExists(String)
- listAllAdmin(Integer, String)
- deleteBlob(String)
Class AccountEndpoint
java.lang.Object
com.maplander.backend.controller.endpoint.opi.AccountEndpoint
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncancelSubscription
(Long officeId) update variable subscription on officecreateUser
(String token, DeviceTypeEnum type, User user) Create an User Lite in OPI.createUserInOffice
(User user) deleteBlob
(String blobName) deleteUserAndOffice
(String email) Get complete office with idgetUserAndOffice
(Long userId) getUserById
(Long id) get complete User by idlistAllAdmin
(Integer limit, String cursor) listUserByOffice
(Long officeId) recoverPassword
(String email) Send email for access to accountsignIn
(String email, String password, String token, DeviceTypeEnum type, LanguageTypeEnum language) Returns User with correct email and password.signInSocial
(String token, DeviceTypeEnum type, User user) SignIn a User to OPI since social way.signInWithLink
(TransactionTypeEnum type, String hash, String token, DeviceTypeEnum deviceType, LanguageTypeEnum language) SignIn with link of email recoverPassword and validateUserDeletes all Devices with token passed as a parameter.updateAccount
(Account account) Update user, office o BCard for OPIupdateOfficeAndUserOPI
(Account account) update office and useruserExists
(String email) validateUser
(String email) Send email of user
-
Constructor Details
-
Method Details
-
signInWithLink
public EntityResponse<Account> signInWithLink(TransactionTypeEnum type, String hash, String token, DeviceTypeEnum deviceType, LanguageTypeEnum language) SignIn with link of email recoverPassword and validateUser- Parameters:
type
- of TransactionTypeEnum:TransactionTypeEnum
hash
- is a object encrypt- Returns:
- Entity response with User
HttpStatusCode.BAD_REQUEST
,HttpStatusCode.OK
,HttpStatusCode.NOT_EXISTS
,HttpStatusCode.ALREADY_EXISTS
}
-
recoverPassword
Send email for access to account- Parameters:
email
- of user- Returns:
- DefaultResponse
HttpStatusCode.BAD_REQUEST
,HttpStatusCode.NOT_EXISTS
,HttpStatusCode.OK
,HttpStatusCode.INTERNAL_SERVER_ERROR
-
validateUser
Send email of user- Parameters:
email
- of the user- Returns:
- DefaultResponse
HttpStatusCode.BAD_REQUEST
,HttpStatusCode.NOT_EXISTS
,HttpStatusCode.OK
,HttpStatusCode.INTERNAL_SERVER_ERROR
-
validateUserInOffice
-
signIn
public EntityResponse<Account> signIn(String email, String password, String token, DeviceTypeEnum type, LanguageTypeEnum language) Returns User with correct email and password. In that case save a Device with token and type passed as parameters.- Parameters:
email
- email of Userpassword
- password of Usertoken
- token of Device (can be null)type
- type of Device (can be null)language
- language of Device (can be null)- Returns:
- EntityResponse with User
HttpStatusCode.OK
,HttpStatusCode.BAD_REQUEST
,HttpStatusCode.NOT_EXISTS
,HttpStatusCode.INCORRECT_PASS
-
createUser
Create an User Lite in OPI. This method needs password.- Parameters:
token
- token of Device (can be null)type
- type of Device (can be null)user
- user must to have email and name if this user is new- Returns:
- EntityResponse with UserOffice created.
HttpStatusCode.OK
,HttpStatusCode.BAD_REQUEST
,HttpStatusCode.ALREADY_EXISTS
,HttpStatusCode.INTERNAL_SERVER_ERROR
-
createUserInOffice
-
listUserByOffice
-
deleteUserInOffice
-
signInSocial
SignIn a User to OPI since social way. If user does not exist then this is created with email and name passed in user parameter.- Parameters:
token
- token of Device (can be null)type
- type of Device (can be null)user
- user must to have email and name if this user is new- Returns:
- EntityResponse with UserOffice created.
HttpStatusCode.OK
,HttpStatusCode.BAD_REQUEST
,HttpStatusCode.INTERNAL_SERVER_ERROR
-
deleteUserAndOffice
-
signOut
Deletes all Devices with token passed as a parameter.- Parameters:
token
- Device token to be removed- Returns:
- DefaultResponse
HttpStatusCode.OK
,HttpStatusCode.BAD_REQUEST
,HttpStatusCode.NOT_EXISTS
-
getUserAndOffice
-
updateOfficeAndUserOPI
update office and user- Parameters:
account
- to be update- Returns:
- EntityResponse with UserOffice
HttpStatusCode.BAD_REQUEST
,HttpStatusCode.OK
,HttpStatusCode.FORBIDDEN
,HttpStatusCode.INTERNAL_SERVER_ERROR
-
getOffice
Get complete office with id- Parameters:
officeId
- id of office- Returns:
- EntityResponse with Office
HttpStatusCode.BAD_REQUEST
,HttpStatusCode.NOT_EXISTS
,HttpStatusCode.OK
-
cancelSubscription
update variable subscription on office- Parameters:
officeId
- id of office- Returns:
- DefaultResponse
HttpStatusCode.BAD_REQUEST
,HttpStatusCode.NOT_EXISTS
,HttpStatusCode.OK
,HttpStatusCode.INTERNAL_SERVER_ERROR
-
getUserById
get complete User by id- Parameters:
id
- of User- Returns:
- EntityResponse with User
HttpStatusCode.BAD_REQUEST
,HttpStatusCode.NOT_EXISTS
,HttpStatusCode.OK
-
updateAccount
Update user, office o BCard for OPI- Parameters:
account
- to be update- Returns:
- EntityResponse with User
HttpStatusCode.BAD_REQUEST
,HttpStatusCode.NOT_EXISTS
,HttpStatusCode.OK
,HttpStatusCode.INTERNAL_SERVER_ERROR
-
userExists
-
listAllAdmin
-
deleteBlob
-