Class EmailResource

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

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

      public javax.ws.rs.core.Response deleteEmailConfig()
      Delete the stored email configuration from the platform.
      Parameters:
      emailConfiguration - EmailConfiguration
      Returns:
    • setEmailConfig

      public javax.ws.rs.core.Response setEmailConfig(EmailConfiguration emailConfiguration)
      Stores the email configuration in the platform
      Parameters:
      emailConfiguration - EmailConfiguration
      Returns:
    • getEmailConfig

      public org.pentaho.platform.api.email.IEmailConfiguration getEmailConfig()
      Retrieves the email configuration
      Returns:
      emailConfiguration EmailConfiguration
    • sendEmailTest

      public javax.ws.rs.core.Response sendEmailTest(EmailConfiguration emailConfiguration) throws Exception
      Process the current email configuration
      Parameters:
      emailConfiguration - EmailConfiguration
      Returns:
      Throws:
      Exception
    • isValid

      public javax.ws.rs.core.Response isValid()
      Checks whether the current email configuration is valid
      Returns:
      ("true" or "false")