Package org.dspace.qaevent.service
Interface QAEventService
- All Known Implementing Classes:
QAEventServiceImpl
public interface QAEventService
Service that handles
QAEvent.- Author:
- Andrea Bollini (andrea.bollini at 4science.it)
-
Method Summary
Modifier and TypeMethodDescriptionlongcountEventsByTopic(Context context, String sourceName, String topic) Find all the events by topic.longcountEventsByTopicAndTarget(Context context, String source, String topic, UUID target) Count the QA events related to the specified topic and targetlongcountSources(Context context) Count all the event's sources.longcountSourcesByTarget(Context context, UUID target) Count all the event's sources related to a specific itemlongCount all the event's topics.longcountTopicsBySource(Context context, String source) Count all the event's topics related to the given source.longcountTopicsBySourceAndTarget(Context context, String source, UUID target) Count all the event's topics related to the given source referring to a specific itemvoidDelete an event by the given id.voiddeleteEventsByTargetId(UUID targetId) Delete events by the given target id.findAllSources(Context context, long offset, int pageSize) Find all the event's sources.findAllSourcesByTarget(Context context, UUID target, long offset, int pageSize) Find all the event's sources related to a specific itemfindAllTopics(Context context, long offset, long count, String orderField, boolean ascending) Find all the event's topics.findAllTopicsBySource(Context context, String source, long offset, long count, String orderField, boolean ascending) Find all the event's topics related to the given source.findAllTopicsBySourceAndTarget(Context context, String source, UUID target, long offset, long pageSize, String orderField, boolean ascending) Find all the event's topics related to the given source for a specific itemFind an event by the given id.findEventsByTopic(Context context, String sourceName, String topic, long offset, int size, String orderField, boolean ascending) Find all the events by topic.findEventsByTopicAndTarget(Context context, String source, String topic, UUID target, long offset, int pageSize) Find a list of QA events according to the pagination parameters for the specified topic and target sorted by trust descendingfindSource(Context context, String source) Find a specific source by the given name.findSource(Context context, String source, UUID target) Find a specific source by the given name including the stats focused on the target item.findTopicBySourceAndNameAndTarget(Context context, String sourceName, String topicName, UUID target) Find a specific topic by its name, source and optionally a target.findTopicByTopicId(String topicId) Find a specific topid by the given id.booleanisRelatedItemSupported(QAEvent qaevent) Check if the given QA event supports a related item.booleanqaEventsInSource(Context context, EPerson user, String eventId, String source) Check if a qaevent with the provided id is visible to the current user according to the source securityvoidStore the given event.
-
Method Details
-
findAllTopics
List<QATopic> findAllTopics(Context context, long offset, long count, String orderField, boolean ascending) Find all the event's topics.- Parameters:
context- the DSpace contextoffset- the offset to applyorderField- the field to order forascending- true if the order should be ascending, false otherwise- Returns:
- the topics list
-
findAllTopicsBySource
List<QATopic> findAllTopicsBySource(Context context, String source, long offset, long count, String orderField, boolean ascending) Find all the event's topics related to the given source.- Parameters:
context- the DSpace contextsource- the source to search foroffset- the offset to applycount- the page sizeorderField- the field to order forascending- true if the order should be ascending, false otherwise- Returns:
- the topics list
-
findTopicBySourceAndNameAndTarget
QATopic findTopicBySourceAndNameAndTarget(Context context, String sourceName, String topicName, UUID target) Find a specific topic by its name, source and optionally a target.- Parameters:
context- the DSpace contextsourceName- the name of the sourcetopicName- the topic name to search fortarget- (nullable) the uuid of the target to focus on- Returns:
- the topic
-
countTopics
long countTopics()Count all the event's topics.- Returns:
- the count result
-
countTopicsBySource
Count all the event's topics related to the given source.- Parameters:
context- the DSpace contextsource- the source to search for- Returns:
- the count result
-
findEventsByTopic
List<QAEvent> findEventsByTopic(Context context, String sourceName, String topic, long offset, int size, String orderField, boolean ascending) Find all the events by topic.- Parameters:
context- the DSpace contextsourceName- the source nametopic- the topic to search foroffset- the offset to applysize- the page sizeorderField- the field to order forascending- true if the order should be ascending, false otherwise- Returns:
- the events
-
countEventsByTopic
Find all the events by topic.- Parameters:
context- the DSpace contextsourceName- the source nametopic- the topic to search for- Returns:
- the events count
-
findEventByEventId
Find an event by the given id. Please note that no security filter are applied by this method.- Parameters:
id- the id of the event to search for- Returns:
- the event
-
store
Store the given event.- Parameters:
context- the DSpace contextevent- the event to store
-
deleteEventByEventId
Delete an event by the given id.- Parameters:
id- the id of the event to delete
-
deleteEventsByTargetId
Delete events by the given target id.- Parameters:
targetId- the id of the target id
-
findTopicByTopicId
Find a specific topid by the given id.- Parameters:
topicId- the topic id to search for- Returns:
- the topic
-
findSource
Find a specific source by the given name.- Parameters:
context- the DSpace contextsource- the source name- Returns:
- the source
-
findSource
Find a specific source by the given name including the stats focused on the target item.- Parameters:
context- the DSpace contextsource- the source nametarget- the uuid of the item target- Returns:
- the source
-
findAllSources
Find all the event's sources.- Parameters:
context- the DSpace contextoffset- the offset to applypageSize- the page size- Returns:
- the sources list
-
countSources
Count all the event's sources.- Parameters:
context- the DSpace context- Returns:
- the count result
-
countSourcesByTarget
Count all the event's sources related to a specific item- Parameters:
context- the DSpace contexttarget- the item uuid- Returns:
- the count result
-
countTopicsBySourceAndTarget
Count all the event's topics related to the given source referring to a specific item- Parameters:
context- the DSpace contexttarget- the item uuidsource- the source to search for- Returns:
- the count result
-
isRelatedItemSupported
Check if the given QA event supports a related item.- Parameters:
qaevent- the event to be verified- Returns:
- true if the event supports a related item, false otherwise.
-
findEventsByTopicAndTarget
List<QAEvent> findEventsByTopicAndTarget(Context context, String source, String topic, UUID target, long offset, int pageSize) Find a list of QA events according to the pagination parameters for the specified topic and target sorted by trust descending- Parameters:
context- the DSpace contextsource- the source nametopic- the topic to search foroffset- the offset to applypageSize- the page sizetarget- the uuid of the QA event's target- Returns:
- the events
-
qaEventsInSource
Check if a qaevent with the provided id is visible to the current user according to the source security- Parameters:
context- the DSpace contextuser- the user to consider for the security checkeventId- the id of the event to check for existencesource- the qa source name- Returns:
trueif the event exists
-
countEventsByTopicAndTarget
Count the QA events related to the specified topic and target- Parameters:
context- the DSpace contextsource- the source nametopic- the topic to search fortarget- the uuid of the QA event's target- Returns:
- the count result
-
findAllSourcesByTarget
Find all the event's sources related to a specific item- Parameters:
context- the DSpace contexttarget- the item referring tooffset- the offset to applypageSize- the page size- Returns:
- the source list
-
findAllTopicsBySourceAndTarget
List<QATopic> findAllTopicsBySourceAndTarget(Context context, String source, UUID target, long offset, long pageSize, String orderField, boolean ascending) Find all the event's topics related to the given source for a specific item- Parameters:
context- the DSpace contextsource- (not null) the source to search fortarget- the item referring tooffset- the offset to applypageSize- the page size- Returns:
- the topics list
-