All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sakaiproject.search.elasticsearch.SearchNotificationAction Maven / Gradle / Ivy

There is a newer version: 11.4
Show newest version
package org.sakaiproject.search.elasticsearch;

import org.sakaiproject.event.api.Event;
import org.sakaiproject.event.api.Notification;
import org.sakaiproject.event.api.NotificationAction;
import org.w3c.dom.Element;

/**
 * Created by IntelliJ IDEA.
 * User: jbush
 * Date: 10/31/12
 * Time: 12:56 PM
 * To change this template use File | Settings | File Templates.
 */
public class SearchNotificationAction implements NotificationAction {
    private ElasticSearchIndexBuilder searchIndexBuilder;

    public SearchNotificationAction(ElasticSearchIndexBuilder searchIndexBuilder){
        this.searchIndexBuilder = searchIndexBuilder;
    }

    @Override
    public void set(Element element) {
    }

    @Override
    public void set(NotificationAction notificationAction) {
    }

    @Override
    public NotificationAction getClone() {
        return new SearchNotificationAction(searchIndexBuilder);
    }

    @Override
    public void toXml(Element element) {
    }

    @Override
    public void notify(Notification notification, Event event) {
         searchIndexBuilder.addResource(notification, event);
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy