Package org.compiere.install
Class Translation
- java.lang.Object
-
- org.compiere.install.Translation
-
- All Implemented Interfaces:
org.eclipse.equinox.app.IApplication
public class Translation extends Object implements 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
Fields Modifier and Type Field Description static String
DTD
DTDstatic String
XML_ATTRIBUTE_LANGUAGE
XML Attribute Languagestatic String
XML_ATTRIBUTE_TABLE
XML Attribute Tablestatic String
XML_ROW_ATTRIBUTE_ID
XML Row Attribute IDstatic String
XML_ROW_ATTRIBUTE_TRANSLATED
XML Row Attribute Translatedstatic String
XML_ROW_ATTRIBUTE_UUID
XML Row Attribute UUIDstatic String
XML_ROW_TAG
XML Row Tagstatic String
XML_TAG
XML Element Tagstatic String
XML_TAG2
static String
XML_TAG3
static String
XML_VALUE_ATTRIBUTE_COLUMN
XML Value Columnstatic String
XML_VALUE_ATTRIBUTE_ORIGINAL
XML Value Originalstatic String
XML_VALUE_TAG
XML Value Tag
-
Constructor Summary
Constructors Constructor Description Translation()
Do not use this Constructor in normal calls.Translation(Properties ctx)
Translation
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
exportTrl(String directory, int AD_Client_ID, String AD_Language, String Trl_Table, boolean onlyCentralized)
Import TranslationString
importTrl(String directory, int AD_Client_ID, String AD_Language, String Trl_Table)
Import Translation.static void
main(String[] args)
Batch Interfacevoid
process(String directory, String AD_Language, String mode)
ProcessObject
start(org.eclipse.equinox.app.IApplicationContext context)
Launch method of the OSGi application.void
stop()
String
validateLanguage(String p_AD_Language)
Validate LanguageString
validateLanguage(String AD_Language, String trxName)
Validate Language
-
-
-
Field Detail
-
DTD
public static final String DTD
DTD- See Also:
- Constant Field Values
-
XML_TAG
public static final String XML_TAG
XML Element Tag- See Also:
- Constant Field Values
-
XML_TAG2
public static final String XML_TAG2
- See Also:
- Constant Field Values
-
XML_TAG3
public static final String XML_TAG3
- See Also:
- Constant Field Values
-
XML_ATTRIBUTE_TABLE
public static final String XML_ATTRIBUTE_TABLE
XML Attribute Table- See Also:
- Constant Field Values
-
XML_ATTRIBUTE_LANGUAGE
public static final String XML_ATTRIBUTE_LANGUAGE
XML Attribute Language- See Also:
- Constant Field Values
-
XML_ROW_TAG
public static final String XML_ROW_TAG
XML Row Tag- See Also:
- Constant Field Values
-
XML_ROW_ATTRIBUTE_ID
public static final String XML_ROW_ATTRIBUTE_ID
XML Row Attribute ID- See Also:
- Constant Field Values
-
XML_ROW_ATTRIBUTE_UUID
public static final String XML_ROW_ATTRIBUTE_UUID
XML Row Attribute UUID- See Also:
- Constant Field Values
-
XML_ROW_ATTRIBUTE_TRANSLATED
public static final String XML_ROW_ATTRIBUTE_TRANSLATED
XML Row Attribute Translated- See Also:
- Constant Field Values
-
XML_VALUE_TAG
public static final String XML_VALUE_TAG
XML Value Tag- See Also:
- Constant Field Values
-
XML_VALUE_ATTRIBUTE_COLUMN
public static final String XML_VALUE_ATTRIBUTE_COLUMN
XML Value Column- See Also:
- Constant Field Values
-
XML_VALUE_ATTRIBUTE_ORIGINAL
public static final String XML_VALUE_ATTRIBUTE_ORIGINAL
XML Value Original- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Translation
public Translation(Properties ctx)
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 Detail
-
importTrl
public String importTrl(String directory, int AD_Client_ID, String AD_Language, String Trl_Table)
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
-
exportTrl
public String exportTrl(String directory, int AD_Client_ID, String AD_Language, String Trl_Table, boolean onlyCentralized)
Import Translation- Parameters:
directory
- file directoryAD_Client_ID
- only certain client if id >= 0AD_Language
- languageTrl_Table
- translation table _Trl- Returns:
- status message
-
validateLanguage
public String validateLanguage(String p_AD_Language)
Validate Language. - Check if AD_Language record exists - Check Trl table records- Parameters:
p_AD_Language
- language- Returns:
- "" if validated - or error message
-
validateLanguage
public String validateLanguage(String AD_Language, String trxName)
Validate Language. - Check if AD_Language record exists - Check Trl table records- Parameters:
AD_Language
- languagetrxName
- transaction- Returns:
- "" if validated - or error message
-
process
public void process(String directory, String AD_Language, String mode)
Process- Parameters:
directory
- directoryAD_Language
- languagemode
- mode
-
start
public Object start(org.eclipse.equinox.app.IApplicationContext context) throws Exception
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
-
main
public static void main(String[] args)
Batch Interface- Parameters:
args
- directory AD_Language import/export
-
-