Index: modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/claims/migration/handler/FetchContextHandler.java
===================================================================
--- modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/claims/migration/handler/FetchContextHandler.java	(nonexistent)
+++ modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/claims/migration/handler/FetchContextHandler.java	(revision 53202)
@@ -0,0 +1,62 @@
+package eu.dnetlib.data.claims.migration.handler;
+
+import eu.dnetlib.data.claims.migration.entity.Context;
+import eu.dnetlib.data.claimsDemo.QueryGenerator;
+import eu.dnetlib.data.claimsDemo.SQLStoreException;
+import eu.dnetlib.data.claimsDemo.SqlDAO;
+import org.apache.log4j.Logger;
+
+import java.sql.ResultSet;
+import java.util.ArrayList;
+
+public class FetchContextHandler {
+
+    private Logger log = Logger.getLogger(this.getClass());
+
+    SqlDAO sqlDAO = null;
+    QueryGenerator queryGenerator = null;
+
+    public FetchContextHandler(){
+
+    }
+
+    public Context fetchFirstContextByCommunityId(String communityId) throws Exception, SQLStoreException {
+        ArrayList<Object> params = new ArrayList<>();
+        String query = queryGenerator.generateSelectFirstContextByCommunityIdQuery(communityId, params);
+        ResultSet rs = sqlDAO.executePreparedQuery(query, params);
+
+        Context context = fetchContextByResultSet(rs);
+        if(context == null) {
+            log.info("No context with community id : "+ communityId+"\n");
+        }
+
+        return context;
+    }
+
+
+    public Context fetchContextByResultSet(ResultSet rs) throws Exception {
+        Context context = null;
+        while(rs.next()) {
+            context = new Context();
+            context.setOpenaireId(rs.getString(1));
+            context.setTitle(rs.getString(2));
+        }
+        return context;
+    }
+
+    public SqlDAO getSqlDAO() {
+        return sqlDAO;
+    }
+
+    public void setSqlDAO(SqlDAO sqlDAO) {
+        this.sqlDAO = sqlDAO;
+    }
+
+    public QueryGenerator getQueryGenerator() {
+        return queryGenerator;
+    }
+
+    public void setQueryGenerator(QueryGenerator queryGenerator) {
+        this.queryGenerator = queryGenerator;
+    }
+}
Index: modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/claims/migration/handler/FetchClaimHandler.java
===================================================================
--- modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/claims/migration/handler/FetchClaimHandler.java	(revision 53201)
+++ modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/claims/migration/handler/FetchClaimHandler.java	(revision 53202)
@@ -125,6 +125,22 @@
         ResultSet rs = sqlDAO.executePreparedQuery(query, params);
         return fetchClaimsByResultSet(rs, addCurationInfo);
     }
+    /**
+     *
+     * @param dateFrom
+     * @param dataTo
+     * @param openaireId for project
+     * @param limit returns at most 'limit' claims  (use -1 or null for no limit)
+     * @param offset returns claims after 'offset' position (null for no offset)
+     * @return
+     * @throws Exception
+     */
+    public int fetchNumberOfClaimsByDateAndOpenaireId(String dateFrom, String dataTo, String openaireId, Integer limit, Integer offset, String keyword, String orderField, boolean descending, List<String> types, boolean addCurationInfo) throws Exception, SQLStoreException {
+        ArrayList<Object> params = new ArrayList<>();
+        String query = queryGenerator.generateFetchNumberOfClaimsByDateAndOpenaireId(dateFrom, dataTo, openaireId, limit, offset,keyword, orderField, descending,types, params);
+        ResultSet rs = sqlDAO.executePreparedQuery(query, params);
+        return countClaimsByResultSet(rs);
+    }
 
     /**
      *
Index: modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/emailSender/EmailSender.java
===================================================================
--- modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/emailSender/EmailSender.java	(revision 53201)
+++ modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/emailSender/EmailSender.java	(revision 53202)
@@ -1,10 +1,12 @@
 package eu.dnetlib.data.emailSender;
 
 import eu.dnetlib.data.claims.migration.entity.Claim;
+import eu.dnetlib.data.claims.migration.entity.Context;
+import eu.dnetlib.data.claims.migration.entity.Notification;
 import eu.dnetlib.data.claims.migration.entity.Project;
-import eu.dnetlib.data.claims.migration.handler.FetchClaimHandler;
-import eu.dnetlib.data.claims.migration.handler.ProjectHandler;
+import eu.dnetlib.data.claims.migration.handler.*;
 import eu.dnetlib.data.claimsDemo.ClaimUtils;
+import eu.dnetlib.data.claimsDemo.CommunityUtils;
 import eu.dnetlib.data.claimsDemo.SQLStoreException;
 import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -22,9 +24,17 @@
 
     @Autowired
     private FetchClaimHandler fetchClaimHandler = null;
+    @Autowired
+    private FetchProjectHandler fetchProjectHandler = null;
+    @Autowired
+    private FetchNotificationHandler fetchNotificationHandler = null;
+    @Autowired
+    private NotificationHandler notificationHandler = null;
+    @Autowired
+    private FetchContextHandler fetchContextHandler = null;
 
     @Autowired
-    private ProjectHandler projectHandler = null;
+    private String defaultFrequencyInHours;
 
     private static String openaireClaimsPage;
     private static String username;
@@ -34,38 +44,39 @@
     private static String from;
     private static String specialRecipients;
 
-    private static String dateFrom;
-    private static String dateTo;
-
     @Override
     public void run() {
         logger.info("EmailSender thread is running. " + host);
         logger.info("Special Recipients  " + specialRecipients);
 
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date date = new Date();
+        String dateTo = (format.format(date));
 
-        Project project = null;
+        defaultEmails_For_ProjectClaims(dateTo, format);    // daily for managers not in notification table
+        defaultEmails_For_CommunityClaims(dateTo, format);  // daily for managers not in notification table
+
+        notificationEmails_For_ProjectClaims(dateTo, format);
+        notificationEmails_For_CommunityClaims(dateTo, format);
+    }
+
+    public void defaultEmails_For_ProjectClaims(String dateTo, SimpleDateFormat format) {
+        Map<String, List<String>> managersOfProject = new HashMap<String, List<String>>();
+        Project project;
         List<Claim> claims = null;
         List<String> types = new ArrayList<String>();
 
-        Map<String, List<String>> managersOfProject = new HashMap<String, List<String>>();
-
         types.add(ClaimUtils.PROJECT);
 
-        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        Date date = null;
-
         Calendar calendar = Calendar.getInstance();
-        calendar.add(Calendar.HOUR_OF_DAY, -23);
+        calendar.add(Calendar.HOUR_OF_DAY, -(Integer.parseInt(defaultFrequencyInHours)-1));
         calendar.add(Calendar.MINUTE, -59);
         calendar.add(Calendar.SECOND, -59);
-        date = calendar.getTime();
-        dateFrom=(format.format(date));
+        Date date = calendar.getTime();
+        String dateFrom=(format.format(date));
 
-        date = new Date();
-        dateTo = (format.format(date));
+        logger.debug("Sending emails for project claims between " + dateFrom + " and "+dateTo);
 
-        logger.debug("Sending emails for claims between " + dateFrom + " and "+dateTo);
-
         try {
             // Get all claims between dateFrom and dateTo which satisfy source_type == "project" or target_type == "project"
             claims = fetchClaimHandler.fetchClaimsByDate(dateFrom, dateTo, null, null, "", "source", true, types, false);
@@ -90,30 +101,237 @@
                     managersOfProject.put(project.getOpenaireId(), tmpManagers);
                 }
 
+                /*
                 // Send emails to actual project managers instead of special recipients
-                //List<String> managers = projectFetcher.getFetchProjectHandler().fetchContactEmailsByProjectId(project.getOpenaireId());
-                //logger.debug("Managers of project " + project.getOpenaireId() + ": "+managers);
-                //managersOfProject.put(project.getOpenaireId(), managers);
+                List<String> managers = null;
+                try {
+                    managers = fetchProjectHandler.fetchContactEmailsByProjectId(project.getOpenaireId());
+                    if(managers != null) {
+                        Iterator itr = managers.iterator();
+                        while (itr.hasNext()) {
+                            String manager = (String) itr.next();
+                            Notification notification = fetchNotificationHandler.fetchNotification(project.getOpenaireId(), manager);
+                            //if (notification != null && (!notification.isNotify() || notification.getFrequency() != 24)) {
+                            if (notification != null) {
+                                itr.remove();
+                            }
+                        }
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                } catch (SQLStoreException e) {
+                    e.printStackTrace();
+                }
 
-                String token = UUID.randomUUID().toString();
-                logger.debug("UUID Token for project " + project.getOpenaireId() + ": " + token);
+                logger.debug("Managers of project " + project.getOpenaireId() + ": "+managers);
+                managersOfProject.put(project.getOpenaireId(), managers);
+                */
+
+                if (managersOfProject.get(project.getOpenaireId()) != null &&
+                        !managersOfProject.get(project.getOpenaireId()).isEmpty()) {
+                    //send(project.getOpenaireId(), project.getName(), "project", managersOfProject.get(project.getOpenaireId()));
+                }
+            }
+        }
+    }
+
+    public void defaultEmails_For_CommunityClaims(String dateTo, SimpleDateFormat format) {
+        Map<String, List<String>> managersOfCommunity = new HashMap<String, List<String>>();
+        Context context;
+        List<Claim> claims = null;
+        List<String> types = new ArrayList<String>();
+
+        types.add(ClaimUtils.CONTEXT);
+
+        Calendar calendar = Calendar.getInstance();
+        calendar.add(Calendar.HOUR_OF_DAY, -(Integer.parseInt(defaultFrequencyInHours)-1));
+        calendar.add(Calendar.MINUTE, -59);
+        calendar.add(Calendar.SECOND, -59);
+        Date date = calendar.getTime();
+        String dateFrom=(format.format(date));
+
+        logger.debug("Sending emails for community claims between " + dateFrom + " and "+dateTo);
+
+        try {
+            // Get all claims between dateFrom and dateTo which satisfy source_type == "context" or target_type == "context"
+            claims = fetchClaimHandler.fetchClaimsByDate(dateFrom, dateTo, null, null, "", "source", true, types, false);
+        } catch (SQLStoreException|Exception e) {
+            logger.error("Could not fetch claims by date from "+dateFrom+" to "+dateTo, e);
+        }
+
+        for (Claim claim: claims) {
+            if (claim.getSourceType().equals("context")) {
+                context = (Context)claim.getSource();
+            } else {
+                context = (Context)claim.getTarget();
+            }
+
+            String openaireId = context.getOpenaireId().split("::")[0];
+            if (!managersOfCommunity.containsKey(openaireId)) {
+
+                /*
+                // specialRecipients are used currently for testing purposes
+                List<String> tmpManagers = null;
+                if (specialRecipients != null && !specialRecipients.isEmpty()) {
+                    tmpManagers = Arrays.asList(specialRecipients.split("\\s*,\\s*"));
+                    logger.debug("Special recipients: " + specialRecipients);
+                    managersOfCommunity.put(openaireId, tmpManagers);
+                }
+                */
+
+
+                // Send emails to actual project managers instead of special recipients
+                List<String> managers = null;
                 try {
-                    projectHandler.updateTokenByProjectId(project.getOpenaireId(), token);
+                    CommunityUtils communityInfo = CommunityUtils.getCommunityInfo(openaireId);
+                    managers = communityInfo.getManagers();
+                    if(managers != null) {
+                        Iterator itr = managers.iterator();
+                        while (itr.hasNext()) {
+                            String manager = (String) itr.next();
+                            Notification notification = fetchNotificationHandler.fetchNotification(openaireId, manager);
+                            if (notification != null) {
+                                itr.remove();
+                            } else {
+                                logger.debug("Sending email to community manager: "+ manager);
+                            }
+                        }
+                    }
+                    else {
+                        logger.debug("Community Managers: null");
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                } catch (SQLStoreException e) {
+                    e.printStackTrace();
+                }
 
-                    if (managersOfProject.get(project.getOpenaireId()) != null &&
-                            !managersOfProject.get(project.getOpenaireId()).isEmpty()) {
-                        send(project, token, managersOfProject.get(project.getOpenaireId()));
+                logger.debug("Managers of community " + openaireId + ": "+managers);
+                managersOfCommunity.put(openaireId, managers);
+
+
+                if (managersOfCommunity.get(openaireId) != null &&
+                        !managersOfCommunity.get(openaireId).isEmpty()) {
+                    //send(openaireId, context.getTitle().split(">")[0], "community", managersOfCommunity.get(openaireId));
+                }
+            }
+        }
+    }
+
+    public void notificationEmails_For_ProjectClaims(String dateTo, SimpleDateFormat format) {
+        Project project = null;
+        List<String> types = new ArrayList<String>();
+
+        types.add(ClaimUtils.PROJECT);
+
+        logger.debug("Sending email for project claims from notification table");
+
+        try {
+            List<Notification> trueNotifications = fetchNotificationHandler.fetchTrueNotifications();
+            logger.debug(trueNotifications);
+            if(trueNotifications != null) {
+                for(Notification notification : trueNotifications) {
+                    List<String> managers = fetchProjectHandler.fetchContactEmailsByProjectId(notification.getOpenaireId());
+                    if(managers != null && managers.contains(notification.getUserMail())) {
+
+                        Date _dateTo = format.parse(dateTo);
+
+                        String last_interaction_date = (format.format(notification.getDate()));
+
+                        long diff = _dateTo.getTime() - notification.getDate().getTime();
+                        diff = diff / 1000;
+
+                        if (diff >= (notification.getFrequency() * 3600)) {
+                            if (fetchClaimHandler.fetchNumberOfClaimsByDateAndOpenaireId(last_interaction_date, dateTo, notification.getOpenaireId(), null, null, "", null, true, types, false) > 0) {
+                                List<String> managersByNotification = new ArrayList<>();
+                                managersByNotification.add(notification.getUserMail());
+
+                                project = fetchProjectHandler.fetchProjectById(notification.getOpenaireId());
+
+                                logger.debug("Sending email for project claims between " + last_interaction_date + " and " + dateTo + " to " + notification.getUserMail());
+
+                                //send(project.getOpenaireId(), project.getName(), "project", managersByNotification);
+                            }
+                            Calendar cal = Calendar.getInstance();
+                            cal.setTime(_dateTo);
+                            cal.add(Calendar.SECOND, 1);
+                            _dateTo = cal.getTime();
+                            notificationHandler.updateNotificationLastInteractionDate(notification.getOpenaireId(), notification.getUserMail(), _dateTo);
+                            //update last interaction date (db)
+                        }
+                    } else {
+                        logger.debug("managers do not contain "+notification.getUserMail());
                     }
-                } catch (SQLStoreException|Exception e) {
-                    logger.error("Could update token for project with id "+ project.getOpenaireId(), e);
                 }
+            } else {
+                logger.debug("true notifications: null");
             }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } catch (SQLStoreException e) {
+            e.printStackTrace();
         }
     }
 
-    public void send(Project project, String token, List<String> managers) {
-        final String openaireClaimsPageUrl = openaireClaimsPage + token;
+    public void notificationEmails_For_CommunityClaims(String dateTo, SimpleDateFormat format) {
+        Context context = null;
+        List<String> types = new ArrayList<String>();
 
+        types.add(ClaimUtils.CONTEXT);
+
+        logger.debug("Sending email for community claims from notification table");
+
+        try {
+            List<Notification> trueNotifications = fetchNotificationHandler.fetchTrueNotifications();
+
+            if(trueNotifications != null) {
+                for(Notification notification : trueNotifications) {
+                    CommunityUtils communityInfo = CommunityUtils.getCommunityInfo(notification.getOpenaireId());
+                    List<String> managers = null;
+                    if(communityInfo != null) {
+                        managers = communityInfo.getManagers();
+                    }
+
+                    if(managers != null && managers.contains(notification.getUserMail())) {
+                        Date _dateTo = format.parse(dateTo);
+
+                        String last_interaction_date = (format.format(notification.getDate()));
+                        long diff = _dateTo.getTime() - notification.getDate().getTime();
+                        diff = diff / 1000;
+                        //if dateTo - last_interaction_date >= notification.getFrequency//last_interaction_date.compareTo(dateFrom) == -1 &&
+
+                        if (diff >= (notification.getFrequency() * 3600)) {
+                            if (fetchClaimHandler.fetchNumberOfClaimsByDateAndOpenaireId(last_interaction_date, dateTo, notification.getOpenaireId(), null, null, "", "source", true, types, false) > 0) {
+                                List<String> managersByNotification = new ArrayList<>();
+                                managersByNotification.add(notification.getUserMail());
+
+                                // We need that to get name of community
+                                context = fetchContextHandler.fetchFirstContextByCommunityId(notification.getOpenaireId());
+
+                                logger.debug("Sending email for community claims between " + last_interaction_date + " and " + dateTo + " to " + notification.getUserMail());
+
+                                //send(context.getOpenaireId().split("::")[0], context.getTitle().split(">")[0], "community", managersByNotification);
+                            }
+                            Calendar cal = Calendar.getInstance();
+                            cal.setTime(_dateTo);
+                            cal.add(Calendar.SECOND, 1);
+                            _dateTo = cal.getTime();
+                            notificationHandler.updateNotificationLastInteractionDate(notification.getOpenaireId(), notification.getUserMail(), _dateTo);
+                            //update last interaction date (db)
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } catch (SQLStoreException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public void send(String openaire_id, String openaire_name, String type, /*String token,*/ List<String> managers) {
+        final String openaireClaimsPageUrl = openaireClaimsPage + openaire_id;//token;
+
         // Get system properties
         Properties properties = System.getProperties();
         properties.setProperty("mail.smtp.host", host);
@@ -137,6 +355,7 @@
 
             // Set To: header field of the header.
             for(String to : managers) {
+                logger.debug(to);
                 message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
             }
 
@@ -146,7 +365,7 @@
             // For simple text setText() can be used instead of setContent()
 
             // Send the actual HTML message, as big as you like
-            message.setContent("There are new Claims for the project: '" + project.getName() +"' for which you seem to be a contact person." +
+            message.setContent("There are new Claims for the "+type+": '" + openaire_name +"' for which you seem to be a contact person." +
                                         "<br>Click <a href=\""+openaireClaimsPageUrl+"\">here</a> to curate these Claims.", "text/html");
 
             // Send message
@@ -165,10 +384,18 @@
         this.fetchClaimHandler = fetchClaimHandler;
     }
 
-    public void setProjectHandler(ProjectHandler projectHandler) {
-        this.projectHandler = projectHandler;
+    public void setFetchProjectHandler(FetchProjectHandler fetchProjectHandler) {
+        this.fetchProjectHandler = fetchProjectHandler;
     }
 
+    public void setFetchNotificationHandler(FetchNotificationHandler fetchNotificationHandler) {
+        this.fetchNotificationHandler = fetchNotificationHandler;
+    }
+
+    public void setFetchContextHandler(FetchContextHandler fetchContextHandler) {
+        this.fetchContextHandler = fetchContextHandler;
+    }
+
     public static void setOpenaireClaimsPage(String openaireClaimsPage) {
         EmailSender.openaireClaimsPage = openaireClaimsPage;
     }
Index: modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/claimsDemo/CommunityUtils.java
===================================================================
--- modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/claimsDemo/CommunityUtils.java	(nonexistent)
+++ modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/claimsDemo/CommunityUtils.java	(revision 53202)
@@ -0,0 +1,88 @@
+package eu.dnetlib.data.claimsDemo;
+
+import com.google.gson.Gson;
+import org.apache.log4j.Logger;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+public class CommunityUtils {
+    private static String communityAPI;
+    String name;
+    List<String> managers = new ArrayList<String>();
+    private final static Logger log = Logger.getLogger(CommunityUtils.class);
+
+    public String getCommunityAPI() { return communityAPI; }
+    public void setCommunityAPI(String communityAPI) { CommunityUtils.communityAPI = communityAPI; }
+
+    public String getName() {
+        return name;
+    }
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List<String> getManagers() {
+        return managers;
+    }
+    public void setManagers(List<String> managers) {
+        this.managers = managers;
+    }
+
+    public static CommunityUtils getCommunityInfo(String community) {
+        String url = communityAPI + community;
+        URL obj = null;
+        String responseStr = null;
+        log.debug("Community info url is " + url);
+
+        try {
+            obj = new URL(url);
+            HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+            log.debug("User info response code is: " + con.getResponseCode());
+            if (con.getResponseCode() != 200) {
+                return null;
+            }
+            BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
+            StringBuffer response = new StringBuffer();
+            String inputLine;
+            while ((inputLine = in.readLine()) != null) {
+                response.append(inputLine).append("\n");
+            }
+            in.close();
+            responseStr = response.toString();
+        } catch (Exception e) {
+            log.error("An error occured while trying to fetch user info ", e);
+            return null;
+        }
+        return json2CommunityInfo(responseStr);
+    }
+    private static CommunityUtils json2CommunityInfo(String json){
+
+        log.debug("Try to create CommunityInfo class from json: "+json);
+        if (json == null){
+            return null;
+        }
+
+        BufferedReader br = new BufferedReader(new StringReader(json));
+        //convert the json string back to object
+        Gson gson = new Gson();
+        CommunityUtils communityInfo = null;
+        try {
+            communityInfo = gson.fromJson(br, CommunityUtils.class);
+        }catch(Exception e){
+            log.debug("Error in parsing json response. Given json is : "+json, e);
+            return null;
+        }
+
+        log.debug("Original response.........: "+communityInfo.toString());
+
+
+
+        return communityInfo;
+    }
+}
Index: modules/uoa-claims/trunk/src/main/resources/eu/dnetlib/data/claims/migration/springContext-claimsDemo.xml
===================================================================
--- modules/uoa-claims/trunk/src/main/resources/eu/dnetlib/data/claims/migration/springContext-claimsDemo.xml	(revision 53201)
+++ modules/uoa-claims/trunk/src/main/resources/eu/dnetlib/data/claims/migration/springContext-claimsDemo.xml	(revision 53202)
@@ -74,6 +74,12 @@
         <property name="sqlDAO" ref="sqlDao"/>
     </bean>
 
+    <bean id="fetchContextHandler" class="eu.dnetlib.data.claims.migration.handler.FetchContextHandler">
+        <property name="sqlDAO" ref="sqlDao"/>
+        <property name="queryGenerator" ref="queryGenerator"/>
+
+    </bean>
+
     <bean id="contextRelationHandler" class="eu.dnetlib.data.claims.migration.handler.ContextRelationHandler">
         <property name="sqlDAO" ref="sqlDao"/>
         <property name="queryGenerator" ref="queryGenerator"/>
@@ -109,7 +115,9 @@
 
     <bean id="emailSender" class="eu.dnetlib.data.emailSender.EmailSender">
         <property name="fetchClaimHandler" ref="fetchClaimHandler"/>
-        <property name="projectHandler" ref="projectHandler"/>
+        <property name="fetchProjectHandler" ref="fetchProjectHandler"/>
+        <property name="fetchNotificationHandler" ref="fetchNotificationHandler"/>
+        <property name="fetchContextHandler" ref="fetchContextHandler"/>
         <property name="openaireClaimsPage" value="${services.claims.mail.angularUrl}"/>
         <property name="username" value="${services.claims.mail.from}"/>
         <property name="password" value="${services.claims.mail.password}"/>
@@ -118,6 +126,10 @@
         <property name="from" value="${services.claims.mail.from}"/>
         <property name="specialRecipients" value="${services.claims.mail.specialRecipients}"/>
     </bean>
+
+    <bean id="CommunityUtils" class="eu.dnetlib.data.claimsDemo.CommunityUtils">
+        <property name="communityAPI" value="${services.claimsDemo.communityAPI}"/>
+    </bean>
     
     <bean id="sqlStore" class="eu.dnetlib.data.claimsDemo.SqlStore" init-method="init" destroy-method="destroy">
         <property name="dbUser" value="${services.claimsDemo.db.username}"/>
Index: modules/uoa-claims/trunk/src/main/resources/eu/dnetlib/data/claims/migration/springContext-claimsDemo.properties
===================================================================
--- modules/uoa-claims/trunk/src/main/resources/eu/dnetlib/data/claims/migration/springContext-claimsDemo.properties	(revision 53201)
+++ modules/uoa-claims/trunk/src/main/resources/eu/dnetlib/data/claims/migration/springContext-claimsDemo.properties	(revision 53202)
@@ -5,6 +5,8 @@
 services.claimsDemo.db.password = snowflakes
 services.claimsDemo.useProductionIndex = false
 
+services.claimsDemo.communityAPI = https://dev-openaire.d4science.org/openaire/community/
+
 #email properties
 ## EMAIL SETTINGS
 services.claims.mail.host = smtp.gmail.com
@@ -20,3 +22,4 @@
 #old version
 #services.claims.directClaimAPIUrl = http://beta.services.openaire.eu:8280/is/mvc/api/publications
 services.claims.directClaimAPIUrl = http://beta.services.openaire.eu:8980/provision/mvc/api/results
+
