public interface ElementInterface
Modifier and Type | Method and Description |
---|---|
boolean |
apply(ElementInterface newElement,
boolean clean)
Apply the provided element so that the current one contains the same informations and indicate if it was
necessary to modify it in any way.
|
DocumentReference |
getDocumentReference() |
String |
getName() |
EntityReference |
getReference() |
void |
merge(ElementInterface previousElement,
ElementInterface newElement,
MergeConfiguration configuration,
XWikiContext context,
MergeResult mergeResult)
Apply a 3 ways merge on the current element based on provided previous and new version of the element.
|
void |
setDocumentReference(DocumentReference reference) |
void |
setName(String name) |
String |
toString() |
EntityReference getReference()
DocumentReference getDocumentReference()
String getName()
BaseProperty
).void setDocumentReference(DocumentReference reference)
void setName(String name)
void merge(ElementInterface previousElement, ElementInterface newElement, MergeConfiguration configuration, XWikiContext context, MergeResult mergeResult)
All 3 elements are supposed to have the same class and reference.
previousElement
- the previous version of the elementnewElement
- the next version of the elementconfiguration
- the configuration of the merge Indicate how to deal with some conflicts use cases, etc.context
- the XWiki contextmergeResult
- the merge reportboolean apply(ElementInterface newElement, boolean clean)
newElement
- the element to applyclean
- true if informations that are not in the new element should be removed (for example class properties
not in the new class)Copyright © 2004–2022 XWiki. All rights reserved.