Class AccountEndpoint
java.lang.Object
com.maplander.backend.controller.endpoint.fiabci.AccountEndpoint
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncancelSubscription
(Long officeId) update variable subscription on officechangeEmailUserRemax
(Long idUser, String email) changePassword
(String password, Long userId) createAccount
(String token, DeviceTypeEnum type, String appleId, Account account) createLead
(Long propertyId, Long fromUserId, LeadTypeEnum type, String message, Long userId) createUser
(String token, DeviceTypeEnum type, String appId, User user) Create an User Lite in OPI.createUserDefault
(String token, DeviceTypeEnum type, String appleId, String emailType, User user) createUserFree
(String token, DeviceTypeEnum type, String appId, User user) createUserInOffice
(User user) createUserRemax
(UserRemax userRemax) deleteAccountFiabci
(Long userId) deleteBlob
(String blobName) deleteUserAndOffice
(String email) deleteUserInOfficeBackGround
(Long id, Long to_userId) endFreeNotice
(String email) API Method to handle the end of the free notice for a user.endFreeNoticeWhats
(String email) API Method to handle the end of the free notice for a user.getAccountByBCardId
(Long bCardId) Get complete office with idgetOfficeAndUsers
(Long officeId) getUserAndOffice
(javax.servlet.http.HttpServletRequest request, WebSiteEnum webSite, Long userId) getUserByBCardId
(Long bCardId) getUserById
(Long id) get complete User by idlistAllAdmin
(Integer limit, String cursor) listOfficeByBrand
(BrandTypeEnum brand, Integer limit, String cursor) listOfficeByStatus
(AccountStatusEnum status, Integer limit, String cursor) listSQLAccountByBrand
(BrandTypeEnum brand, Integer limit, String cursor) listUserByOffice
(Long officeId) listUserRemax
(Long officeId, Integer limit, String cursor) listUsersByRole
(RoleTypeEnum role, Integer limit, String cursor) recoverPassword
(String email) Send email for access to accountrequestInfo
(Long userId, String message, Long propertyId) sendUpdatePlanIOS
(Long userId) signIn
(javax.servlet.http.HttpServletRequest request, String email, String password, String token, DeviceTypeEnum type, LanguageTypeEnum language, Boolean skipSaveInteractions) Returns User with correct email and password.signInAccountRequest
(javax.servlet.http.HttpServletRequest request, TransactionTypeEnum type, String hash, WebSiteEnum webSite, String token, DeviceTypeEnum deviceType, LanguageTypeEnum language) signInApple
(String appleId, String token, DeviceTypeEnum type, LanguageTypeEnum language) signInSocial
(String token, DeviceTypeEnum type, User user) SignIn a User to OPI since social way.signInWithLink
(javax.servlet.http.HttpServletRequest request, 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.specialLogin
(String email, String password, String emailUser) updateAccount
(javax.servlet.http.HttpServletRequest request, DeviceTypeEnum deviceType, Account account) Update user, office o BCard for OPIupdateExternalOfficeId
(Long officeId, Long externalOfficeId) updateOfficeAndUserOPI
(Account account) update office and userupdateOfficeTypeAndStatus
(Long officeId, AccountTypeEnum typeEnum, AccountStatusEnum statusEnum) Updates type and status in a determined office.updateUser
(String apiKey, User user) updateUsersIndex
(Integer limit, String cursor) userAvailable
(Long userId) userExists
(String email) validateUser
(String email) Send email of user
-
Constructor Details
-
AccountEndpoint
public AccountEndpoint()
-
-
Method Details
-
signInWithLink
public EntityResponse<Account> signInWithLink(javax.servlet.http.HttpServletRequest request, 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 an 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
-
sendUpdatePlanIOS
-
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(javax.servlet.http.HttpServletRequest request, String email, String password, String token, DeviceTypeEnum type, LanguageTypeEnum language, Boolean skipSaveInteractions) 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
-
signInApple
public EntityResponse<Account> signInApple(String appleId, String token, DeviceTypeEnum type, LanguageTypeEnum language) -
createUser
public EntityResponse<Account> createUser(String token, DeviceTypeEnum type, String appId, User user) 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 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
-
createAccount
public EntityResponse<Account> createAccount(String token, DeviceTypeEnum type, String appleId, Account account) -
createUserDefault
public EntityResponse<Account> createUserDefault(String token, DeviceTypeEnum type, String appleId, String emailType, User user) -
createUserFree
public EntityResponse<Account> createUserFree(String token, DeviceTypeEnum type, String appId, User user) -
userAvailable
-
createUserInOffice
-
listUserByOffice
-
deleteUserInOffice
-
deleteUserInOfficeBackGround
-
deleteUserInOffice2
-
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
public EntityResponse<Account> getUserAndOffice(javax.servlet.http.HttpServletRequest request, WebSiteEnum webSite, Long userId) -
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
public EntityResponse<Account> updateAccount(javax.servlet.http.HttpServletRequest request, DeviceTypeEnum deviceType, Account account) 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
-
updateUser
-
userExists
-
requestInfo
public EntityResponse<Lead> requestInfo(Long userId, String message, Long propertyId) throws ParseException - Throws:
ParseException
-
listAllAdmin
-
listUsersByRole
public EntityCollectionResponse<Account> listUsersByRole(RoleTypeEnum role, Integer limit, String cursor) -
deleteBlob
-
listSQLAccountByBrand
public EntityCollectionResponse<SQLAccount> listSQLAccountByBrand(BrandTypeEnum brand, Integer limit, String cursor) -
getOfficeAndUsers
-
listOfficeByBrand
public EntityCollectionResponse<Office> listOfficeByBrand(BrandTypeEnum brand, Integer limit, String cursor) -
listOfficeByStatus
public EntityCollectionResponse<Office> listOfficeByStatus(AccountStatusEnum status, Integer limit, String cursor) -
listUserRemax
public EntityCollectionResponse<UserRemax> listUserRemax(Long officeId, Integer limit, String cursor) -
createUserRemax
-
changeEmailUserRemax
-
getAccountByBCardId
-
getUserByBCardId
-
specialLogin
-
changePassword
-
createLead
public EntityResponse<Lead> createLead(Long propertyId, Long fromUserId, LeadTypeEnum type, String message, Long userId) throws ParseException - Throws:
ParseException
-
deleteAccountFiabci
-
signInAccountRequest
public EntityResponse<AccountRequest> signInAccountRequest(javax.servlet.http.HttpServletRequest request, TransactionTypeEnum type, String hash, WebSiteEnum webSite, String token, DeviceTypeEnum deviceType, LanguageTypeEnum language) -
updateUsersIndex
-
endFreeNotice
API Method to handle the end of the free notice for a user.This method checks if a user associated with a given email is eligible to receive an email about updating their subscription plan. The user must meet specific criteria, including being an administrator and belonging to a supported brand.
- Parameters:
email
- the email of the user to be processed. It must not be null.- Returns:
DefaultResponse
representing the outcome of the operation:HttpStatusCode.BAD_REQUEST
if the email is null.HttpStatusCode.NOT_EXISTS
if the user with the given email is not found.HttpStatusCode.CONFLICT
if the user does not meet the required conditions.HttpStatusCode.OK
if the process is successful and the email is sent.HttpStatusCode.INTERNAL_SERVER_ERROR
for unexpected cases.
-
endFreeNoticeWhats
API Method to handle the end of the free notice for a user.This method checks if a user associated with a given email is eligible to send the sHash for others methods about updating their subscription plan. The user must meet specific criteria, including being an administrator and belonging to a supported brand.
- Parameters:
email
- the email of the user to be processed. It must not be null.- Returns:
DefaultResponse
representing the outcome of the operation:HttpStatusCode.BAD_REQUEST
if the email is null.HttpStatusCode.NOT_EXISTS
if the user with the given email is not found.HttpStatusCode.CONFLICT
if the user does not meet the required conditions.HttpStatusCode.OK
if the process is successful and the sHash is sent.HttpStatusCode.INTERNAL_SERVER_ERROR
for unexpected cases.
-
updateOfficeTypeAndStatus
public DefaultResponse updateOfficeTypeAndStatus(Long officeId, AccountTypeEnum typeEnum, AccountStatusEnum statusEnum) Updates type and status in a determined office.- Parameters:
officeId
- officeId of UsertypeEnum
- Account type of UserstatusEnum
- Account status of User- Returns:
- DefaultResponse with Office
HttpStatusCode.OK
,HttpStatusCode.BAD_REQUEST
-
updateExternalOfficeId
-