Revision 53202
Added by Konstantina Galouni over 5 years ago
FetchClaimHandler.java | ||
---|---|---|
125 | 125 |
ResultSet rs = sqlDAO.executePreparedQuery(query, params); |
126 | 126 |
return fetchClaimsByResultSet(rs, addCurationInfo); |
127 | 127 |
} |
128 |
/** |
|
129 |
* |
|
130 |
* @param dateFrom |
|
131 |
* @param dataTo |
|
132 |
* @param openaireId for project |
|
133 |
* @param limit returns at most 'limit' claims (use -1 or null for no limit) |
|
134 |
* @param offset returns claims after 'offset' position (null for no offset) |
|
135 |
* @return |
|
136 |
* @throws Exception |
|
137 |
*/ |
|
138 |
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 { |
|
139 |
ArrayList<Object> params = new ArrayList<>(); |
|
140 |
String query = queryGenerator.generateFetchNumberOfClaimsByDateAndOpenaireId(dateFrom, dataTo, openaireId, limit, offset,keyword, orderField, descending,types, params); |
|
141 |
ResultSet rs = sqlDAO.executePreparedQuery(query, params); |
|
142 |
return countClaimsByResultSet(rs); |
|
143 |
} |
|
128 | 144 |
|
129 | 145 |
/** |
130 | 146 |
* |
Also available in: Unified diff
1. FetchClaimHandler.java: add method fetchNumberOfClaimsByDateAndOpenaireId.
2. CommunityUtils.java: request datasource API to get community information (including managers).
3. FetchContextHandler.java: Method fetchFirstContextByCommunityId to parse name of community to be used in the above API.
4. EmailSender.java: Completely changed:
No token in project | send emails to project AND community managers | send emails according to notification table - if no preferences (no entry in table), use default settings.
5. springContext-claimsDemo.properties: Add property 'communityAPI'.
6. springContext-claimsDemo.xml: Add beans 'fetchContextHandler', 'CommunityUtils', properties for EmailSender.