Package co.mastermindcms.modules.rest
Class EmailController
- java.lang.Object
-
- co.mastermindcms.modules.rest.EmailController
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
@Controller public class EmailController extends java.lang.Object implements org.springframework.beans.factory.InitializingBean
-
-
Field Summary
Fields Modifier and Type Field Description private CommonProperties
commonProperties
private EmailProperties
emailProperties
private EmailSenderService
emailSenderService
private javax.servlet.http.HttpSession
httpSession
private TemplateLocatorService
templateLocatorService
private TokenService
tokenService
private UserPrincipalDetailsService
userDetailsService
private UserManagementService
userManagementService
private WebSiteSettingsRepository
webSiteSettingsRepository
-
Constructor Summary
Constructors Constructor Description EmailController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
void
changePassword(java.lang.String token, java.lang.String site, java.lang.String lang, boolean redirect, javax.servlet.http.HttpServletResponse response)
void
resetPassword(java.lang.String email, java.lang.String site, java.lang.String lang, boolean redirect, javax.servlet.http.HttpServletResponse response)
org.springframework.http.ResponseEntity<?>
saveContactForm(EmailMessage emailMessage)
org.springframework.http.ResponseEntity<?>
saveContactFormWithAttachments(EmailMessage emailMessage)
org.springframework.http.ResponseEntity<?>
savePassword(java.lang.String token, java.lang.String password)
org.springframework.http.ResponseEntity<?>
sendUploadRequest(EmailMessage emailMessage)
void
verifyUser(java.lang.String token, java.lang.String site, java.lang.String lang, boolean redirect, javax.servlet.http.HttpServletResponse response)
-
-
-
Field Detail
-
httpSession
@Autowired private javax.servlet.http.HttpSession httpSession
-
emailSenderService
@Autowired private EmailSenderService emailSenderService
-
tokenService
@Autowired private TokenService tokenService
-
userManagementService
@Autowired private UserManagementService userManagementService
-
emailProperties
@Autowired private EmailProperties emailProperties
-
commonProperties
@Autowired private CommonProperties commonProperties
-
templateLocatorService
@Autowired private TemplateLocatorService templateLocatorService
-
webSiteSettingsRepository
@Autowired private WebSiteSettingsRepository webSiteSettingsRepository
-
userDetailsService
@Qualifier("userPrincipalDetailsService") @Autowired private UserPrincipalDetailsService userDetailsService
-
-
Method Detail
-
verifyUser
@CrossOrigin(origins="*", allowCredentials="false") @GetMapping("/verify") @ResponseBody public void verifyUser(@RequestParam("token") java.lang.String token, @RequestParam(value="site",required=false) java.lang.String site, @RequestParam(value="lang",required=false) java.lang.String lang, @RequestParam(value="redirect",defaultValue="true",required=false) boolean redirect, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
- Throws:
java.io.IOException
-
resetPassword
@PostMapping("/resetPassword") public void resetPassword(@RequestParam("email") java.lang.String email, @RequestParam(value="site",required=false) java.lang.String site, @RequestParam(value="lang",required=false) java.lang.String lang, @RequestParam(value="redirect",defaultValue="true",required=false) boolean redirect, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
- Throws:
java.io.IOException
-
changePassword
@GetMapping("/changePassword") public void changePassword(@RequestParam("token") java.lang.String token, @RequestParam(value="site",required=false) java.lang.String site, @RequestParam(value="lang",required=false) java.lang.String lang, @RequestParam(value="redirect",defaultValue="true",required=false) boolean redirect, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
- Throws:
java.io.IOException
-
savePassword
@PostMapping("/savePassword") @ResponseBody public org.springframework.http.ResponseEntity<?> savePassword(@RequestParam("token") java.lang.String token, @RequestParam("password") java.lang.String password)
-
saveContactForm
@PostMapping("/saveContactForm") @ResponseBody public org.springframework.http.ResponseEntity<?> saveContactForm(@RequestBody EmailMessage emailMessage)
-
saveContactFormWithAttachments
@PostMapping("/saveContactFormWithAttachments") @ResponseBody public org.springframework.http.ResponseEntity<?> saveContactFormWithAttachments(@RequestBody EmailMessage emailMessage)
-
sendUploadRequest
@PostMapping("/sendUploadRequest") @ResponseBody public org.springframework.http.ResponseEntity<?> sendUploadRequest(@RequestBody EmailMessage emailMessage)
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
-
-