Package wt.ixb.publicforapps
Class IxbHelper
java.lang.Object
wt.facade.ixb.IxbCommonHelper
wt.ixb.publicforapps.IxbHelper
public class IxbHelper
extends wt.facade.ixb.IxbCommonHelper
This class contents several static methods that can be used in export/import application.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanBeHandledByExternal(IxbDocument element) check if the element can be handled by other external implementations
Supported API: truestatic StringgetDTDFromExtenal(IxbDocument element) get DTD from external implements
Supported API: truestatic booleancheck if the type should be use JAXB to do export/import
Supported API: truestatic ExporternewExporter(ApplicationExportHandler appExpHandler, WTContainerRef container, String targetDtd, File localMappingRuleFile, File policyRuleFile, String actionName) Creates the instance of theExporterclass.static ExporternewExporter(ApplicationExportHandler appExpHandler, WTContainerRef container, String targetDtd, IxbElement localMappingRules) Creates the instance of theExporterclass.static ExporternewExporter(ApplicationExportHandler appExpHandler, WTContainerRef container, String targetDtd, IxbElement localMappingRules, File policyRuleFile, String actionName) Creates the instance of theExporterclass.static ImporternewImporter(ApplicationImportHandler applicationImportHandler, String dtd, IxbElement localMappingRules, Boolean overrideConflicts, Boolean validate) Deprecated.static ImporternewImporter(ApplicationImportHandler appImpHandler, WTContainerRef targetContainer, String dtd, String ruleFileName, String policyFileName, String containerMappingFileName, String actorName, Boolean overrideConflicts, Boolean validate) Creates the instance of the Importer class.static ImporternewImporter(ApplicationImportHandler appImpHandler, WTContainerRef targetContainer, String dtd, String ruleFileName, String policyFileName, String containerMappingFileName, String actorName, Boolean overrideConflicts, Boolean validate, Boolean isLightPreview) Creates the instance of the Importer class.static ImporternewImporter(ApplicationImportHandler appImpHandler, WTContainerRef targetContainer, String dtd, IxbElement localMappingRules, Boolean overrideConflicts, Boolean validate) Creates the instance of the Importer class.static ImporternewImporter(ApplicationImportHandler appImpHandler, WTContainerRef targetContainer, String dtd, IxbElement localMappingRules, Boolean overrideConflicts, Boolean validate, Boolean conflictResolution) Creates the instance of the Importer class.static IxbDocumentCreates the instance of theIxbDocumentclass.static IxbDocumentnewIxbDocument(InputStream xmlFile, boolean validate) Creates the instance of theIxbDocumentclass and initializes it with the content of XML file, given as an InputStream parameter.static IxbDocumentnewIxbDocument(InputStream xmlFile, boolean validate, boolean ignoreDTDMismatch) Creates the instance of theIxbDocumentclass and initializes it with the content of XML file, given as an InputStream parameter.static IxbDocumentnewIxbDocument(Element domXmlFile) Creates the instance of theIxbDocumentclass and initializes it with the content of XML file, given as anElementparameter.static IxbDocumentnewIxbDocument(ExportImportFormatType type, String fileName, InputStream xmlFile, boolean validate, boolean isMultiple, Map<String, Object> table, boolean ignoreDTDMismatch) Creates the instance of theIxbDocumentclass and initializes it with the content of XML file, given as an InputStream parameter.static IxbDocumentnewIxbDocument(Exporter exporter, String tagName) Creates the instance of theIxbDocumentclass and initializes it with tagName and ApplicationExportHandler.
-
Method Details
-
newExporter
public static Exporter newExporter(ApplicationExportHandler appExpHandler, WTContainerRef container, String targetDtd, IxbElement localMappingRules) throws WTException Creates the instance of theExporterclass. This instance should be used as a context for the export process.
Supported API: true- Parameters:
appExpHandler-container- The context container that this Exporter instance is launched.targetDtd- specifies the language used by XML documents to be exported.localMappingRules- XML document with export mapping rules andWTPropertiesentries, which will override the properties set in server context for this export session.- Returns:
- Exporter
- Throws:
WTException
-
newExporter
public static Exporter newExporter(ApplicationExportHandler appExpHandler, WTContainerRef container, String targetDtd, IxbElement localMappingRules, File policyRuleFile, String actionName) throws WTException Creates the instance of theExporterclass. This instance should be used as a context for the export process.
Supported API: true- Parameters:
appExpHandler-container- The context container that this Exporter instance is launched.targetDtd- specifies the language used by XML documents to be exported.localMappingRules- XML document with export mapping rules andWTPropertiesentries, which will override the properties set in server context for this export session.policyRuleFile- XSL document with export policy and mapping rulesactionName- The action name for export. If this value is null, no action will be applied during export for all objects.- Returns:
- Exporter
- Throws:
WTException
-
newExporter
public static Exporter newExporter(ApplicationExportHandler appExpHandler, WTContainerRef container, String targetDtd, File localMappingRuleFile, File policyRuleFile, String actionName) throws WTException Creates the instance of theExporterclass. This instance should be used as a context for the export process.
Supported API: true- Parameters:
appExpHandler-container- The context container that this Exporter instance is launched.targetDtd- specifies the language used by XML documents to be exported.localMappingRuleFile- XML document with export mapping rules andWTPropertiesentries, which will override the properties set in server context for this export session.policyRuleFile- XSL document with export policy and mapping rulesactionName- The action name for export. If this value is null, no action will be applied during export for all objects.- Returns:
- Exporter
- Throws:
WTException
-
newImporter
public static Importer newImporter(ApplicationImportHandler appImpHandler, WTContainerRef targetContainer, String dtd, IxbElement localMappingRules, Boolean overrideConflicts, Boolean validate) throws WTException Creates the instance of the Importer class. This instance should be used as a context for the import process.
Supported API: true- Parameters:
appImpHandler-targetContainer- The context container that this importer instance is launched.dtd- specifies the language used by imported XML documentlocalMappingRules- XML document with import mapping rules andWTPropertiesentries, which will override the properties set in server context for this import session..overrideConflicts- specifies, whether import will be done if overridable conflicts were detected. This parameter can be null; in this case the value from property wt.ixb.import.overrideConflicts will be used.validate- specifies, whether used validating XML parser. This parameter can be null; in this case the value from property wt.ixb.import.validate will be used.- Returns:
- Importer
- Throws:
WTException
-
newImporter
public static Importer newImporter(ApplicationImportHandler appImpHandler, WTContainerRef targetContainer, String dtd, String ruleFileName, String policyFileName, String containerMappingFileName, String actorName, Boolean overrideConflicts, Boolean validate) throws WTException Creates the instance of the Importer class. This instance should be used as a context for the import process.
Supported API: true- Parameters:
appImpHandler-targetContainer- The context container that this importer instance is launched.dtd- specifies the language used by imported XML documentruleFileName- XML document with import mapping rules andWTPropertiesentries, which will override the properties set in server context for this import session..policyFileName- XSL document with import mapping rulescontainerMappingFileName- Container mapping rule file in XML format.actorName- Name of the action. If the value is null, the default action will be applied.overrideConflicts- specifies, whether import will be done if overridable conflicts were detected. This parameter can be null; in this case the value from property wt.ixb.import.overrideConflicts will be used.validate- specifies, whether used validating XML parser. This parameter can be null; in this case the value from property wt.ixb.import.validate will be used.- Returns:
- Importer
- Throws:
WTException
-
newImporter
public static Importer newImporter(ApplicationImportHandler appImpHandler, WTContainerRef targetContainer, String dtd, String ruleFileName, String policyFileName, String containerMappingFileName, String actorName, Boolean overrideConflicts, Boolean validate, Boolean isLightPreview) throws WTException Creates the instance of the Importer class. This instance should be used as a context for the import process.
Supported API: true- Parameters:
appImpHandler-targetContainer- The context container that this importer instance is launched.dtd- specifies the language used by imported XML documentruleFileName- XML document with import mapping rules andWTPropertiesentries, which will override the properties set in server context for this import session..policyFileName- XSL document with import mapping rulescontainerMappingFileName- Container mapping rule file in XML format.actorName- Name of the action. If the value is null, the default action will be applied.overrideConflicts- specifies, whether import will be done if overridable conflicts were detected. This parameter can be null; in this case the value from property wt.ixb.import.overrideConflicts will be used.validate- specifies, whether used validating XML parser. This parameter can be null; in this case the value from property wt.ixb.import.validate will be used.isLightPreview- specifies if this is called while doing a light preview.- Returns:
- Importer
- Throws:
WTException
-
newImporter
public static Importer newImporter(ApplicationImportHandler appImpHandler, WTContainerRef targetContainer, String dtd, IxbElement localMappingRules, Boolean overrideConflicts, Boolean validate, Boolean conflictResolution) throws WTException Creates the instance of the Importer class. This instance should be used as a context for the import process
Supported API: true- Parameters:
appImpHandler-targetContainer- The context container that this importer instance is launched.dtd- specifies the language used by imported XML documentlocalMappingRules- XML document with import mapping rules andWTPropertiesentries, which will override the properties set in server context for this import session..overrideConflicts- specifies, whether import will be done if overridable conflicts were detected. This parameter can be null; in this case the value from property wt.ixb.import.overrideConflicts will be used.validate- specifies, whether used validating XML parser. This parameter can be null; in this case the value from property wt.ixb.import.validate will be used.conflictResolution-- Returns:
- Importer
- Throws:
WTException
-
newIxbDocument
- Returns:
- IxbDocument
- Throws:
WTException
-
newIxbDocument
Creates the instance of theIxbDocumentclass and initializes it with the content of XML file, given as an InputStream parameter.
Supported API: true- Parameters:
xmlFile-validate-- Returns:
- IxbDocument
- Throws:
WTException
-
newIxbDocument
public static IxbDocument newIxbDocument(InputStream xmlFile, boolean validate, boolean ignoreDTDMismatch) throws WTException Creates the instance of theIxbDocumentclass and initializes it with the content of XML file, given as an InputStream parameter.
Supported API: true- Parameters:
xmlFile-validate-ignoreDTDMismatch-- Returns:
- IxbDocument
- Throws:
WTException
-
newIxbDocument
Creates the instance of theIxbDocumentclass and initializes it with the content of XML file, given as anElementparameter.
Supported API: true- Parameters:
domXmlFile-- Returns:
- IxbDocument
- Throws:
WTException
-
newIxbDocument
Creates the instance of theIxbDocumentclass and initializes it with tagName and ApplicationExportHandler.
Supported API: true- Parameters:
exporter-tagName- root tag name for the WTObject- Returns:
- IxbDocument
- Throws:
WTException
-
newIxbDocument
public static IxbDocument newIxbDocument(ExportImportFormatType type, String fileName, InputStream xmlFile, boolean validate, boolean isMultiple, Map<String, Object> table, boolean ignoreDTDMismatch) throws WTExceptionCreates the instance of theIxbDocumentclass and initializes it with the content of XML file, given as an InputStream parameter.
Supported API: true- Parameters:
type- ExportImportFormatTypefileName- the file name or object id in the importList.txtxmlFile- the inputstream which need to be parsedvalidate- if to validate the inputstream during parseisMultiple- if there are more than one objects in this inputstreamtable- the table which stores all the parsed JAXB object, the key is the id of objectignoreDTDMismatch-- Returns:
- IxbDocument
- Throws:
WTException
-
needUseJAXB
check if the type should be use JAXB to do export/import
Supported API: true- Parameters:
type-- Returns:
- boolean
-
canBeHandledByExternal
check if the element can be handled by other external implementations
Supported API: true- Parameters:
element-- Returns:
- boolean
-
getDTDFromExtenal
get DTD from external implements
Supported API: true- Parameters:
element-- Returns:
- sysId
-
newImporter
@Deprecated public static Importer newImporter(ApplicationImportHandler applicationImportHandler, String dtd, IxbElement localMappingRules, Boolean overrideConflicts, Boolean validate) throws WTException Deprecated.use newImporter(ApplicationImportHandler handler, WTContainerRef targetContainer, String dtd, IxbElement mapRules, Boolean overrideConflicts, Boolean validate) instead
Supported API: trueCreates the instance of the Importer class. This instance should be used as a context for the import process- Parameters:
applicationImportHandler- application handlerdtd- specifies the language used by imported XML documentlocalMappingRules- XML document with import mapping rules. Can benulloverrideConflicts- specifies, whether import will be done if overridable conflicts were detected. This parameter can be null; in this case the value from property wt.ixb.import.overrideConflicts will be used.validate- specifies, whether used validating XML parser. This parameter can be null; in this case the value from property wt.ixb.import.validate will be used.- Returns:
- Throws:
WTException
-
Supported API: true