Package com.xpn.xwiki.objects
Interface ElementInterface
-
- All Known Subinterfaces:
ClassInterface
,ObjectInterface
,PropertyClassInterface
,PropertyInterface
- All Known Implementing Classes:
BaseClass
,BaseCollection
,BaseElement
,BaseObject
,BaseProperty
,BaseStringProperty
,BooleanClass
,BooleanMetaClass
,ComputedFieldClass
,ComputedFieldMetaClass
,DateClass
,DateMetaClass
,DateProperty
,DBListClass
,DBListMetaClass
,DBStringListProperty
,DBTreeListClass
,DBTreeListMetaClass
,DocumentStats
,DoubleProperty
,EmailClass
,EmailMetaClass
,FloatProperty
,GroupsClass
,GroupsMetaClass
,IntegerProperty
,LargeStringProperty
,LevelsClass
,LevelsMetaClass
,ListClass
,ListMetaClass
,ListProperty
,LongProperty
,MetaClass
,NumberClass
,NumberMetaClass
,NumberProperty
,PageClass
,PageMetaClass
,PasswordClass
,PasswordMetaClass
,PropertyClass
,PropertyMetaClass
,RefererStats
,StaticListClass
,StaticListMetaClass
,StringClass
,StringListProperty
,StringMetaClass
,StringProperty
,TextAreaClass
,TextAreaMetaClass
,TimezoneClass
,TimezoneMetaClass
,UsersClass
,UsersMetaClass
,VisitStats
,XWikiStats
public interface ElementInterface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method 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()
MergeManagerResult<ElementInterface,Object>
merge(ElementInterface previousElement, ElementInterface newElement, MergeConfiguration configuration, XWikiContext context)
Apply a 3 ways merge on the current element based on provided previous and new version of the element.void
merge(ElementInterface previousElement, ElementInterface newElement, MergeConfiguration configuration, XWikiContext context, MergeResult mergeResult)
Deprecated.void
setDocumentReference(DocumentReference reference)
void
setName(String name)
String
toString()
-
-
-
Method Detail
-
getReference
EntityReference getReference()
- Returns:
- the reference of the element
- Since:
- 3.2M1
-
getDocumentReference
DocumentReference getDocumentReference()
- Returns:
- the reference to the document in which this element is defined (for elements where this make sense, for example for an XClass or a XObject).
- Since:
- 2.2M2
-
getName
String getName()
- Returns:
- the free form name (for elements which don't point to a reference, for example for instances of
BaseProperty
).
-
setDocumentReference
void setDocumentReference(DocumentReference reference)
- Since:
- 2.2M2
-
setName
void setName(String name)
-
merge
@Deprecated(since="14.10.7,15.2RC1") void merge(ElementInterface previousElement, ElementInterface newElement, MergeConfiguration configuration, XWikiContext context, MergeResult mergeResult)
Deprecated.Apply a 3 ways merge on the current element based on provided previous and new version of the element.All 3 elements are supposed to have the same class and reference.
- Parameters:
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 report- Since:
- 3.2M1
-
merge
@Unstable MergeManagerResult<ElementInterface,Object> merge(ElementInterface previousElement, ElementInterface newElement, MergeConfiguration configuration, XWikiContext context)
Apply a 3 ways merge on the current element based on provided previous and new version of the element.All 3 elements are supposed to have the same class and reference.
Note that the current element is modified only if
MergeConfiguration.isProvidedVersionsModifiables()
returnstrue
.- Parameters:
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 context- Since:
- 14.10.7, 15.2RC1
-
apply
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.- Parameters:
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)- Returns:
- true if the element has been modified
- Since:
- 4.3M1
-
-