IDocLibraryMigrationGuide 10 30 PDF
IDocLibraryMigrationGuide 10 30 PDF
IDocLibraryMigrationGuide 10 30 PDF
2008
HELP.BCMIDCONF
Copyright
Copyright 2008 SAP AG. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the
express permission of SAP AG. The information contained herein may be changed without prior
notice.
Some software products marketed by SAP AG and its distributors contain proprietary software
components of other software vendors.
Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390,
OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli,
Informix, i5/OS, POWER, POWER5, OpenPower and PowerPC are trademarks or registered
trademarks of IBM Corporation.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered
trademarks of Adobe Systems Incorporated in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are
trademarks or registered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web
Consortium, Massachusetts Institute of Technology.
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology
invented and implemented by Netscape.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services
mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP
AG in Germany and in several other countries all over the world. All other product and service names
mentioned are the trademarks of their respective companies. Data contained in this document serves
informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and
its affiliated companies ("SAP Group") for informational purposes only, without representation or
warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the
materials. The only warranties for SAP Group products and services are those that are set forth in the
express warranty statements accompanying such products and services, if any. Nothing herein should
be construed as constituting an additional warranty.
Contents
Introduction............................................................................................................................................ 4
Class IDoc........................................................................................................................................ 4
Interface IDoc.Document ................................................................................................................. 4
Interface IDoc.DocumentList............................................................................................................ 4
Class IDoc.DocumentIterator........................................................................................................... 6
Interface IDoc.Record ...................................................................................................................... 6
Interface IDoc.Segment ................................................................................................................... 7
Class IDoc.SegmentIterator........................................................................................................... 10
Class IDoc.Exception..................................................................................................................... 11
Class IDoc.NestedException ......................................................................................................... 12
Interface IDoc.Repository .............................................................................................................. 12
Class IDoc.SegmentMetaData....................................................................................................... 14
Interface IDoc.RecordMetaData and IDoc.FieldMetaData ............................................................ 15
Classes IDoc.BasicDocumentList and IDoc.BasicRepository ....................................................... 17
Additional changes......................................................................................................................... 17
Introduction
This document is designed to provide detailed information on the code migration from IDoc Library
release 1.0 to 3.0. It describes the required migration activities for each class. Critical changes are
marked in red font color.
Most of the changes require only renaming of classes: some classes which have been previously
implemented as inner classes of Idoc and JcoIDoc now are independent classes (e.g.
Idoc.Segment has been changed to IdocSegment).
Class IDoc
This class does not exist anymore in 3.0. The class has been only a closure around the other inner
classes and interfaces and is not needed anymore. Since it was not possible to create any instances
of this abstract class, no migration activity is required.
Interface IDoc.Document
Renamed to IDocDocument.
The return value of getRootSegment was changed from IDoc.Segment to IDocSegment.
The following methods have been deleted from the interface definition:
java.lang.String toXML()
java.lang.String toXML(java.lang.String release)
void writeXML(java.io.OutputStreamWriter writer)
void writeXML(java.lang.String filename)
void writeXML(java.lang.String filename, java.lang.String charEncoding)
void writeXML(java.io.Writer writer)
Interface IDoc.DocumentList
Renamed to IDocDocumentList.
Old New
java.lang.String iDocTypeExtension
, java.lang.String systemRelease,
java.lang.String applicationReleas
e)
java.lang.String
getApplicationRelease()
java.lang.String getIDocType()
java.lang.String
getIDocTypeExtension()
IDoc.Document IDocDocument
getPrevious(IDoc.Document document getPrevious(IDocDocument document)
)
int int
lastIndexOf(IDoc.Document document lastIndexOf(IDocDocument document)
)
boolean boolean
remove(IDoc.Document document) remove(IDocDocument document)
writeXML(java.io.Writer writer)
Class IDoc.DocumentIterator
Renamed to IDocDocumentIterator.
Old New
Interface IDoc.Record
Renamed to IDocRecord.
Old New
IDoc.RecordMetaData IDocRecordMetaData
getRecordMetaData() getRecordMetaData()
Interface IDoc.Segment
Renamed to IDocSegment.
Old New
IDoc.Segment IDocSegment
addChild(java.lang.String segmentTyp addChild(java.lang.String segm
e) entType)
IDoc.egment IDocSegment
addChild(java.lang.String segmentTyp addChild(java.lang.String segm
e, boolean subsequent) entType, boolean subsequent)
IDoc.Segment IDocSegment
addSibling(boolean subsequent) addSibling(boolean subsequent)
IDoc.Segment IDocSegment
addSibling(java.lang.String segmentT addSibling(java.lang.String se
ype) gmentType)
IDoc.Segment IDocSegment
addSibling(java.lang.String segmentT addSibling(java.lang.String se
ype, boolean subsequent) gmentType, boolean subsequent)
IDoc.egment[] IDocSegment[]
IDoc.SegmentIterator IDocSegmentIterator
getChildrenIterator() getChildrenIterator()
IDoc.SegmentIterator IDocSegmentIterator
getChildrenIterator(java.lang.String getChildrenIterator(java.lang.
segmentType) String segmentType)
IDoc.SegmentIterator IDocSegmentIterator
getDescendantsIterator() getDescendantsIterator()
IDoc.Segment IDocSegment
getFirstChild(java.lang.String segme getFirstChild(java.lang.String
ntType) segmentType)
IDoc.Segment IDocSegment
getFirstChild(java.lang.String segme getFirstChild(java.lang.String
ntType, int fieldIndex, segmentType, int fieldIndex,
java.lang.String fieldValue) java.lang.String fieldValue)
IDoc.Segment IDocSegment
getFirstChild(java.lang.String segme getFirstChild(java.lang.String
ntType, int fieldIndex, segmentType, int fieldIndex,
java.lang.String fieldValue) java.lang.String fieldValue)
IDoc.Segment IDocSegment
getFirstChild(java.lang.String segme getFirstChild(java.lang.String
ntType, java.lang.String fieldName, segmentType,
java.lang.String fieldValue) java.lang.String fieldName,
java.lang.String fieldValue)
IDoc.Segment IDocSegment
getFirstDescendant(java.lang.String getFirstDescendant(java.lang.S
segmentType) tring segmentType)
IDoc.Segment IDocSegment
getFirstDescendant(java.lang.String getFirstDescendant(java.lang.S
segmentType, int fieldIndex, tring segmentType,
java.lang.String fieldValue) int fieldIndex,
java.lang.String fieldValue)
IDoc.Segment IDocSegment
getFirstDescendant(java.lang.String getFirstDescendant(java.lang.S
segmentType, tring segmentType,
java.lang.String fieldName, java.lang.String fieldName,
java.lang.String fieldValue) java.lang.String fieldValue)
IDoc.Segment IDocSegment
getLastChild(java.lang.String segmen getLastChild(java.lang.String
tType) segmentType)
IDoc.Segment IDocSegment
getLastChild(java.lang.String segmen getLastChild(java.lang.String
tType, int fieldIndex, IDoc.Segment segmentType, int fieldIndex,
java.lang.String fieldValue) java.lang.String fieldValue)
IDocSegment IDocSegment
getLastChild(java.lang.String segmen getLastChild(java.lang.String
tType, java.lang.String fieldName, segmentType,
java.lang.String fieldValue) java.lang.String fieldName,
java.lang.String fieldValue)
IDoc.Segment IDocSegment
getNext(java.lang.String segmentType getNext(java.lang.String segme
) ntType)
IDoc.Segment IDocSegment
getNext(java.lang.String segmentType getNext(java.lang.String segme
, int fieldIndex, ntType, int fieldIndex,
java.lang.String fieldValue) java.lang.String fieldValue)
IDoc.Segment IDocSegment
getNext(java.lang.String segmentType getNext(java.lang.String segme
, java.lang.String fieldName, ntType,
java.lang.String fieldValue) java.lang.String fieldName,
java.lang.String fieldValue)
IDoc.Segment IDocSegment
getNextDescendant(java.lang.String s getNextDescendant(java.lang.St
egmentType) ring segmentType)
IDoc.Segment IDocSegment
getNextDescendant(java.lang.String s getNextDescendant(java.lang.St
egmentType, int fieldIndex, ring segmentType,
java.lang.String fieldValue) int fieldIndex,
java.lang.String fieldValue)
IDoc.Segment IDocSegment
getNextDescendant(java.lang.String s getNextDescendant(java.lang.St
egmentType, ring segmentType,
java.lang.String fieldName, java.lang.String fieldName,
java.lang.String fieldValue) java.lang.String fieldValue)
IDoc.Segment IDocSegment
getNextSibling(java.lang.String segm getNextSibling(java.lang.Strin
entType) g segmentType)
IDoc.Segment IDocSegment
getNextSibling(java.lang.String segm getNextSibling(java.lang.Strin
entType, int fieldIndex, g segmentType, int fieldIndex,
java.lang.String fieldValue) java.lang.String fieldValue)
IDoc.Segment IDocSegment
getNextSibling(java.lang.String segm getNextSibling(java.lang.Strin
entType, java.lang.String fieldName, g segmentType,
java.lang.String fieldValue) java.lang.String fieldName,
java.lang.String fieldValue)
IDoc.Segment IDocSegment
getPrevious(java.lang.String segment getPrevious(java.lang.String s
Type) egmentType)
IDoc.Segment IDocSegment
getPrevious(java.lang.String segment getPrevious(java.lang.String s
Type, int fieldIndex, egmentType, int fieldIndex,
java.lang.String fieldValue) java.lang.String fieldValue)
IDoc.Segment IDocSegment
getPrevious(java.lang.String segment getPrevious(java.lang.String s
Type, java.lang.String fieldName, egmentType,
java.lang.String fieldValue) java.lang.String fieldName,
java.lang.String fieldValue)
IDoc.Segment IDocSegment
getPreviousSibling(java.lang.String getPreviousSibling(java.lang.S
segmentType) tring segmentType)
IDoc.Segment IDocSegment
getPreviousSibling(java.lang.String getPreviousSibling(java.lang.S
segmentType, int fieldIndex, tring segmentType,
java.lang.String fieldValue) int fieldIndex,
java.lang.String fieldValue)
IDoc.Segment IDocSegment
getPreviousSibling(java.lang.String getPreviousSibling(java.lang.S
segmentType, tring segmentType,
java.lang.String fieldName, java.lang.String fieldName,
java.lang.String fieldValue) java.lang.String fieldValue)
IDoc.SegmentMetaData IDocSegmentMetaData
getSegmentMetaData() getSegmentMetaData()
boolean boolean
removeChild(IDoc.Segment child) removeChild(IDocSegment child)
Class IDoc.SegmentIterator
Renamed to IDocSegmentIterator.
Old New
Class IDoc.Exception
Renamed to IDocException.
o IDocElementException
o IDocFieldNotFoundException
o IDocIllegalTypeException
o IDocMetaDataUnavailableException
o IDocParseException
o IDocRuntimeException
o IDocSyntaxException
Constants
Old New
IDOC_ERROR_FIELD_CONVERSION IDOC_ERROR_FIELD_CONVERSION
IDOC_ERROR_ILLEGAL_TYPE IDOC_ERROR_ILLEGAL_TYPE
IDOC_ERROR_INITIALIZATION IDOC_ERROR_INITIALIZATION
IDOC_ERROR_INTERNAL Removed
IDOC_ERROR_IO_OPERATION Removed
IDOC_ERROR_METADATA_UNAVAILABLE IDOC_ERROR_METADATA_UNAVAILABLE
IDOC_ERROR_RECORD_OPERATION Removed
IDOC_ERROR_SYNTAX IDOC_ERROR_SYNTAX
IDOC_ERROR_UNSUPPORTED_OPERATION IDOC_ERROR_UNSUPPORTED_OPERATION
Methods
Old New
java.lang.String
getLocalizedMessage()
java.lang.String getMessage()
Class IDoc.NestedException
Removed. Not needed any more because it is part of Java 1.5 built-in functionality -> replace by
IDocException.
Interface IDoc.Repository
Renamed to IDocRepository.
Old New
Void Removed
addSegmentMetaDataToCache(IDoc.Segme
ntMetaData segmentMetaData)
void
addSegmentMetaDataTreeToCache(IDoc.S
egmentMetaData segmentMetaData)
IDoc.SegmentMetaData IDocSegmentMetaData
getRootSegmentMetaData(java.lang.Str getRootSegmentMetaData(java.lan
ing iDocType, g.String iDocType,
java.lang.String iDocTypeExtension, java.lang.String iDocTypeExtens
java.lang.String systemRelease, ion,
java.lang.String applicationRelease) java.lang.String systemRelease,
java.lang.String applicationRel
ease)
IDoc.SegmentMetaData Removed
getRootSegmentMetaData(java.lang.Str
ing iDocType,
java.lang.String iDocTypeExtension,
java.lang.String systemRelease,
java.lang.String applicationRelease,
java.util.Vector queriedRepositories
)
IDoc.SegmentMetaData IDocSegmentMetaData
getSegmentMetaData(java.lang.String getSegmentMetaData(java.lang.St
iDocType, ring iDocType,
java.lang.String iDocTypeExtension, java.lang.String iDocTypeExtens
java.lang.String systemRelease, ion,
java.lang.String applicationRelease, java.lang.String systemRelease,
java.lang.String definition) java.lang.String applicationRel
ease,
java.lang.String definition)
IDoc.SegmentMetaData Removed
getSegmentMetaData(java.lang.String
iDocType,
java.lang.String iDocTypeExtension,
java.lang.String systemRelease,
java.lang.String applicationRelease,
java.lang.String definition,
java.util.Vector queriedRepositories
)
IDoc.SegmentMetaData IDocSegmentMetaData
removeRootSegmentMetaDataFromCache( removeRootSegmentMetaDataFromCa
java.lang.String iDocType, che(java.lang.String iDocType,
java.lang.String iDocTypeExtension, java.lang.String iDocTypeExtens
java.lang.String systemRelease, ion,
java.lang.String applicationRelease) java.lang.String systemRelease,
java.lang.String applicationRel
ease)
IDoc.SegmentMetaData IDocSegmentMetaData
removeRootSegmentMetaDataTreeFromCac removeRootSegmentMetaDataTreeFr
he(java.lang.String iDocType, omCache(java.lang.String iDocTy
java.lang.String iDocTypeExtension, pe,
java.lang.String systemRelease, java.lang.String iDocTypeExtens
java.lang.String applicationRelease) ion,
java.lang.String systemRelease,
java.lang.String applicationRel
ease)
boolean boolean
removeSegmentMetaDataFromCache(IDoc. removeSegmentMetaDataFromCache(
SegmentMetaData segmentMetaData) IDocSegmentMetaData segmentMeta
Data)
IDoc.SegmentMetaData IDocSegmentMetaData
removeSegmentMetaDataFromCache(java. removeSegmentMetaDataFromCache(
lang.String iDocType, java.lang.String iDocType,
java.lang.String iDocTypeExtension, java.lang.String iDocTypeExtens
java.lang.String systemRelease, ion,
java.lang.String applicationRelease, java.lang.String systemRelease,
java.lang.String definition) java.lang.String applicationRel
ease,
java.lang.String definition)
boolean boolean
removeSegmentMetaDataTreeFromCache(I removeSegmentMetaDataTreeFromCa
Doc.SegmentMetaData segmentMetaData) che(IDocSegmentMetaData segment
MetaData)
IDoc.SegmentMetaData IDocSegmentMetaData
removeSegmentMetaDataTreeFromCache(j removeSegmentMetaDataTreeFromCa
ava.lang.String iDocType, che(java.lang.String iDocType,
java.lang.String iDocTypeExtension, java.lang.String iDocTypeExtens
java.lang.String systemRelease, ion,
java.lang.String applicationRelease, java.lang.String systemRelease,
java.lang.String definition) java.lang.String applicationRel
ease,
java.lang.String definition)
setNextRepository(IDoc.Repository ne Removed
xtRepository)
Class IDoc.SegmentMetaData
Renamed to IDocSegmentMetaData. The element has been modified from Class to Interface.
Old New
boolean boolean
equalsIgnoreParent(IDoc.SegmentMetaD equalsIgnoreParent(IDocSegmentM
ata segmentMetaData) etaData segmentMetaData)
IDoc.SegmentMetaData IDocSegmentMetaData
getChild(int index) getChild(int index)
IDoc.SegmentMetaData IDocSegmentMetaData
getChildByDefinition(java.lang.Strin getChildByDefinition(java.lang.
g definition) String definition)
IDoc.SegmentMetaData IDocSegmentMetaData
getChildByType(java.lang.String type getChildByType(java.lang.String
) type)
IDoc.SegmentMetaData IDocSegmentMetaData
getChildMatchingDefinition(java.lang getChildMatchingDefinition(java
.String definition) .lang.String definition)
IDoc.RecordMetaData IDocRecordMetaData
getRecordMetaData() getRecordMetaData()
Int . int
indexOfChild(IDoc.SegmentMetaData se indexOfChild(IDocSegmentMetaDat
gmentMetaData) a segmentMetaData)
java.lang.String definition)
From RecordMetaData:
Old New
IDoc.FieldMetaData Removed
getFieldMetaData(int index)
IDoc.FieldMetaData
getFieldMetaData(java.lang.String name)
From FieldMetaData:
Old New
IDoc.FieldMetaData.Datatype IDocDatatype
getDatatype() getDatatype(int index)
java.lang.String java.lang.String
getValueDescription(java.lang.String getValueDescription(int index,
value) java.lang.String value)
java.lang.String
getValueDescription(java.lang.S
tring name,
java.lang.String value)
valid field value.
java.lang.String[] java.lang.String[]
getValueDescriptions() getValueDescriptions(int index)
java.lang.String[]
getValueDescriptions(java.lang.
String name)
boolean boolean
isValueMatchingDatatype(java.lang.St isValueMatchingDatatype(int ind
ring value) ex, java.lang.String value)
boolean
isValueMatchingDatatype(java.la
ng.String name,
java.lang.String value)
Additional changes
For document creation, IDocFactory is used.