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 TypeMethodDescriptionjavax.ws.rs.core.ResponseDelete the stored email configuration from the platform.org.pentaho.platform.api.email.IEmailConfigurationRetrieves the email configurationjavax.ws.rs.core.ResponseisValid()Checks whether the current email configuration is validjavax.ws.rs.core.ResponsesendEmailTest(EmailConfiguration emailConfiguration) Process the current email configurationjavax.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
public javax.ws.rs.core.Response deleteEmailConfig()Delete the stored email configuration from the platform.- Parameters:
emailConfiguration-EmailConfiguration- Returns:
-
setEmailConfig
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")
-