/** * Builds a new {@link DefaultWikiObjectComponentManagerEventListener}. */ public DefaultWikiObjectComponentManagerEventListener() { super(DefaultWikiObjectComponentManagerEventListener.EVENT_LISTENER_NAME, new ApplicationReadyEvent(), new WikiReadyEvent(), new DocumentCreatedEvent(), new DocumentUpdatedEvent(), new DocumentDeletedEvent()); }
/** Basic constructor. */ public LockingListener() { super("concurrency-locking", new ActionExecutingEvent(), new ActionExecutedEvent()); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public AutomaticDataMigrationEventListener() { super("automatic-data-migration", new ApplicationReadyEvent()); }
@Override public List<Event> getEvents() { return Arrays.<Event>asList(new DocumentCreatedEvent(), new DocumentUpdatedEvent(), new DocumentDeletedEvent()); }
/** * {@inheritDoc} * * @see org.xwiki.observation.EventListener#getEvents() */ public List<Event> getEvents() { return Arrays.<Event> asList(new DocumentCreatedEvent(), new DocumentUpdatedEvent(), new DocumentDeletedEvent(), new WikiDeletedEvent()); }
@Override public List<Event> getEvents() { // The list of events this listener listens to return Arrays.<Event> asList(new DocumentCreatingEvent(), new DocumentUpdatingEvent()); }
/** * The default constructor. */ public WikiDeletedListener() { super(NAME, new WikiDeletedEvent()); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public VCFAccessRestrictionEventListener() { super("vcf-access", new ActionExecutingEvent(ACTION), new ActionExecutingEvent(ACTION + "rev")); }
@Override public List<Event> getEvents() { return Arrays.<Event> asList(new ApplicationReadyEvent(), new WikiReadyEvent()); }
/** * Construct an XClassDeletingListener. */ public XClassDeletingListener() { super("XClass Deleting Listener", new DocumentsDeletingEvent()); }
@Override public boolean matches(Object otherEvent) { boolean matches = super.matches(otherEvent); if (matches) { DocumentRollingBackEvent documentRollingBackEvent = (DocumentRollingBackEvent) otherEvent; matches = revision == null || revision.equals(documentRollingBackEvent.getRevision()); } return matches; } }
@Override public boolean matches(Object otherEvent) { boolean matches = super.matches(otherEvent); if (matches) { DocumentRolledBackEvent documentRolledBackEvent = (DocumentRolledBackEvent) otherEvent; matches = revision == null || revision.equals(documentRolledBackEvent.getRevision()); } return matches; } }
/** * @return the source wiki identifier */ public String getSourceWikiId() { return getWikiId(); }
@Override public void onEvent(Event event, Object arg1, Object arg2) { loadTranslations(((WikiReadyEvent) event).getWikiId()); }
@Override public List<Event> getEvents() { return Arrays.<Event>asList( new DocumentCreatedEvent(), new DocumentUpdatedEvent(), new DocumentDeletedEvent()); }
/** * Builds a new {@link DefaultWikiComponentManagerEventListener}. */ public DefaultWikiComponentManagerEventListener() { super(DefaultWikiComponentManagerEventListener.EVENT_LISTENER_NAME, new DocumentCreatedEvent(), new DocumentUpdatedEvent(), new DocumentDeletedEvent(), new ApplicationReadyEvent(), new WikiReadyEvent()); }
@Override public List<Event> getEvents() { // The list of events this listener listens to return Arrays.<Event> asList(new DocumentCreatingEvent(), new DocumentUpdatingEvent()); }
@Override public List<Event> getEvents() { return Arrays.<Event>asList( new DocumentCreatedEvent(), new DocumentUpdatedEvent(), new DocumentDeletedEvent()); }
@Override public List<Event> getEvents() { return Arrays.<Event>asList( new DocumentCreatedEvent(), new DocumentUpdatedEvent(), new DocumentDeletedEvent()); }
@Override public List<Event> getEvents() { return Arrays.<Event>asList( new DocumentCreatedEvent(), new DocumentUpdatedEvent(), new DocumentDeletedEvent()); }