Package org.xwiki.filter.instance.input
Class AbstractInstanceInputEventGenerator<F>
- java.lang.Object
-
- org.xwiki.filter.instance.input.AbstractInstanceInputEventGenerator<F>
-
- Type Parameters:
F
- the type of the filter declaring the events supported by thisInstanceInputEventGenerator
- All Implemented Interfaces:
org.xwiki.component.phase.Initializable
,WikiDocumentFilter
,WikiFarmFilter
,WikiFilter
,WikiSpaceFilter
,InstanceInputEventGenerator
,org.xwiki.filter.instance.internal.InstanceFilter
,org.xwiki.filter.UnknownFilter
public abstract class AbstractInstanceInputEventGenerator<F> extends Object implements InstanceInputEventGenerator, org.xwiki.component.phase.Initializable
- Since:
- 6.2M1
- Version:
- $Id: 05ef82e0d6f46daaca543c7cff0ca3dc948c65c4 $
-
-
Field Summary
Fields Modifier and Type Field Description protected EntityReference
currentReference
protected Stack<String>
currentSpaces
protected String
currentWiki
protected org.xwiki.filter.descriptor.FilterStreamDescriptor
descriptor
protected Object
filter
protected Map<String,Object>
properties
protected F
proxyFilter
-
Fields inherited from interface org.xwiki.filter.event.model.WikiDocumentFilter
LOG_DOCUMENT_CREATED, LOG_DOCUMENT_DELETED, LOG_DOCUMENT_ERROR, LOG_DOCUMENT_SKIPPED, LOG_DOCUMENT_UPDATED, PARAMETER_CONTENT, PARAMETER_CONTENT_AUTHOR, PARAMETER_CONTENT_DATE, PARAMETER_CONTENT_HTML, PARAMETER_CREATION_AUTHOR, PARAMETER_CREATION_DATE, PARAMETER_CUSTOMCLASS, PARAMETER_DEFAULTTEMPLATE, PARAMETER_HIDDEN, PARAMETER_LASTREVISION, PARAMETER_LOCALE, PARAMETER_PARENT, PARAMETER_REVISION_AUTHOR, PARAMETER_REVISION_COMMENT, PARAMETER_REVISION_DATE, PARAMETER_REVISION_EFFECTIVEMETADATA_AUTHOR, PARAMETER_REVISION_MINOR, PARAMETER_REVISION_ORIGINALMETADATA_AUTHOR, PARAMETER_SYNTAX, PARAMETER_TITLE, PARAMETER_VALIDATIONSCRIPT
-
-
Constructor Summary
Constructors Constructor Description AbstractInstanceInputEventGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginUnknwon(String id, org.xwiki.filter.FilterEventParameters parameters)
void
beginWiki(String name, org.xwiki.filter.FilterEventParameters parameters)
void
beginWikiDocument(String name, org.xwiki.filter.FilterEventParameters parameters)
void
beginWikiDocumentLocale(Locale locale, org.xwiki.filter.FilterEventParameters parameters)
void
beginWikiDocumentRevision(String version, org.xwiki.filter.FilterEventParameters parameters)
void
beginWikiFarm(org.xwiki.filter.FilterEventParameters parameters)
void
beginWikiSpace(String name, org.xwiki.filter.FilterEventParameters parameters)
void
endUnknwon(String id, org.xwiki.filter.FilterEventParameters parameters)
void
endWiki(String name, org.xwiki.filter.FilterEventParameters parameters)
void
endWikiDocument(String name, org.xwiki.filter.FilterEventParameters parameters)
void
endWikiDocumentLocale(Locale locale, org.xwiki.filter.FilterEventParameters parameters)
void
endWikiDocumentRevision(String version, org.xwiki.filter.FilterEventParameters parameters)
void
endWikiFarm(org.xwiki.filter.FilterEventParameters parameters)
void
endWikiSpace(String name, org.xwiki.filter.FilterEventParameters parameters)
org.xwiki.filter.descriptor.FilterStreamDescriptor
getDescriptor()
Collection<Class<?>>
getFilterInterfaces()
void
initialize()
void
onUnknwon(String id, org.xwiki.filter.FilterEventParameters parameters)
protected void
setDescriptor(org.xwiki.filter.descriptor.FilterStreamDescriptor descriptor)
void
setFilter(Object filter)
void
setProperties(Map<String,Object> properties)
void
setWikiDocumentParameters(String name, org.xwiki.filter.FilterEventParameters parameters)
Set custom parameter related to the document.void
setWikiFarmParameters(org.xwiki.filter.FilterEventParameters parameters)
Set custom parameter related to the farm.void
setWikiParameters(String name, org.xwiki.filter.FilterEventParameters parameters)
Set custom parameter related to the wiki.void
setWikiSpaceParameters(String name, org.xwiki.filter.FilterEventParameters parameters)
Set custom parameter related to the space.
-
-
-
Field Detail
-
filter
protected Object filter
-
proxyFilter
protected F proxyFilter
-
currentWiki
protected String currentWiki
-
currentReference
protected EntityReference currentReference
-
descriptor
protected org.xwiki.filter.descriptor.FilterStreamDescriptor descriptor
-
-
Method Detail
-
initialize
public void initialize() throws org.xwiki.component.phase.InitializationException
- Specified by:
initialize
in interfaceorg.xwiki.component.phase.Initializable
- Throws:
org.xwiki.component.phase.InitializationException
-
getDescriptor
public org.xwiki.filter.descriptor.FilterStreamDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceInstanceInputEventGenerator
- Returns:
- The FilterStreamDescriptor describes a FilterStream and has the list of bean class parameters or properties.
-
setDescriptor
protected void setDescriptor(org.xwiki.filter.descriptor.FilterStreamDescriptor descriptor)
-
getFilterInterfaces
public Collection<Class<?>> getFilterInterfaces() throws org.xwiki.filter.FilterException
- Specified by:
getFilterInterfaces
in interfaceInstanceInputEventGenerator
- Returns:
- the filters supported by this stream factory
- Throws:
org.xwiki.filter.FilterException
- when failing to get filters interfaces
-
setWikiFarmParameters
public void setWikiFarmParameters(org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
Description copied from interface:InstanceInputEventGenerator
Set custom parameter related to the farm.- Specified by:
setWikiFarmParameters
in interfaceInstanceInputEventGenerator
- Parameters:
parameters
- the parameters to set- Throws:
org.xwiki.filter.FilterException
- when failing to set parameters
-
setWikiParameters
public void setWikiParameters(String name, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
Description copied from interface:InstanceInputEventGenerator
Set custom parameter related to the wiki.- Specified by:
setWikiParameters
in interfaceInstanceInputEventGenerator
- Parameters:
name
- the name of wikiparameters
- the parameters to set- Throws:
org.xwiki.filter.FilterException
- when failing to set parameters
-
setWikiSpaceParameters
public void setWikiSpaceParameters(String name, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
Description copied from interface:InstanceInputEventGenerator
Set custom parameter related to the space.- Specified by:
setWikiSpaceParameters
in interfaceInstanceInputEventGenerator
- Parameters:
name
- the name of spaceparameters
- the parameters to set- Throws:
org.xwiki.filter.FilterException
- when failing to set parameters
-
setWikiDocumentParameters
public void setWikiDocumentParameters(String name, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
Description copied from interface:InstanceInputEventGenerator
Set custom parameter related to the document.- Specified by:
setWikiDocumentParameters
in interfaceInstanceInputEventGenerator
- Parameters:
name
- the name of documentparameters
- the parameters to set- Throws:
org.xwiki.filter.FilterException
- when failing to set parameters
-
setProperties
public void setProperties(Map<String,Object> properties)
- Specified by:
setProperties
in interfaceInstanceInputEventGenerator
- Parameters:
properties
- the event generator properties
-
setFilter
public void setFilter(Object filter)
- Specified by:
setFilter
in interfaceInstanceInputEventGenerator
- Parameters:
filter
- the filter to send events to
-
beginWikiFarm
public void beginWikiFarm(org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
beginWikiFarm
in interfaceWikiFarmFilter
- Throws:
org.xwiki.filter.FilterException
-
endWikiFarm
public void endWikiFarm(org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
endWikiFarm
in interfaceWikiFarmFilter
- Throws:
org.xwiki.filter.FilterException
-
beginWiki
public void beginWiki(String name, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
beginWiki
in interfaceWikiFilter
- Throws:
org.xwiki.filter.FilterException
-
endWiki
public void endWiki(String name, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
endWiki
in interfaceWikiFilter
- Throws:
org.xwiki.filter.FilterException
-
beginWikiSpace
public void beginWikiSpace(String name, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
beginWikiSpace
in interfaceWikiSpaceFilter
- Throws:
org.xwiki.filter.FilterException
-
endWikiSpace
public void endWikiSpace(String name, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
endWikiSpace
in interfaceWikiSpaceFilter
- Throws:
org.xwiki.filter.FilterException
-
beginWikiDocument
public void beginWikiDocument(String name, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
beginWikiDocument
in interfaceWikiDocumentFilter
- Throws:
org.xwiki.filter.FilterException
-
endWikiDocument
public void endWikiDocument(String name, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
endWikiDocument
in interfaceWikiDocumentFilter
- Throws:
org.xwiki.filter.FilterException
-
beginWikiDocumentLocale
public void beginWikiDocumentLocale(Locale locale, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
beginWikiDocumentLocale
in interfaceWikiDocumentFilter
- Throws:
org.xwiki.filter.FilterException
-
endWikiDocumentLocale
public void endWikiDocumentLocale(Locale locale, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
endWikiDocumentLocale
in interfaceWikiDocumentFilter
- Throws:
org.xwiki.filter.FilterException
-
beginWikiDocumentRevision
public void beginWikiDocumentRevision(String version, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
beginWikiDocumentRevision
in interfaceWikiDocumentFilter
- Throws:
org.xwiki.filter.FilterException
-
endWikiDocumentRevision
public void endWikiDocumentRevision(String version, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
endWikiDocumentRevision
in interfaceWikiDocumentFilter
- Throws:
org.xwiki.filter.FilterException
-
beginUnknwon
public void beginUnknwon(String id, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
beginUnknwon
in interfaceorg.xwiki.filter.UnknownFilter
- Throws:
org.xwiki.filter.FilterException
-
endUnknwon
public void endUnknwon(String id, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
endUnknwon
in interfaceorg.xwiki.filter.UnknownFilter
- Throws:
org.xwiki.filter.FilterException
-
onUnknwon
public void onUnknwon(String id, org.xwiki.filter.FilterEventParameters parameters) throws org.xwiki.filter.FilterException
- Specified by:
onUnknwon
in interfaceorg.xwiki.filter.UnknownFilter
- Throws:
org.xwiki.filter.FilterException
-
-