Class JavamailConfigurationResource

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean

    @Component
    public class JavamailConfigurationResource
    extends OnmsRestService
    implements org.springframework.beans.factory.InitializingBean
    The Class JavamailConfigurationResource.
    Author:
    Alejandro Galue
    • Constructor Detail

      • JavamailConfigurationResource

        public JavamailConfigurationResource()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        After properties set.
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception - the exception
      • getDefaultReadmailConfiguration

        public javax.ws.rs.core.Response getDefaultReadmailConfiguration()
        Gets the default readmail configuration.
        Returns:
        the default readmail configuration
      • getDefaultSendmailConfiguration

        public javax.ws.rs.core.Response getDefaultSendmailConfiguration()
        Gets the default sendmail configuration.
        Returns:
        the default sendmail configuration
      • setDefaultReadmailConfiguration

        public javax.ws.rs.core.Response setDefaultReadmailConfiguration​(java.lang.String readmailConfigName)
        Sets the default readmail configuration.
        Parameters:
        readmailConfigName - the readmail configuration name
        Returns:
        the response
      • setDefaultSendmailConfiguration

        public javax.ws.rs.core.Response setDefaultSendmailConfiguration​(java.lang.String sendmailConfigName)
        Sets the default sendmail configuration.
        Parameters:
        sendmailConfigName - the sendmail configuration name
        Returns:
        the response
      • getReadmailConfigurations

        public javax.ws.rs.core.Response getReadmailConfigurations()
        Gets all the readmail configurations.
        Returns:
        the readmail configuration list
      • getSendmailConfigurations

        public javax.ws.rs.core.Response getSendmailConfigurations()
        Gets all the sendmail configurations.
        Returns:
        the sendmail configuration list
      • getEnd2endConfigurations

        public javax.ws.rs.core.Response getEnd2endConfigurations()
        Gets all the end2end configurations.
        Returns:
        the end2end configuration list
      • getReadmailConfiguration

        public ReadmailConfig getReadmailConfiguration​(java.lang.String readmailConfig)
        Gets a specific readmail configuration.
        Parameters:
        readmailConfig - the readmail configuration
        Returns:
        the readmail configuration
      • getSendmailConfiguration

        public SendmailConfig getSendmailConfiguration​(java.lang.String sendmailConfig)
        Gets a specific sendmail configuration.
        Parameters:
        sendmailConfig - the sendmail configuration
        Returns:
        the sendmail configuration
      • getEnd2EndMailConfiguration

        public End2endMailConfig getEnd2EndMailConfiguration​(java.lang.String end2endConfig)
        Gets a specific end2end mail configuration.
        Parameters:
        end2endConfig - the end2end configuration
        Returns:
        the end2end mail configuration
      • setReadmailConfiguration

        public javax.ws.rs.core.Response setReadmailConfiguration​(ReadmailConfig readmailConfig)
        Sets the readmail configuration.

        If there is a readmail configuration with the same name, the existing one will be overridden.

        Parameters:
        readmailConfig - the readmail configuration
        Returns:
        the response
      • setSendmailConfiguration

        public javax.ws.rs.core.Response setSendmailConfiguration​(SendmailConfig sendmailConfig)
        Sets the sendmail configuration.

        If there is a sendmail configuration with the same name, the existing one will be overridden.

        Parameters:
        sendmailConfig - the sendmail configuration
        Returns:
        the response
      • setEnd2EndMailConfiguration

        public javax.ws.rs.core.Response setEnd2EndMailConfiguration​(End2endMailConfig end2endMailConfig)
        Sets the end2end mail configuration.

        If there is a end2end configuration with the same name, the existing one will be overridden.

        Parameters:
        end2endMailConfig - the end2end mail configuration
        Returns:
        the response
      • updateReadmailConfiguration

        public javax.ws.rs.core.Response updateReadmailConfiguration​(java.lang.String readmailConfigName,
                                                                     MultivaluedMapImpl params)
        Update readmail configuration.
        Parameters:
        readmailConfigName - the readmail configuration name
        params - the parameters map
        Returns:
        the response
      • updateSendmailConfiguration

        public javax.ws.rs.core.Response updateSendmailConfiguration​(java.lang.String sendmailConfigName,
                                                                     MultivaluedMapImpl params)
        Update sendmail configuration.
        Parameters:
        sendmailConfigName - the sendmail configuration name
        params - the parameters map
        Returns:
        the response
      • updateEnd2endConfiguration

        public javax.ws.rs.core.Response updateEnd2endConfiguration​(java.lang.String end2endConfigName,
                                                                    MultivaluedMapImpl params)
        Update end2end configuration.
        Parameters:
        end2endConfigName - the end2end configuration name
        params - the parameters map
        Returns:
        the response
      • removeReadmailConfig

        public javax.ws.rs.core.Response removeReadmailConfig​(java.lang.String readmailConfig)
        Removes the readmail configuration.
        Parameters:
        readmailConfig - the readmail configuration name
        Returns:
        the response
      • removeSendmailConfig

        public javax.ws.rs.core.Response removeSendmailConfig​(java.lang.String sendmailConfig)
        Removes the sendmail configuration.
        Parameters:
        sendmailConfig - the sendmail configuration name
        Returns:
        the response
      • removeEnd2endConfig

        public javax.ws.rs.core.Response removeEnd2endConfig​(java.lang.String end2endConfig)
        Removes the end2end configuration.
        Parameters:
        end2endConfig - the end2end configuration name
        Returns:
        the response
      • saveConfiguration

        public javax.ws.rs.core.Response saveConfiguration()
        Saves the configuration.
        Returns:
        the response