Class TranslatableFile
java.lang.Object
com.idmedia.translationstudio.api.connector.TranslatableFile
- All Implemented Interfaces:
ITranslatableFile,ITranslatableFileIdProvider,ITranslatableFileXliff,ITranslatableXmlFile
- Author:
- Phillip Austerfield
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdditionalFile(String sFile) Add a preview filevoidaddCustomMessage(@NotNull org.json.simple.JSONObject pJson) voidaddDisplayName(@Nullable String sDisplayName) voidaddPageId(long lId) voidaddPreviewFile(@Nullable List<String> vsList) Add preview filesvoidaddRequestUid(@NotNull String sUid) @NotNull StringconcatinageDisplayNames(int nMaxLength) Get the display names of the CMS file(s) included in this XML filestatic @Nullable ITranslatableFilefromJson(@NotNull org.json.simple.JSONObject pJson) Create from XMLstatic @Nullable ITranslatableFileCreate from XMLGet list of additional fileslong@NotNull StringGet the CMS project name (if available)Get a list of custom field maps.@NotNull List<org.json.simple.JSONObject> Get the values of the custom fields associated with the files in this translatable file@Nullable DateGet DeadlineGet the display names of the CMS file(s) included in this XML file@NotNull StringGet the full qualified Path (Path + Name + postfix) of the local file.@NotNull StringReturns the target language (initialized in constructor) e.g de_de, fr_fr ...longgetJobId()Get associated job idGet List of preview files associated to the data in the translatable file@NotNull StringGet the TMS Project ID where the file should be associated withGet the requester's id@NotNull StringReturns the initial language (initialized in constructor) e.g de_de, fr_fr ...@NotNull StringReturns the initial language (initialized in constructor) e.g de_de, fr_fr ...Deprecated.booleanAre preview files available in this package.booleanhasXliff()booleanIndicates that this is an urgent translationvoidsetCmsProjecctName(@Nullable String sVal) voidsetCmsProjectId(long lCmsProjectId) voidsetDeadline(Date deadline) voidsetIsUrgend(boolean bIsUrgent) voidsetJobId(long lJobId) voidsetProjectId(String sProjectId) voidsetSourceLanguage(String sLang) voidsetTargetLanguage(String sLang) voidsetXliffFile(@Nullable File pFile) @NotNull org.json.simple.JSONObjecttoJson()Store itself as JSON
-
Constructor Details
-
TranslatableFile
-
-
Method Details
-
addPreviewFile
Add preview files- Parameters:
vsList- List of files
-
addAdditionalFile
Add a preview file- Specified by:
addAdditionalFilein interfaceITranslatableFile- Parameters:
sFile- File
-
getFullQualifiedFilePath
Get the full qualified Path (Path + Name + postfix) of the local file.- Specified by:
getFullQualifiedFilePathin interfaceITranslatableXmlFile- Returns:
- File Uri
-
getPreviewFiles
Get List of preview files associated to the data in the translatable file- Specified by:
getPreviewFilesin interfaceITranslatableXmlFile- Returns:
- preview file list, never
null
-
getInitialLanguage
Returns the target language (initialized in constructor) e.g de_de, fr_fr ...- Specified by:
getInitialLanguagein interfaceITranslatableFile- Returns:
- Language Code
-
getTargetLanguage
Returns the initial language (initialized in constructor) e.g de_de, fr_fr ...- Specified by:
getTargetLanguagein interfaceITranslatableXmlFile- Returns:
- Language Code
-
getProjectId
Get the TMS Project ID where the file should be associated with- Specified by:
getProjectIdin interfaceITranslatableXmlFile- Returns:
- Id or
null
-
setProjectId
-
setTargetLanguage
-
setSourceLanguage
-
setJobId
public void setJobId(long lJobId) -
setDeadline
-
getJobId
public long getJobId()Get associated job id- Specified by:
getJobIdin interfaceITranslatableFile- Returns:
-
getDeadline
Get Deadline- Specified by:
getDeadlinein interfaceITranslatableXmlFile- Returns:
- deadline, may be
null
-
getCustomFieldValues
Get the values of the custom fields associated with the files in this translatable file- Specified by:
getCustomFieldValuesin interfaceITranslatableFile- Returns:
- List, never
null
-
getAdditionalFiles
Get list of additional files- Specified by:
getAdditionalFilesin interfaceITranslatableXmlFile- Returns:
- List, never
null
-
getSourceLanguage
Returns the initial language (initialized in constructor) e.g de_de, fr_fr ...- Specified by:
getSourceLanguagein interfaceITranslatableXmlFile- Returns:
- Language Code
-
toJson
@NotNull public @NotNull org.json.simple.JSONObject toJson()Store itself as JSON- Specified by:
toJsonin interfaceITranslatableFile
-
fromJson
@Nullable public static @Nullable ITranslatableFile fromJson(@NotNull @NotNull org.json.simple.JSONObject pJson) Create from XML- Parameters:
pJson-- Returns:
- Element or
nullon error
-
fromJson
@Nullable public static @Nullable ITranslatableFile fromJson(@NotNull @NotNull org.json.simple.JSONObject pJson, @NotNull @NotNull String sXmlFile) Create from XML- Parameters:
pJson-sXmlFile-- Returns:
- Element or
nullon error
-
hasPreviewFiles
public boolean hasPreviewFiles()Are preview files available in this package.- Specified by:
hasPreviewFilesin interfaceITranslatableFile- Returns:
-
getCustomFields
Get a list of custom field maps. Each FirstSpirit FORM field represents a single entry in the map- Specified by:
getCustomFieldsin interfaceITranslatableFile- Returns:
-
getCmsProjectId
public long getCmsProjectId()- Specified by:
getCmsProjectIdin interfaceITranslatableFile
-
setCmsProjectId
public void setCmsProjectId(long lCmsProjectId) -
setCmsProjecctName
-
getDisplayNames
Get the display names of the CMS file(s) included in this XML file- Specified by:
getDisplayNamesin interfaceITranslatableFile- Returns:
-
addDisplayName
-
addPageId
public void addPageId(long lId) -
concatinageDisplayNames
Get the display names of the CMS file(s) included in this XML file- Specified by:
concatinageDisplayNamesin interfaceITranslatableFile- Parameters:
nMaxLength-- Returns:
-
getTickets
Deprecated.- Specified by:
getTicketsin interfaceITranslatableFile
-
setIsUrgend
public void setIsUrgend(boolean bIsUrgent) -
isUrgendTranslation
public boolean isUrgendTranslation()Indicates that this is an urgent translation- Specified by:
isUrgendTranslationin interfaceITranslatableFile- Returns:
-
getRequestUids
- Specified by:
getRequestUidsin interfaceITranslatableFile
-
addRequestUid
-
getRequesterUsers
Get the requester's id- Specified by:
getRequesterUsersin interfaceITranslatableFile- Returns:
- List
-
addCustomMessage
public void addCustomMessage(@NotNull @NotNull org.json.simple.JSONObject pJson) -
getCmsProjectName
Description copied from interface:ITranslatableFileGet the CMS project name (if available)- Specified by:
getCmsProjectNamein interfaceITranslatableFile- Returns:
-
getCmsPageIds
- Specified by:
getCmsPageIdsin interfaceITranslatableFileIdProvider
-
hasXliff
public boolean hasXliff()- Specified by:
hasXliffin interfaceITranslatableFileXliff
-
setXliffFile
- Specified by:
setXliffFilein interfaceITranslatableFileXliff
-
getXliffFile
- Specified by:
getXliffFilein interfaceITranslatableFileXliff
-