Class EmailResource

java.lang.Object
org.pentaho.platform.web.http.api.resources.AbstractJaxRSResource
org.pentaho.platform.web.http.api.resources.EmailResource

@Path("/emailconfig/") public class EmailResource extends AbstractJaxRSResource
Configures and manage the Email configuration in the platform
Author:
rmansoor
  • Constructor Details

    • EmailResource

      public EmailResource() 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
    • 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")