Class EmptyFirstTranslationService
java.lang.Object
com.idmedia.translationstudio.firstspirit.api.EmptyFirstTranslationService
- All Implemented Interfaces:
IFirstSpiritServer,IFirstTranslationService,IRestCommunication,IRestConfiguration,IRestConnectiorCommunication,ITranslationStudioConfiguration,Serializable
- Author:
- Phillip Austerfield
- See Also:
-
Field Summary
Fields inherited from interface com.idmedia.translationstudio.api.client.service.IFirstTranslationService
MODULE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclearTranslatedXmlFolder(boolean bSuccessXmls) Clear XML files in either success or failed folderDownload specific folder as zipDownload specific folder as zipDownload specific folder as zipCount the number of XMLs filesDownload database CSVDownload the current logfileDownload all logfilesdownloadTemporaryFolder(String sName) Download specific folder as zipDownload all temp foldersdownloadTranslatedXmlFolder(boolean bSuccessXmls) Download specific folder as zipDownload specific folder as zipDownload specific folder as zipDownload specific folder as zipencryptString(String string, String string1, String string2, String string3) Encrypt a given stringexportDatabaseTable(String type) Cloud tech userGet the Core configurstionGet the Non Core configurstiongetConnectorUsage(String sUri, String sPort, String sApiAccessKey, String sConnectorID) Encrypt a given stringGet Export Server IpGet License InformationGet memory informationgetName()Get the module name, same as in module.xmlgetStartupLicenseData(boolean bFull) Get all available TMS ProjectsGet the port (localhost, etc.)Get the url name (localhost, etc.)booleanGet the port (localhost, etc.)historyDownloadCSV(long lProjectId) Download historyhistoryRemove(List<Long> vplDatasetIds) Download historyimmediateTranslation(String sText, boolean bIsXml, String sSourceLanguageAbbreviation, String sTargetLanguageAbbreviation, String sConnectorId, long lProjectId, String sFormElementName) Translate immediately via AWS/Google TranslateimportDatabaseTable(String type, String sContent) booleanIs this plugin available at allbooleanReturns the global service statustrue|falsebooleanisReachable(String sDirectory) Check if FirstSpirit can access given directoryLoad technical cloud userbooleanpingExchangeService(String sUri, String sPort, String sApiKey, boolean bUseHttps) queryTranslationStatusPage(long lProjectId, long lPageId, long lElementId) Query Page Status XMLqueryTranslationStatusReport(Map<String, String> pParams) queryTranslationStatusReport(Map<String, String> pParams, String sLocalTimezoneId) requestFSConnectionTest(String sTranslationStudioUri, String sTranslationStudioPort, String sApiAccessKey, boolean bUseTsHttps, String sFirstSpiritUri, String sFirstSpiritPort, boolean bFirstSpiritConnectionModeHttp, boolean bFirstSpiritConnectionModeSecure, String sFirstSpiritUser, String sFirstSpiritPassword) Test FirstSpirit ConnectionCreate action to submit translation requestrequestSmtpTestMail(String sTranslationStudioUri, String sTranslationStudioPort, String sApiAccessKey, boolean bUseHttps, String sRecipient, String sSender, String sSmtpServerAddress, String sSmtpServerPort, String sSmtpUser, String sSmtpPassword, boolean bTlsEnable) Test FirstSpirit ConnectionrequestTmsCommunication(String sUri, String sPort, String sMessage, String sApiAccessKey, boolean bUseHttps, int nTimeout) sendConnectorRequest(String sConnectorId, String sPayload) sendCustomEvent(ICustomEventMessage pEvent) Send a custom request to TranslationStudiovoidstoreServiceConfiguration(Properties pPropertiesCore, Properties pPropertiesNonCore, Properties pPropertiesCloudUser, List<String> vpProjects, List<String> vpSystemNames, String sStorableXmlCore) Set Service configurationbooleansubmitTranslationRequest(String psJson, boolean isUrgent) Submit a translation request jsonbooleantranslateMedia(String jsonObject) updateLicenseInformation(String sLicenseData) Upload new licenseupdateMonitoredFileStatusFinished(String sDatasetId, String sProjectId, boolean bResetRetryCounter) Set status to "FINISHED", either by dataset id OR project idupdateMonitoredFileStatusInProgress(String sDatasetId, String sProjectId, boolean bResetRetryCounter) Set status to "IN PROGRESS", either by dataset id OR project idupdateMonitoredFileStatusObsolete(String sDatasetId, String sProjectId, boolean bResetRetryCounter) Set status to "OBSOLETE", either by dataset id OR project idupdateMonitoredFileStatusRemove(String sDatasetId) Remove entry by iduploadXmlFile(String sContent) Upload a given XML contentMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.idmedia.translationstudio.api.client.service.IFirstSpiritServer
getServerTime, getServerTimeZoneMethods inherited from interface com.idmedia.translationstudio.api.client.service.IRestCommunication
insertMonitoredFiles, pingTranslationStudio, updateSecondInMillisecondsMethods inherited from interface com.idmedia.translationstudio.api.client.service.IRestConfiguration
getPathToTranslationStudioPreviewFolder, getSecurityProtocolsMethods inherited from interface com.idmedia.translationstudio.api.client.service.ITranslationStudioConfiguration
allowInstandInEditTranslationOperation, allowInstandInEditTranslationOperationAws, allowInstandInEditTranslationOperationAzure, allowInstandInEditTranslationOperationDeepL, allowInstandInEditTranslationOperationGoogle, allowInstandInEditTranslationOperationLLMClaude, allowInstandInEditTranslationOperationLLMMistral, allowInstandInEditTranslationOperationLLMOpenAI, allowInstandInEditTranslationOperationLLMOther, allowInstandInEditTranslationOperationOthers, allowInstandInEditTranslationOperationPons, allowServerStatusInfos, disableFsReport, getConnectors, getIntandInEditTranslationOperationOthersJson
-
Constructor Details
-
EmptyFirstTranslationService
public EmptyFirstTranslationService()
-
-
Method Details
-
isAvailable
public boolean isAvailable()Description copied from interface:IFirstTranslationServiceIs this plugin available at all- Specified by:
isAvailablein interfaceIFirstTranslationService- Returns:
-
isEnabled
public boolean isEnabled()Description copied from interface:IFirstTranslationServiceReturns the global service statustrue|false- Specified by:
isEnabledin interfaceIFirstTranslationService- Returns:
trueif vscan service is activated
-
getConfigurationCore
Description copied from interface:ITranslationStudioConfigurationGet the Core configurstion- Specified by:
getConfigurationCorein interfaceITranslationStudioConfiguration- Returns:
-
getConfigurationCloudTechUser
Description copied from interface:ITranslationStudioConfigurationCloud tech user- Specified by:
getConfigurationCloudTechUserin interfaceITranslationStudioConfiguration- Returns:
-
getConfigurationNonCore
Description copied from interface:ITranslationStudioConfigurationGet the Non Core configurstion- Specified by:
getConfigurationNonCorein interfaceITranslationStudioConfiguration- Returns:
-
getName
Description copied from interface:IFirstTranslationServiceGet the module name, same as in module.xml- Specified by:
getNamein interfaceIFirstTranslationService- Returns:
- the module name string
-
getTranslationProjects
Description copied from interface:ITranslationStudioConfigurationGet all available TMS Projects- Specified by:
getTranslationProjectsin interfaceITranslationStudioConfiguration- Returns:
-
getFullTranslationStudioBackendUrl
Description copied from interface:IRestConfigurationGet Export Server Ip- Specified by:
getFullTranslationStudioBackendUrlin interfaceIRestConfiguration- Returns:
- http(s)://url:port or empty string
-
getTranslationStudioBackendUri
Description copied from interface:IRestConfigurationGet the url name (localhost, etc.)- Specified by:
getTranslationStudioBackendUriin interfaceIRestConfiguration- Returns:
- name or empty string
-
getTranslationStudioBackendPort
Description copied from interface:IRestConfigurationGet the port (localhost, etc.)- Specified by:
getTranslationStudioBackendPortin interfaceIRestConfiguration- Returns:
- name or empty string
-
getTranslationStudioBackendUrlHttps
public boolean getTranslationStudioBackendUrlHttps()Description copied from interface:IRestConfigurationGet the port (localhost, etc.)- Specified by:
getTranslationStudioBackendUrlHttpsin interfaceIRestConfiguration- Returns:
- name or empty string
-
storeServiceConfiguration
public void storeServiceConfiguration(Properties pPropertiesCore, Properties pPropertiesNonCore, Properties pPropertiesCloudUser, List<String> vpProjects, List<String> vpSystemNames, String sStorableXmlCore) Description copied from interface:ITranslationStudioConfigurationSet Service configuration- Specified by:
storeServiceConfigurationin interfaceITranslationStudioConfiguration- Parameters:
pPropertiesCore- ConfigurationpPropertiesNonCore- ConfigurationpPropertiesCloudUser-vpProjects- Project ListvpSystemNames-sStorableXmlCore- TranslationStudio Application Configuration XML
-
requestSmtpTestMail
public IRestResponse requestSmtpTestMail(String sTranslationStudioUri, String sTranslationStudioPort, String sApiAccessKey, boolean bUseHttps, String sRecipient, String sSender, String sSmtpServerAddress, String sSmtpServerPort, String sSmtpUser, String sSmtpPassword, boolean bTlsEnable) Description copied from interface:IRestCommunicationTest FirstSpirit Connection- Specified by:
requestSmtpTestMailin interfaceIRestCommunication- Parameters:
sTranslationStudioUri- FirstSpirit UrisTranslationStudioPort- FirstSpirit PortsApiAccessKey-bUseHttps-sRecipient-sSender-sSmtpServerAddress- SMTP Server AddresssSmtpServerPort- PortsSmtpUser- UsersSmtpPassword- PasswordbTlsEnable-- Returns:
- success state
-
queryTranslationStatusReport
- Specified by:
queryTranslationStatusReportin interfaceIRestCommunication
-
requestTmsCommunication
public IRestResponse requestTmsCommunication(String sUri, String sPort, String sMessage, String sApiAccessKey, boolean bUseHttps, int nTimeout) - Specified by:
requestTmsCommunicationin interfaceIRestCommunication- Parameters:
sUri- Exchange Service UrisPort- Exchange Service PortsMessage- Message to be sentsApiAccessKey-bUseHttps-nTimeout-- Returns:
- Answer
-
isReachable
Description copied from interface:IFirstTranslationServiceCheck if FirstSpirit can access given directory- Specified by:
isReachablein interfaceIFirstTranslationService- Parameters:
sDirectory-- Returns:
-
pingExchangeService
- Specified by:
pingExchangeServicein interfaceIRestCommunication- Parameters:
sUri-sPort-sApiKey-bUseHttps-- Returns:
-
queryTranslationStatusPage
Description copied from interface:IRestCommunicationQuery Page Status XML- Specified by:
queryTranslationStatusPagein interfaceIRestCommunication- Parameters:
lProjectId-lPageId-lElementId-- Returns:
-
immediateTranslation
public IRestResponse immediateTranslation(String sText, boolean bIsXml, String sSourceLanguageAbbreviation, String sTargetLanguageAbbreviation, String sConnectorId, long lProjectId, String sFormElementName) Description copied from interface:IRestCommunicationTranslate immediately via AWS/Google Translate- Specified by:
immediateTranslationin interfaceIRestCommunication- Parameters:
sText-bIsXml-sSourceLanguageAbbreviation-sTargetLanguageAbbreviation-sConnectorId-lProjectId-sFormElementName-- Returns:
-
loadTechnicalUserCloud
Description copied from interface:ITranslationStudioConfigurationLoad technical cloud user- Specified by:
loadTechnicalUserCloudin interfaceITranslationStudioConfiguration- Returns:
-
requestRegisterTransferAction
Description copied from interface:IRestCommunicationCreate action to submit translation request- Specified by:
requestRegisterTransferActionin interfaceIRestCommunication- Returns:
-
sendCustomEvent
Description copied from interface:IRestCommunicationSend a custom request to TranslationStudio- Specified by:
sendCustomEventin interfaceIRestCommunication- Parameters:
pEvent-- Returns:
- Throws:
IllegalArgumentException
-
downloadLogfile
Description copied from interface:IRestCommunicationDownload the current logfile- Specified by:
downloadLogfilein interfaceIRestCommunication- Returns:
-
downloadLogfiles
Description copied from interface:IRestCommunicationDownload all logfiles- Specified by:
downloadLogfilesin interfaceIRestCommunication- Returns:
-
downloadDatabaseMonitoredFiles
Description copied from interface:IRestCommunicationDownload database CSV- Specified by:
downloadDatabaseMonitoredFilesin interfaceIRestCommunication- Returns:
-
uploadXmlFile
Description copied from interface:IRestCommunicationUpload a given XML content- Specified by:
uploadXmlFilein interfaceIRestCommunication- Parameters:
sContent-- Returns:
-
updateMonitoredFileStatusRemove
Description copied from interface:IRestCommunicationRemove entry by id- Specified by:
updateMonitoredFileStatusRemovein interfaceIRestCommunication- Parameters:
sDatasetId- Dataset id to remove- Returns:
-
updateMonitoredFileStatusInProgress
public IRestResponse updateMonitoredFileStatusInProgress(String sDatasetId, String sProjectId, boolean bResetRetryCounter) Description copied from interface:IRestCommunicationSet status to "IN PROGRESS", either by dataset id OR project id- Specified by:
updateMonitoredFileStatusInProgressin interfaceIRestCommunication- Parameters:
sDatasetId- Dataset id (takes precedence)sProjectId- Project idbResetRetryCounter- Set number of retries to 0 again- Returns:
-
updateMonitoredFileStatusFinished
public IRestResponse updateMonitoredFileStatusFinished(String sDatasetId, String sProjectId, boolean bResetRetryCounter) Description copied from interface:IRestCommunicationSet status to "FINISHED", either by dataset id OR project id- Specified by:
updateMonitoredFileStatusFinishedin interfaceIRestCommunication- Parameters:
sDatasetId- Dataset id (takes precedence)sProjectId- Project idbResetRetryCounter- Set number of retries to 0 again- Returns:
-
updateMonitoredFileStatusObsolete
public IRestResponse updateMonitoredFileStatusObsolete(String sDatasetId, String sProjectId, boolean bResetRetryCounter) Description copied from interface:IRestCommunicationSet status to "OBSOLETE", either by dataset id OR project id- Specified by:
updateMonitoredFileStatusObsoletein interfaceIRestCommunication- Parameters:
sDatasetId- Dataset id (takes precedence)sProjectId- Project idbResetRetryCounter- Set number of retries to 0 again- Returns:
-
historyDownloadCSV
Description copied from interface:IRestCommunicationDownload history- Specified by:
historyDownloadCSVin interfaceIRestCommunication- Parameters:
lProjectId-- Returns:
-
historyRemove
Description copied from interface:IRestCommunicationDownload history- Specified by:
historyRemovein interfaceIRestCommunication- Parameters:
vplDatasetIds-- Returns:
-
encryptString
Description copied from interface:IRestCommunicationEncrypt a given string- Specified by:
encryptStringin interfaceIRestCommunication- Parameters:
string-string1-string2-string3- Plain Input- Returns:
- Encrypted message
-
getConnectorUsage
public IRestResponse getConnectorUsage(String sUri, String sPort, String sApiAccessKey, @NotNull String sConnectorID) Description copied from interface:IRestCommunicationEncrypt a given string- Specified by:
getConnectorUsagein interfaceIRestCommunication- Parameters:
sUri-sPort-sApiAccessKey-sConnectorID-- Returns:
-
getMemoryInformation
Description copied from interface:IRestCommunicationGet memory information- Specified by:
getMemoryInformationin interfaceIRestCommunication- Returns:
-
submitTranslationRequest
Description copied from interface:IRestCommunicationSubmit a translation request json- Specified by:
submitTranslationRequestin interfaceIRestCommunication- Parameters:
psJson-isUrgent-- Returns:
-
requestFSConnectionTest
@NotNull public IRestResponse requestFSConnectionTest(String sTranslationStudioUri, String sTranslationStudioPort, String sApiAccessKey, boolean bUseTsHttps, String sFirstSpiritUri, String sFirstSpiritPort, boolean bFirstSpiritConnectionModeHttp, boolean bFirstSpiritConnectionModeSecure, String sFirstSpiritUser, String sFirstSpiritPassword) Description copied from interface:IRestCommunicationTest FirstSpirit Connection- Specified by:
requestFSConnectionTestin interfaceIRestCommunication- Parameters:
sTranslationStudioUri- FirstSpirit UrisTranslationStudioPort- FirstSpirit PortsApiAccessKey-bUseTsHttps-sFirstSpiritUri- URLsFirstSpiritPort- PortbFirstSpiritConnectionModeHttp- Use FirstSpirit Connection Mode HTTPbFirstSpiritConnectionModeSecure- secure connectionsFirstSpiritUser- UsersFirstSpiritPassword- Password- Returns:
- success state
-
sendConnectorRequest
- Specified by:
sendConnectorRequestin interfaceIRestConnectiorCommunication
-
getLicenseInformation
Description copied from interface:IRestCommunicationGet License Information- Specified by:
getLicenseInformationin interfaceIRestCommunication- Returns:
-
updateLicenseInformation
Description copied from interface:IRestCommunicationUpload new license- Specified by:
updateLicenseInformationin interfaceIRestCommunication- Parameters:
sLicenseData-- Returns:
-
downloadTemporaryFolderList
Description copied from interface:IRestCommunicationDownload all temp folders- Specified by:
downloadTemporaryFolderListin interfaceIRestCommunication- Returns:
-
downloadTemporaryFolder
Description copied from interface:IRestCommunicationDownload specific folder as zip- Specified by:
downloadTemporaryFolderin interfaceIRestCommunication- Parameters:
sName- Folder name- Returns:
-
countTranslatedXmlFiles
Description copied from interface:IRestCommunicationCount the number of XMLs files- Specified by:
countTranslatedXmlFilesin interfaceIRestCommunication- Returns:
-
downloadTranslatedXmlFolder
Description copied from interface:IRestCommunicationDownload specific folder as zip- Specified by:
downloadTranslatedXmlFolderin interfaceIRestCommunication- Parameters:
bSuccessXmls- Success-Folder (or failed otherwise)- Returns:
-
clearTranslatedXmlFolder
Description copied from interface:IRestCommunicationClear XML files in either success or failed folder- Specified by:
clearTranslatedXmlFolderin interfaceIRestCommunication- Parameters:
bSuccessXmls- Success-Folder (or failed otherwise)- Returns:
-
requestServerStatusInformation
- Specified by:
requestServerStatusInformationin interfaceIRestCommunication
-
exportDatabaseTable
- Specified by:
exportDatabaseTablein interfaceIRestCommunication
-
importDatabaseTable
- Specified by:
importDatabaseTablein interfaceIRestCommunication
-
queryTranslationStatusReport
public IRestResponse queryTranslationStatusReport(Map<String, String> pParams, String sLocalTimezoneId) - Specified by:
queryTranslationStatusReportin interfaceIRestCommunication
-
translateMedia
- Specified by:
translateMediain interfaceIRestCommunication
-
getStartupLicenseData
- Specified by:
getStartupLicenseDatain interfaceIRestCommunication
-
downloadXmlsTranslatable
Description copied from interface:IRestCommunicationDownload specific folder as zip- Specified by:
downloadXmlsTranslatablein interfaceIRestCommunication- Returns:
-
clearXmlsTranslatable
Description copied from interface:IRestCommunicationDownload specific folder as zip- Specified by:
clearXmlsTranslatablein interfaceIRestCommunication- Returns:
-
downloadXmlsImportQueue
Description copied from interface:IRestCommunicationDownload specific folder as zip- Specified by:
downloadXmlsImportQueuein interfaceIRestCommunication- Returns:
-
clearTranslatedXmlFolderUpTo30days
Description copied from interface:IRestCommunicationDownload specific folder as zip- Specified by:
clearTranslatedXmlFolderUpTo30daysin interfaceIRestCommunication- Returns:
-
clearXmlsTranslatables
Description copied from interface:IRestCommunicationDownload specific folder as zip- Specified by:
clearXmlsTranslatablesin interfaceIRestCommunication- Returns:
-
downloadXmlsTempImportExportFolder
- Specified by:
downloadXmlsTempImportExportFolderin interfaceIRestCommunication
-
deleteXmlsTempImportExportFolder
- Specified by:
deleteXmlsTempImportExportFolderin interfaceIRestCommunication
-
downloadXmlsTranslated24h
Description copied from interface:IRestCommunicationDownload specific folder as zip- Specified by:
downloadXmlsTranslated24hin interfaceIRestCommunication- Returns:
-