|
Web Dynpro API Documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sap.tc.webdynpro.progmodel.api.WDCopyService
This class implements the well known ABAP feature "MOVE_CORRESPONDING".
copyCorresponding(Object, Object)| Inner Class Summary | |
static interface |
WDCopyService.IWDCopyService
Describes the features required from the internal copy service implementation. |
| Constructor Summary | |
WDCopyService()
|
|
| Method Summary | |
static void |
copyCorresponding(java.lang.Object source,
java.lang.Object target)
The Web Dynpro equivalent for the well know abap feature "MOVE_CORRESPONDING". |
static void |
copyElements(IWDNode source,
IWDNode target)
Copies all elements from source to target. |
static void |
copySubtree(IWDNode source,
IWDNode target)
Copies all elements from to complete subtree of source to
target. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WDCopyService()
| Method Detail |
public static void copyCorresponding(java.lang.Object source,
java.lang.Object target)
The method inspects all attributes of source, searches a
compatible attribute in target and copies the value if it
finds one. Values are considered compatible if their Java class matches:
Currently, both source and target may be either
an IWDNodeElement or an ICMIGenericModelClass.
If any object is of another class, it is simply ignored. These both classes
have been chosen, because they can tell about their structure at run time
without the need of Java reflection.
source - The source objecttarget - The target object
public static void copyElements(IWDNode source,
IWDNode target)
source to target.
Afterwards source contains as much elements as target,
each one either copied via copyCorresponding(Object, Object) (if
target is a value node) or holding the same model instance (if
source and target both are model nodes holding
the same class). The lead selection will be copied, too.
Note: If you copy a model node to another model node, only the reference to the model instance is copied, but not additional value attributes. Copying a model node to a value node works fine.
source - The source nodetarget - The target nodeWDRuntimeException - if target is a model node and
source is not a model node holding the same class.
public static void copySubtree(IWDNode source,
IWDNode target)
source to
target. This is done by applying copyElements(IWDNode, IWDNode)
to the nodes and then searching for equally named subnodes and recursively
applying copySubtree to them.source - The source nodetarget - The target nodeWDRuntimeException - if copyElements(IWDNode, IWDNode)
fails for a node in the subtree.
|
Web Dynpro API Documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||