/** * The default constructor. */ public WikiDeletedListener() { super(NAME, new WikiDeletedEvent()); }
@Override public void delete(String wikiId) throws WikiManagerException { // Delete the wiki wikiDeleter.delete(wikiId); // Send an event observationManager.notify(new WikiDeletedEvent(wikiId), wikiId); }
/** * XWiki plugin constructor. * * @param name The name of the plugin, which can be used for retrieving the plugin API from velocity. Unused. * @param className The canonical classname of the plugin. Unused. * @param context The current request context. * @see com.xpn.xwiki.plugin.XWikiDefaultPlugin#XWikiDefaultPlugin(String,String,com.xpn.xwiki.XWikiContext) */ public AbstractDocumentSkinExtensionPlugin(String name, String className, XWikiContext context) { super(name, className, context); this.events.add(new DocumentCreatedEvent()); this.events.add(new DocumentDeletedEvent()); this.events.add(new DocumentUpdatedEvent()); this.events.add(new WikiDeletedEvent()); }
/** * {@inheritDoc} * * @see org.xwiki.observation.EventListener#getEvents() */ public List<Event> getEvents() { return Arrays.<Event> asList(new DocumentCreatedEvent(), new DocumentUpdatedEvent(), new DocumentDeletedEvent(), new WikiDeletedEvent()); }
private void initialize() { this.events = Arrays.<Event>asList(new DocumentUpdatedEvent(this.documentReference), new DocumentCreatedEvent( this.documentReference), new DocumentDeletedEvent(this.documentReference), new WikiDeletedEvent( this.documentReference.getWikiReference().getName())); this.observation.addListener(this); }
protected List<Event> getCacheCleanupEvents() { RegexEntityReference classMatcher = BaseObjectReference.any(this.referenceSerializer.serialize(getClassReference())); return Arrays.<Event>asList(new XObjectAddedEvent(classMatcher), new XObjectDeletedEvent(classMatcher), new XObjectUpdatedEvent(classMatcher), new WikiDeletedEvent()); }