Package org.xwiki.component.wiki
Interface WikiObjectComponentBuilder
-
@Role public interface WikiObjectComponentBuilder
Allows to build one or moreWikiComponent
based on the XObjects contained in an EntityReference. The role hint of the component should match the XObject class name- Since:
- 9.5RC1
- Version:
- $Id: 8bed8f96f484b82a5112edf3abe5dab8c9f29373 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<WikiComponent>
buildComponents(ObjectReference reference)
Build the components that is linked to the givenObjectReference
.EntityReference
getClassReference()
Get the class that should triggerbuildComponents(ObjectReference)
when one XObject implementing this very class is added, updated or deleted in the wiki.
-
-
-
Method Detail
-
getClassReference
EntityReference getClassReference()
Get the class that should triggerbuildComponents(ObjectReference)
when one XObject implementing this very class is added, updated or deleted in the wiki. The returned reference should be local if the builder is supposed to be used globally, or absolute if the builder is only used in a particular wiki.- Returns:
- an
EntityReference
to the correct class.
-
buildComponents
List<WikiComponent> buildComponents(ObjectReference reference) throws WikiComponentException
Build the components that is linked to the givenObjectReference
.- Parameters:
reference
- the reference of the object that should be used to create the component.- Returns:
- the new component
- Throws:
WikiComponentException
- if the givenObjectReference
is incompatible with the current builder or if theWikiComponentBuilder
has not been able to instanciate the component.
-
-