Interface IRestCommunication

    • Method Detail

      • requestFSConnectionTest

        IRestResponse requestFSConnectionTest​(String sTranslationStudioUri,
                                              String sTranslationStudioPort,
                                              String sApiAccessKey,
                                              boolean bUseTsHttps,
                                              String sFirstSpiritUri,
                                              String sFirstSpiritPort,
                                              boolean bFirstSpiritConnectionModeHttp,
                                              String sFirstSpiritUser,
                                              String sFirstSpiritPassword)
        Test FirstSpirit Connection
        Parameters:
        sTranslationStudioUri - FirstSpirit Uri
        sTranslationStudioPort - FirstSpirit Port
        sApiAccessKey -
        bUseTsHttps -
        sFirstSpiritUri - URL
        sFirstSpiritPort - Port
        bFirstSpiritConnectionModeHttp - Use FirstSpirit Connection Mode HTTP
        sFirstSpiritUser - User
        sFirstSpiritPassword - Password
        Returns:
        success state
      • requestSmtpTestMail

        IRestResponse requestSmtpTestMail​(String sTranslationStudioUri,
                                          String sTranslationStudioPort,
                                          String sApiAccessKey,
                                          boolean bUseHttps,
                                          String sRecipient,
                                          String sSender,
                                          String sSmtpServerAddress,
                                          String sSmtpServerPort,
                                          String sSmtpUser,
                                          String sSmtpPassword,
                                          boolean bTlsEnable)
        Test FirstSpirit Connection
        Parameters:
        sTranslationStudioUri - FirstSpirit Uri
        sTranslationStudioPort - FirstSpirit Port
        sApiAccessKey -
        bUseHttps -
        sRecipient -
        sSender -
        sSmtpServerAddress - SMTP Server Address
        sSmtpServerPort - Port
        sSmtpUser - User
        sSmtpPassword - Password
        bTlsEnable -
        Returns:
        success state
      • requestTmsCommunication

        @NotNull
        IRestResponse requestTmsCommunication​(String sUri,
                                              String sPort,
                                              String sMessage,
                                              String sApiAccessKey,
                                              boolean bUseHttps,
                                              int nTimeout)
        Parameters:
        sUri - Exchange Service Uri
        sPort - Exchange Service Port
        sMessage - Message to be sent
        sApiAccessKey -
        bUseHttps -
        nTimeout -
        Returns:
        Answer
      • pingExchangeService

        boolean pingExchangeService​(String sUri,
                                    String sPort,
                                    String sApiKey,
                                    boolean bUseHttps)
        Parameters:
        sUri -
        sPort -
        sApiKey -
        bUseHttps -
        Returns:
      • queryTranslationStatusPage

        @NotNull
        IRestResponse queryTranslationStatusPage​(long lProjectId,
                                                 long lPageId,
                                                 long lElementId)
        Query Page Status XML
        Parameters:
        lProjectId -
        lPageId -
        lElementId -
        Returns:
      • encryptString

        @NotNull
        IRestResponse encryptString​(String sUri,
                                    String sPort,
                                    String sApiAccessKey,
                                    @NotNull
                                    String sMessage)
        Encrypt a given string
        Parameters:
        sUri -
        sPort -
        sApiAccessKey -
        sMessage - Plain Input
        Returns:
        Encrypted message
      • immediateTranslation

        @NotNull
        IRestResponse immediateTranslation​(@NotNull
                                           String sText,
                                           boolean bIsXml,
                                           @NotNull
                                           String sSourceLanguageAbbreviation,
                                           @NotNull
                                           String sTargetLanguageAbbreviation,
                                           @NotNull
                                           String sConnectorId,
                                           long lProjectId,
                                           @NotNull
                                           String sFormElementName)
        Translate immediately via AWS/Google Translate
        Parameters:
        sText -
        bIsXml -
        sSourceLanguageAbbreviation -
        sTargetLanguageAbbreviation -
        sConnectorId -
        lProjectId -
        sFormElementName -
        Returns:
      • requestRegisterTransferAction

        @NotNull
        IRegistrationTransferAction requestRegisterTransferAction()
        Create action to submit translation request
        Returns:
      • submitTranslationRequest

        boolean submitTranslationRequest​(@NotNull
                                         String psJson,
                                         boolean isUrgent)
        Submit a translation request json
        Parameters:
        psJson -
        isUrgent -
        Returns:
      • pingTranslationStudio

        boolean pingTranslationStudio()
        Ping the translation studio instance to make sure it is available and ready
        Returns:
      • downloadLogfile

        @NotNull
        IRestResponse downloadLogfile()
        Download the current logfile
        Returns:
      • downloadLogfiles

        @NotNull
        IRestResponse downloadLogfiles()
        Download all logfiles
        Returns:
      • downloadDatabaseMonitoredFiles

        @NotNull
        IRestResponse downloadDatabaseMonitoredFiles()
        Download database CSV
        Returns:
      • uploadXmlFile

        @NotNull
        IRestResponse uploadXmlFile​(@NotNull
                                    String sContent)
        Upload a given XML content
        Parameters:
        sContent -
        Returns:
      • getTranslatedXMLs

        @NotNull
        IRestResponse getTranslatedXMLs​(boolean bSuccesses)
        Get Translated XML file list
        Parameters:
        bSuccesses -
        Returns:
      • downloadTranslatedXML

        @NotNull
        IRestResponse downloadTranslatedXML​(boolean bSuccesses,
                                            String sXmlName)
        Get Translated XML file list
        Parameters:
        bSuccesses -
        sXmlName - XML File name
        Returns:
      • updateMonitoredFileStatusRemove

        @NotNull
        IRestResponse updateMonitoredFileStatusRemove​(@NotNull
                                                      String sDatasetId)
        Remove entry by id
        Parameters:
        sDatasetId - Dataset id to remove
        Returns:
      • updateMonitoredFileStatusInProgress

        @NotNull
        IRestResponse updateMonitoredFileStatusInProgress​(@NotNull
                                                          String sDatasetId,
                                                          @NotNull
                                                          String sProjectId,
                                                          boolean bResetRetryCounter)
        Set status to "IN PROGRESS", either by dataset id OR project id
        Parameters:
        sDatasetId - Dataset id (takes precedence)
        sProjectId - Project id
        bResetRetryCounter - Set number of retries to 0 again
        Returns:
      • updateMonitoredFileStatusFinished

        @NotNull
        IRestResponse updateMonitoredFileStatusFinished​(@NotNull
                                                        String sDatasetId,
                                                        @NotNull
                                                        String sProjectId,
                                                        boolean bResetRetryCounter)
        Set status to "FINISHED", either by dataset id OR project id
        Parameters:
        sDatasetId - Dataset id (takes precedence)
        sProjectId - Project id
        bResetRetryCounter - Set number of retries to 0 again
        Returns:
      • updateMonitoredFileStatusObsolete

        @NotNull
        IRestResponse updateMonitoredFileStatusObsolete​(@NotNull
                                                        String sDatasetId,
                                                        @NotNull
                                                        String sProjectId,
                                                        boolean bResetRetryCounter)
        Set status to "OBSOLETE", either by dataset id OR project id
        Parameters:
        sDatasetId - Dataset id (takes precedence)
        sProjectId - Project id
        bResetRetryCounter - Set number of retries to 0 again
        Returns:
      • historyDownloadCSV

        @NotNull
        IRestResponse historyDownloadCSV​(long lProjectId)
        Download history
        Parameters:
        lProjectId -
        Returns:
      • historyRemove

        @NotNull
        IRestResponse historyRemove​(@NotNull
                                    List<Long> vplDatasetIds)
        Download history
        Parameters:
        vplDatasetIds -
        Returns: