Search in sources :

Example 6 with InstanceInputEventGenerator

use of org.xwiki.filter.instance.input.InstanceInputEventGenerator in project xwiki-platform by xwiki.

the class InstanceInputFilterStreamFactory method getFilterInterfaces.

@Override
public Collection<Class<?>> getFilterInterfaces() throws FilterException {
    List<InstanceInputEventGenerator> eventGenerators;
    try {
        eventGenerators = this.componentManagerProvider.get().getInstanceList(InstanceInputEventGenerator.class);
    } catch (ComponentLookupException e) {
        throw new FilterException("Failed to get registered instance of InstanceInputEventGenerator components", e);
    }
    Set<Class<?>> filters = new HashSet<Class<?>>();
    filters.addAll(super.getFilterInterfaces());
    for (InstanceInputEventGenerator generator : eventGenerators) {
        filters.addAll(generator.getFilterInterfaces());
    }
    return filters;
}
Also used : ComponentLookupException(org.xwiki.component.manager.ComponentLookupException) FilterException(org.xwiki.filter.FilterException) InstanceInputEventGenerator(org.xwiki.filter.instance.input.InstanceInputEventGenerator) HashSet(java.util.HashSet)

Aggregations

InstanceInputEventGenerator (org.xwiki.filter.instance.input.InstanceInputEventGenerator)6 FilterEventParameters (org.xwiki.filter.FilterEventParameters)4 ComponentLookupException (org.xwiki.component.manager.ComponentLookupException)2 EntityReferenceTreeNode (org.xwiki.model.reference.EntityReferenceTreeNode)2 HashSet (java.util.HashSet)1 InitializationException (org.xwiki.component.phase.InitializationException)1 FilterException (org.xwiki.filter.FilterException)1 CompositeFilterStreamDescriptor (org.xwiki.filter.descriptor.CompositeFilterStreamDescriptor)1 FilterStreamDescriptor (org.xwiki.filter.descriptor.FilterStreamDescriptor)1 DocumentReference (org.xwiki.model.reference.DocumentReference)1 SpaceReference (org.xwiki.model.reference.SpaceReference)1 WikiReference (org.xwiki.model.reference.WikiReference)1