|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.rendering.internal.macro.dashboard.DefaultGadgetSource
@Component public class DefaultGadgetSource
Default gadget reader, reads the gadgets from XWiki Objects attached to the current document.
| Field Summary | |
|---|---|
protected DocumentReferenceResolver<EntityReference> |
currentReferenceEntityResolver
The current entity reference resolver, to resolve the gadgets class reference. |
protected DocumentReferenceResolver<java.lang.String> |
currentReferenceResolver
The current string reference resolver, to resolve the current document reference in the metadata of the block of the current macro. |
protected org.xwiki.context.Execution |
execution
The execution context, to grab XWiki context and access to documents. |
| Constructor Summary | |
|---|---|
DefaultGadgetSource()
|
|
| Method Summary | |
|---|---|
java.util.List<Block> |
getDashboardSourceMetadata(java.lang.String source,
org.xwiki.rendering.transformation.MacroTransformationContext context)
Get the metadata about this dashboard source, such as source document fullname, gadget add url, gadget remove url, etc, to pass to the client. |
java.util.List<Gadget> |
getGadgets(java.lang.String source,
org.xwiki.rendering.transformation.MacroTransformationContext context)
Reads the gadgets for the passed macro transformation context. |
boolean |
isEditing()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Requirement protected org.xwiki.context.Execution execution
@Requirement(value="current") protected DocumentReferenceResolver<java.lang.String> currentReferenceResolver
@Requirement(value="current/reference") protected DocumentReferenceResolver<EntityReference> currentReferenceEntityResolver
| Constructor Detail |
|---|
public DefaultGadgetSource()
| Method Detail |
|---|
public java.util.List<Gadget> getGadgets(java.lang.String source,
org.xwiki.rendering.transformation.MacroTransformationContext context)
throws java.lang.Exception
getGadgets in interface GadgetSourcesource - the source to read dashboard gadgets from (a document serialized reference)context - the dashboard macro transformation context
java.lang.Exception - in case anything goes wrong reading data, the exception should be translated by the dashboard
macro caller into a macro execution exception#getGadgets(String, MacroTransformationContext)
public java.util.List<Block> getDashboardSourceMetadata(java.lang.String source,
org.xwiki.rendering.transformation.MacroTransformationContext context)
getDashboardSourceMetadata in interface GadgetSourcesource - the source to read dashboard gadgets from (a document serialized reference)context - the dashboard macro transformation context
GadgetSource.getDashboardSourceMetadata(java.lang.String,
org.xwiki.rendering.transformation.MacroTransformationContext)public boolean isEditing()
isEditing in interface GadgetSourcetrue if the the current context is in edit mode (gadgets can be edited -- positions, parameters,
adding gadgets etc), false otherwise GadgetSource.isEditing()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||