Package org.compiere.install
Class Translation
java.lang.Object
org.compiere.install.Translation
- All Implemented Interfaces:
org.eclipse.equinox.app.IApplication
Translation Table Import + Export
- Version:
- $Id: Translation.java,v 1.3 2006/07/30 00:51:28 jjanke Exp $
- Author:
- Jorg Janke
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
DTDstatic final String
XML Attribute Languagestatic final String
XML Attribute Tablestatic final String
XML Row Attribute IDstatic final String
XML Row Attribute Translatedstatic final String
XML Row Attribute UUIDstatic final String
XML Row Tagstatic final String
XML Element Tagstatic final String
static final String
static final String
XML Value Columnstatic final String
XML Value Originalstatic final String
XML Value TagFields inherited from interface org.eclipse.equinox.app.IApplication
EXIT_OK, EXIT_RELAUNCH, EXIT_RESTART
-
Constructor Summary
ConstructorDescriptionDo not use this Constructor in normal calls.Translation
(Properties ctx) Translation -
Method Summary
Modifier and TypeMethodDescriptionexportTrl
(String directory, int AD_Client_ID, String AD_Language, String Trl_Table, boolean onlyCentralized) Export TranslationImport Translation.Import Translation.void
Processstart
(org.eclipse.equinox.app.IApplicationContext context) Launch method of the OSGi application.void
stop()
validateLanguage
(String p_AD_Language) Validate LanguagevalidateLanguage
(String AD_Language, String trxName) Validate Language
-
Field Details
-
DTD
DTD- See Also:
-
XML_TAG
XML Element Tag- See Also:
-
XML_TAG2
- See Also:
-
XML_TAG3
- See Also:
-
XML_ATTRIBUTE_TABLE
XML Attribute Table- See Also:
-
XML_ATTRIBUTE_LANGUAGE
XML Attribute Language- See Also:
-
XML_ROW_TAG
XML Row Tag- See Also:
-
XML_ROW_ATTRIBUTE_ID
XML Row Attribute ID- See Also:
-
XML_ROW_ATTRIBUTE_UUID
XML Row Attribute UUID- See Also:
-
XML_ROW_ATTRIBUTE_TRANSLATED
XML Row Attribute Translated- See Also:
-
XML_VALUE_TAG
XML Value Tag- See Also:
-
XML_VALUE_ATTRIBUTE_COLUMN
XML Value Column- See Also:
-
XML_VALUE_ATTRIBUTE_ORIGINAL
XML Value Original- See Also:
-
-
Constructor Details
-
Translation
Translation- Parameters:
ctx
- context
-
Translation
public Translation()Do not use this Constructor in normal calls. It is used e.g. by the headless call for an only-translation batch script call. author tbayen - IDEMPIERE-1554
-
-
Method Details
-
importTrl
Import Translation. Uses TranslationHandler to update translation- Parameters:
directory
- file directoryAD_Client_ID
- only certain client if id >= 0AD_Language
- languageTrl_Table
- table- Returns:
- status message
-
importTrl
public String importTrl(String directory, int AD_Client_ID, String AD_Language, String Trl_Table, String trxName) Import Translation. Uses TranslationHandler to update translation- Parameters:
directory
- file directoryAD_Client_ID
- only certain client if id >= 0AD_Language
- languageTrl_Table
- tabletrxName
- Transaction- Returns:
- status message
-
exportTrl
public String exportTrl(String directory, int AD_Client_ID, String AD_Language, String Trl_Table, boolean onlyCentralized) Export Translation- Parameters:
directory
- file directoryAD_Client_ID
- only certain client if id >= 0AD_Language
- languageTrl_Table
- translation table _TrlonlyCentralized
-- Returns:
- status message
-
validateLanguage
Validate Language. - Check if AD_Language record exists - Check Trl table records
- Parameters:
p_AD_Language
- language- Returns:
- "" if validated - or error message
-
validateLanguage
Validate Language. - Check if AD_Language record exists - Check Trl table records
- Parameters:
AD_Language
- languagetrxName
- transaction- Returns:
- "" if validated - or error message
-
process
Process- Parameters:
directory
- directoryAD_Language
- languagemode
- mode
-
start
Launch method of the OSGi application. In pre-OSGi times commandline launching was done by a run of the main() method ofTranslation
. This is the OSGized launch method. This class has to be mentioned in META-INF/MANIFEST.MF as an "org.eclipse.core.runtime.applications" extension. Because of that it can be called from the commandline. You should take care that the org.eclipse.equinox.event bundle is active if you run this to send events in the case something goes wrong (like a missing file etc.)- Specified by:
start
in interfaceorg.eclipse.equinox.app.IApplication
- Throws:
Exception
-
stop
public void stop()- Specified by:
stop
in interfaceorg.eclipse.equinox.app.IApplication
-