Class EmailResource
java.lang.Object
org.pentaho.platform.web.http.api.resources.AbstractJaxRSResource
org.pentaho.platform.web.http.api.resources.EmailResource
Configures and manage the Email configuration in the platform
- Author:
- rmansoor
-
Field Summary
Fields inherited from class org.pentaho.platform.web.http.api.resources.AbstractJaxRSResource
acceptableMediaTypes, httpServletRequest, httpServletResponse, TEXT_HTML -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an instance of this class using the default email serviceEmailResource(org.pentaho.platform.api.email.IEmailService emailService) Constructs an instance of this class using the default email service -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseDelete the stored email configuration from the platform.org.pentaho.platform.api.email.IEmailConfigurationRetrieves the email configurationjakarta.ws.rs.core.ResponseisValid()Checks whether the current email configuration is validjakarta.ws.rs.core.ResponsesendEmailTest(EmailConfiguration emailConfiguration) Process the current email configurationjakarta.ws.rs.core.ResponsesetEmailConfig(EmailConfiguration emailConfiguration) Stores the email configuration in the platformMethods inherited from class org.pentaho.platform.web.http.api.resources.AbstractJaxRSResource
setHttpHeaders
-
Constructor Details
-
EmailResource
Constructs an instance of this class using the default email service- Throws:
IllegalArgumentException- Indicates that the default location for the email configuration file is invalid
-
EmailResource
public EmailResource(org.pentaho.platform.api.email.IEmailService emailService) throws IllegalArgumentException Constructs an instance of this class using the default email service- Throws:
IllegalArgumentException- Indicates that the default location for the email configuration file is invalid
-
-
Method Details
-
deleteEmailConfig
@GET @Path("/resetEmailConfig") @Produces({"text/plain","application/json"}) public jakarta.ws.rs.core.Response deleteEmailConfig()Delete the stored email configuration from the platform.- Parameters:
emailConfiguration-EmailConfiguration- Returns:
-
setEmailConfig
@PUT @Path("/setEmailConfig") @Consumes("application/json") @Produces({"text/plain","application/json"}) public jakarta.ws.rs.core.Response setEmailConfig(EmailConfiguration emailConfiguration) Stores the email configuration in the platform- Parameters:
emailConfiguration-EmailConfiguration- Returns:
-
getEmailConfig
@GET @Path("/getEmailConfig") @Produces("application/json") public org.pentaho.platform.api.email.IEmailConfiguration getEmailConfig()Retrieves the email configuration- Returns:
- emailConfiguration
EmailConfiguration
-
sendEmailTest
@PUT @Path("/sendEmailTest") @Consumes("application/json") @Produces({"text/plain","application/json"}) public jakarta.ws.rs.core.Response sendEmailTest(EmailConfiguration emailConfiguration) throws Exception Process the current email configuration- Parameters:
emailConfiguration-EmailConfiguration- Returns:
- Throws:
Exception
-
isValid
@GET @Path("/isValid") @Produces("text/plain") public jakarta.ws.rs.core.Response isValid()Checks whether the current email configuration is valid- Returns:
- ("true" or "false")
-