Revision 47029
Added by Antonis Lempesis over 7 years ago
modules/uoa-api/tags/uoa-api-1.2.1/trunk/deploy.info | ||
---|---|---|
1 |
|
|
2 |
{ |
|
3 |
"type_source": "SVN", |
|
4 |
"goal": "package -U -T 4C source:jar", |
|
5 |
"url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-api/trunk", |
|
6 |
"deploy_repository": "dnet4-snapshots", |
|
7 |
"version": "4", |
|
8 |
"mail": "antleb@di.uoa.gr, kiatrop@di.uoa.gr", |
|
9 |
"deploy_repository_url": "http://maven.research-infrastructures.eu/nexus/content/repositories/dnet4-snapshots", |
|
10 |
"name": "uoa-api" |
|
11 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/ValidatorService.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import eu.dnetlib.api.DriverService; |
|
6 |
import eu.dnetlib.domain.functionality.validator.JobForValidation; |
|
7 |
import eu.dnetlib.domain.functionality.validator.RuleSet; |
|
8 |
import eu.dnetlib.domain.functionality.validator.StoredJob; |
|
9 |
|
|
10 |
public interface ValidatorService extends DriverService { |
|
11 |
|
|
12 |
StoredJob getStoredJob(int jobId, String groupBy) throws ValidatorServiceException; |
|
13 |
|
|
14 |
List<StoredJob> getStoredJobs(String userMail, String jobType, Integer offset, Integer limit, String dateFrom, String dateTo) throws ValidatorServiceException; |
|
15 |
|
|
16 |
int getStoredJobsTotalNumber(String userMail, String jobType) throws ValidatorServiceException; |
|
17 |
|
|
18 |
List<StoredJob> getStoredJobsNew(String userMail, String jobType, Integer offset, Integer limit, String dateFrom, String dateTo, String jobStatus) throws ValidatorServiceException; |
|
19 |
|
|
20 |
int getStoredJobsTotalNumberNew(String userMail, String jobType, String jobStatus) throws ValidatorServiceException; |
|
21 |
|
|
22 |
List<RuleSet> getRuleSets() throws ValidatorServiceException; |
|
23 |
|
|
24 |
void submitValidationJob(JobForValidation job) throws ValidatorServiceException; |
|
25 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/ConversionService.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import eu.dnetlib.api.DriverService; |
|
4 |
import eu.dnetlib.domain.functionality.ConversionStatus; |
|
5 |
|
|
6 |
public interface ConversionService extends DriverService { |
|
7 |
|
|
8 |
/** |
|
9 |
* Adds a conversion job |
|
10 |
* @param fileUrl the url of the file to be converted |
|
11 |
* @param format the desired format |
|
12 |
* @return the {@link ConversionStatus} of the conversion job |
|
13 |
* @throws ConversionServiceException |
|
14 |
*/ |
|
15 |
public ConversionStatus addJob(String fileUrl, String format) |
|
16 |
throws ConversionServiceException; |
|
17 |
/** |
|
18 |
* The {@link ConversionStatus} of a conversion job |
|
19 |
* @param conversionId the id of the conversion job |
|
20 |
* @return the {@link ConversionStatus} |
|
21 |
* @throws ConversionServiceException |
|
22 |
*/ |
|
23 |
public ConversionStatus getStatus(String conversionId) |
|
24 |
throws ConversionServiceException; |
|
25 |
|
|
26 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/AlertServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
/** |
|
4 |
* This exception is thrown by alert service if any errors occur. |
|
5 |
* @author thanos@di.uoa.gr |
|
6 |
* @see AlertService |
|
7 |
* |
|
8 |
*/ |
|
9 |
public class AlertServiceException extends Exception { |
|
10 |
private static final long serialVersionUID = 1L; |
|
11 |
|
|
12 |
/** |
|
13 |
* Construct a new alert service exception with the specified message and cause. |
|
14 |
* @param message the message |
|
15 |
* @param cause the cause |
|
16 |
*/ |
|
17 |
public AlertServiceException(final String message, final Throwable cause) { |
|
18 |
super(message, cause); |
|
19 |
} |
|
20 |
|
|
21 |
/** |
|
22 |
* Construct a new alert service exception with the specified message. |
|
23 |
* @param message the message |
|
24 |
*/ |
|
25 |
public AlertServiceException(final String message) { |
|
26 |
super(message); |
|
27 |
} |
|
28 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/NotificationService.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import java.net.URL; |
|
4 |
import java.util.Date; |
|
5 |
import java.util.SortedSet; |
|
6 |
|
|
7 |
import eu.dnetlib.api.DriverService; |
|
8 |
import eu.dnetlib.domain.functionality.NotificationEvent; |
|
9 |
import eu.dnetlib.domain.functionality.NotificationQuery; |
|
10 |
import eu.dnetlib.domain.functionality.NotificationResult; |
|
11 |
import eu.dnetlib.domain.functionality.NotificationSchedule; |
|
12 |
import eu.dnetlib.domain.functionality.NotificationSubscription; |
|
13 |
import eu.dnetlib.domain.functionality.ObjectPage; |
|
14 |
import eu.dnetlib.domain.functionality.ResultPage; |
|
15 |
|
|
16 |
/** |
|
17 |
* This interface declares the available methods of notification service. Alert service is used to manage queries, schedules, events, results and subscriptions. |
|
18 |
* @author thanos@di.uoa.gr |
|
19 |
* @see eu.dnetlib.domain.functionality.NotificationQuery |
|
20 |
* @see eu.dentlib.domain.functionality.NotificationSchedule |
|
21 |
* @see eu.dnetlib.domain.functionality.NotificationEvent |
|
22 |
* @see eu.dnetlib.domain.functionality.NotificationResult |
|
23 |
* @see eu.dnetlib.domain.functionality.NotificationSubscription |
|
24 |
* @see NotificationServiceException |
|
25 |
* |
|
26 |
*/ |
|
27 |
public interface NotificationService extends DriverService { |
|
28 |
/** |
|
29 |
* Retrieve all the supported languages in which queries can be expressed. |
|
30 |
* @return a set containing all the supported languages in which queries can be expressed |
|
31 |
*/ |
|
32 |
public SortedSet<String> getSupportedQueryLanguages(); |
|
33 |
|
|
34 |
/** |
|
35 |
* Retrieve a page of queries. |
|
36 |
* @param pageNumber the number of the page to retrieve |
|
37 |
* @param pageSize the size of the page to retrieve |
|
38 |
* @return an object page containing queries |
|
39 |
* @throws NotificationServiceException if any errors occur |
|
40 |
*/ |
|
41 |
public ObjectPage<NotificationQuery> getQueries(final int pageNumber, final int pageSize) throws NotificationServiceException; |
|
42 |
|
|
43 |
/** |
|
44 |
* Add a query. |
|
45 |
* @param query the query to add |
|
46 |
* @throws NotificationServiceException if any errors occur |
|
47 |
*/ |
|
48 |
public void addQuery(final NotificationQuery query) throws NotificationServiceException; |
|
49 |
|
|
50 |
/** |
|
51 |
* Remove a query. |
|
52 |
* @param queryId the unique identifier of the query to remove |
|
53 |
* @throws NotificationServiceException if any errors occur |
|
54 |
*/ |
|
55 |
public void removeQuery(final String queryId) throws NotificationServiceException; |
|
56 |
|
|
57 |
/** |
|
58 |
* Execute a query and return the generated result. |
|
59 |
* @param queryId the unique identifier of the query to execute |
|
60 |
* @param resultId the unique result identifier to use |
|
61 |
* @param fromDate the from date to use |
|
62 |
* @param toDate the to date to use |
|
63 |
* @param limit the limit to use |
|
64 |
* @param offset the offset to use |
|
65 |
* @return a result page containing the generated result |
|
66 |
* @throws NotificationServiceException if any errors occur |
|
67 |
*/ |
|
68 |
public ResultPage executeQuery(final String queryId, final String resultId, final Date fromDate, final Date toDate, final int limit, final int offset) throws NotificationServiceException; |
|
69 |
|
|
70 |
/** |
|
71 |
* Retrieve a page of schedules. |
|
72 |
* @param pageNumber the number of the page to retrieve |
|
73 |
* @param pageSize the size of the page to retrieve |
|
74 |
* @return an object page containing schedules |
|
75 |
* @throws NotificationServiceException if any errors occur |
|
76 |
*/ |
|
77 |
public ObjectPage<NotificationSchedule> getSchedules(final int pageNumber, final int pageSize) throws NotificationServiceException; |
|
78 |
|
|
79 |
/** |
|
80 |
* Add a schedule. |
|
81 |
* @param schedule the schedule to add |
|
82 |
* @throws NotificationServiceException if any errors occur |
|
83 |
*/ |
|
84 |
public void addSchedule(final NotificationSchedule schedule) throws NotificationServiceException; |
|
85 |
|
|
86 |
/** |
|
87 |
* Enable a schedule. |
|
88 |
* @param queryId the unique identifier of the query whose schedule to enable |
|
89 |
* @throws NotificationServiceException if any errors occur |
|
90 |
*/ |
|
91 |
public void enableSchedule(final String queryId) throws NotificationServiceException; |
|
92 |
|
|
93 |
/** |
|
94 |
* Disable a schedule. |
|
95 |
* @param queryId the unique identifier of the query whose schedule to disable |
|
96 |
* @throws NotificationServiceException if any errors occur |
|
97 |
*/ |
|
98 |
public void disableSchedule(final String queryId) throws NotificationServiceException; |
|
99 |
|
|
100 |
/** |
|
101 |
* Remove a schedule. |
|
102 |
* @param queryId the unique identifier of the query of the schedule to remove |
|
103 |
* @throws NotificationServiceException if any errors occur |
|
104 |
*/ |
|
105 |
public void removeSchedule(final String queryId) throws NotificationServiceException; |
|
106 |
|
|
107 |
/** |
|
108 |
* Retrieve a page of events. |
|
109 |
* @param pageNumber the number of the page to retrieve |
|
110 |
* @param pageSize the size of the page to retrieve |
|
111 |
* @return an object page containing events |
|
112 |
* @throws NotificationServiceException if any errors occur |
|
113 |
*/ |
|
114 |
public ObjectPage<NotificationEvent> getEvents(final int pageNumber, final int pageSize) throws NotificationServiceException; |
|
115 |
|
|
116 |
/** |
|
117 |
* Retrieve a page of results. |
|
118 |
* @param pageNumber the number of the page to retrieve |
|
119 |
* @param pageSize the size of the page to retrieve |
|
120 |
* @return an object page containing results |
|
121 |
* @throws NotificationServiceException if any errors occur |
|
122 |
*/ |
|
123 |
public ObjectPage<NotificationResult> getResults(final int pageNumber, final int pageSize) throws NotificationServiceException; |
|
124 |
|
|
125 |
/** |
|
126 |
* Retrieve a result of an event of a query. |
|
127 |
* @param queryId the unique identifier of the query of the event of the result to retrieve |
|
128 |
* @param date the date corresponding to the event of the result to retrieve |
|
129 |
* @param resultId the unique identifier of the result to retrieve |
|
130 |
* @return the specified result of the specified event of the specified query or null if no such result exists |
|
131 |
* @throws NotificationServiceException if any errors occur |
|
132 |
*/ |
|
133 |
public NotificationResult getResult(final String queryId, final Date date, final String resultId) throws NotificationServiceException; |
|
134 |
|
|
135 |
/** |
|
136 |
* Retrieve a result of the previous event of an event of a query. |
|
137 |
* @param queryId the unique identifier of the query of the event of the result to retrieve |
|
138 |
* @param date the date corresponding to the next event of the event whose result to retrieve |
|
139 |
* @param resultId the unique identifier of the result to retrieve |
|
140 |
* @return the specified result of the previous event of the specified event of the specified query or null if no such result exists |
|
141 |
* @throws NotificationServiceException if any errors occur |
|
142 |
*/ |
|
143 |
public NotificationResult getPreviousResult(final String queryId, final Date date, final String resultId) throws NotificationServiceException; |
|
144 |
|
|
145 |
/** |
|
146 |
* Retrieve a page of subscriptions. |
|
147 |
* @param pageNumber the number of the page to retrieve |
|
148 |
* @param pageSize the size of the page to retrieve |
|
149 |
* @return an object page containign subscriptions |
|
150 |
* @throws NotificationServiceException if any errors occur |
|
151 |
*/ |
|
152 |
public ObjectPage<NotificationSubscription> getSubscriptions(final int pageNumber, final int pageSize) throws NotificationServiceException; |
|
153 |
|
|
154 |
/** |
|
155 |
* Add a subscription. |
|
156 |
* @param subscription the subscription to add |
|
157 |
* @throws NotificationServiceException if any errors occur |
|
158 |
*/ |
|
159 |
public void addSubscription(final NotificationSubscription subscription) throws NotificationServiceException; |
|
160 |
|
|
161 |
/** |
|
162 |
* Enable a subscription. |
|
163 |
* @param queryId the unique identifier of the query of the schedule of the subscription to enable |
|
164 |
* @param alertService the URL of the alert service of the subscription to enable |
|
165 |
* @throws NotificationServiceException if any errors occur |
|
166 |
*/ |
|
167 |
public void enableSubscription(final String queryId, final URL alertService) throws NotificationServiceException; |
|
168 |
|
|
169 |
/** |
|
170 |
* Disable a subscription. |
|
171 |
* @param queryId the unique identifier of the query of the schedule of the subscription to disable |
|
172 |
* @param alertService the URL of the alert service of the subscription to disable |
|
173 |
* @throws NotificationServiceException if any errors occur |
|
174 |
*/ |
|
175 |
public void disableSubscription(final String queryId, final URL alertService) throws NotificationServiceException; |
|
176 |
|
|
177 |
/** |
|
178 |
* Remove a subscription. |
|
179 |
* @param queryId the unique identifier of the query of the schedule of the subscription to remove |
|
180 |
* @param alertService the URL of the alert service of the subscription to remove |
|
181 |
* @throws NotificationServiceException if any errors occur |
|
182 |
*/ |
|
183 |
public void removeSubscription(final String queryId, final URL alertService) throws NotificationServiceException; |
|
184 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/ForumService.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import eu.dnetlib.api.DriverService; |
|
6 |
import eu.dnetlib.domain.functionality.Post; |
|
7 |
import eu.dnetlib.domain.functionality.Thread; |
|
8 |
|
|
9 |
/** |
|
10 |
* This interface describes the available methods of a forum service. |
|
11 |
* @author thanos@di.uoa.gr |
|
12 |
* |
|
13 |
*/ |
|
14 |
public interface ForumService extends DriverService { |
|
15 |
/** |
|
16 |
* Open a new thread. |
|
17 |
* @param communityId the id of the community that the thread belongs to |
|
18 |
* @param userId the id of the user that opens the thread |
|
19 |
* @param topic the topic of the thread |
|
20 |
* @return the id of the thread just opened |
|
21 |
* @throws ForumServiceException if any errors occur |
|
22 |
*/ |
|
23 |
public long openThread(String communityId, String userId, String topic) throws ForumServiceException; |
|
24 |
|
|
25 |
/** |
|
26 |
* Edit an existing thread. |
|
27 |
* @param threadId the id of the thread to edit |
|
28 |
* @param topic the new topic of the thread |
|
29 |
* @param posts the new posts of the thread |
|
30 |
* @throws ForumServiceException if any errors occur |
|
31 |
*/ |
|
32 |
public void editThread(long threadId, String topic, List<Post> posts) throws ForumServiceException; |
|
33 |
|
|
34 |
/** |
|
35 |
* Delete an existing thread. |
|
36 |
* @param threadId the id of the thread to delete |
|
37 |
* @throws ForumServiceException if any errors occur |
|
38 |
*/ |
|
39 |
public void deleteThread(long threadId) throws ForumServiceException; |
|
40 |
|
|
41 |
/** |
|
42 |
* Search for an existing thread by id. |
|
43 |
* @param threadId the id of the thread to search for |
|
44 |
* @return the thread with the specified id or null if no such thread exists |
|
45 |
* @throws ForumServiceException if any errors occur |
|
46 |
*/ |
|
47 |
public Thread searchThread(long threadId) throws ForumServiceException; |
|
48 |
|
|
49 |
/** |
|
50 |
* Search for existing threads by community. |
|
51 |
* @param communityId the id of the community the threads belong to |
|
52 |
* @return a list containing all the threads that belong to the specified community |
|
53 |
* @throws ForumServiceException if any errors occur |
|
54 |
*/ |
|
55 |
public List<Thread> searchThread(String communityId) throws ForumServiceException; |
|
56 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/CollectionService.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import eu.dnetlib.api.DriverService; |
|
6 |
import eu.dnetlib.domain.functionality.Collection; |
|
7 |
import eu.dnetlib.domain.functionality.CollectionSearchCriteria; |
|
8 |
|
|
9 |
public interface CollectionService extends DriverService { |
|
10 |
|
|
11 |
public Collection getCollection(String collectionId) |
|
12 |
throws CollectionServiceException; |
|
13 |
|
|
14 |
public List<Collection> getCollections(List<String> collectionIds) |
|
15 |
throws CollectionServiceException; |
|
16 |
|
|
17 |
public void updateCollection(Collection collection) |
|
18 |
throws CollectionServiceException; |
|
19 |
|
|
20 |
public void deleteCollection(String collectionId) |
|
21 |
throws CollectionServiceException; |
|
22 |
|
|
23 |
public String createCollection(Collection collection) |
|
24 |
throws CollectionServiceException; |
|
25 |
|
|
26 |
public List<Collection> searchCollections(CollectionSearchCriteria criteria) |
|
27 |
throws CollectionServiceException; |
|
28 |
} |
|
29 | 0 |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/WebInterfaceService.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import eu.dnetlib.api.DriverService; |
|
4 |
|
|
5 |
/** |
|
6 |
* The webInterface service interface |
|
7 |
* |
|
8 |
*/ |
|
9 |
public interface WebInterfaceService extends DriverService { |
|
10 |
|
|
11 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/UserProfileService.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import eu.dnetlib.api.DriverService; |
|
6 |
import eu.dnetlib.domain.functionality.UserProfile; |
|
7 |
import eu.dnetlib.domain.functionality.UserProfileSearchCriteria; |
|
8 |
|
|
9 |
/** |
|
10 |
* Class that manages UserProfile objects. |
|
11 |
*/ |
|
12 |
public interface UserProfileService extends DriverService { |
|
13 |
|
|
14 |
public UserProfile saveUser(UserProfile profile) |
|
15 |
throws UserProfileServiceException; |
|
16 |
|
|
17 |
public void deleteUser(UserProfile profile) |
|
18 |
throws UserProfileServiceException; |
|
19 |
|
|
20 |
public void deleteUserById(String id) throws UserProfileServiceException; |
|
21 |
|
|
22 |
public UserProfile getUserById(String id) |
|
23 |
throws UserProfileServiceException; |
|
24 |
|
|
25 |
public List<UserProfile> searchUsers(UserProfileSearchCriteria criteria) |
|
26 |
throws UserProfileServiceException; |
|
27 |
|
|
28 |
public List<String> searchUserIds(UserProfileSearchCriteria criteria) |
|
29 |
throws UserProfileServiceException; |
|
30 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/CommunityServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import eu.dnetlib.api.DriverServiceException; |
|
4 |
|
|
5 |
|
|
6 |
public class CommunityServiceException extends DriverServiceException { |
|
7 |
private static final long serialVersionUID = 8752304807357459107L; |
|
8 |
|
|
9 |
public CommunityServiceException() { |
|
10 |
super(); |
|
11 |
} |
|
12 |
|
|
13 |
public CommunityServiceException(String message, Throwable cause) { |
|
14 |
super(message, cause); |
|
15 |
} |
|
16 |
|
|
17 |
public CommunityServiceException(String message) { |
|
18 |
super(message); |
|
19 |
} |
|
20 |
|
|
21 |
public CommunityServiceException(Throwable cause) { |
|
22 |
super(cause); |
|
23 |
} |
|
24 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/RatingServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
public class RatingServiceException extends Exception { |
|
4 |
|
|
5 |
/** |
|
6 |
* Used for serialization / deserialization. |
|
7 |
*/ |
|
8 |
private static final long serialVersionUID = 1L; |
|
9 |
|
|
10 |
/** |
|
11 |
* Create a new rating service exception. |
|
12 |
* |
|
13 |
*/ |
|
14 |
public RatingServiceException() { |
|
15 |
super(); |
|
16 |
} |
|
17 |
|
|
18 |
/** |
|
19 |
* Create a new rating service exception with the specified error message. |
|
20 |
* @param message the error message |
|
21 |
*/ |
|
22 |
public RatingServiceException(String message) { |
|
23 |
super(message); |
|
24 |
} |
|
25 |
|
|
26 |
/** |
|
27 |
* Create a new rating service exception with the specified cause. |
|
28 |
* @param cause the cause |
|
29 |
*/ |
|
30 |
public RatingServiceException(Throwable cause) { |
|
31 |
super(cause); |
|
32 |
} |
|
33 |
|
|
34 |
/** |
|
35 |
* Create a new rating service exception with the specified error message and cause. |
|
36 |
* @param message the error message |
|
37 |
* @param cause the cause |
|
38 |
*/ |
|
39 |
public RatingServiceException(String message, Throwable cause) { |
|
40 |
super(message, cause); |
|
41 |
} |
|
42 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/ConversionServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
@SuppressWarnings("serial") |
|
4 |
public class ConversionServiceException extends Exception { |
|
5 |
public ConversionServiceException() { |
|
6 |
super(); |
|
7 |
} |
|
8 |
|
|
9 |
public ConversionServiceException(String message, Throwable cause) { |
|
10 |
super(message, cause); |
|
11 |
} |
|
12 |
|
|
13 |
public ConversionServiceException(String message) { |
|
14 |
super(message); |
|
15 |
} |
|
16 |
|
|
17 |
public ConversionServiceException(Throwable cause) { |
|
18 |
super(cause); |
|
19 |
} |
|
20 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/RecommendationService.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import java.util.Date; |
|
4 |
import java.util.List; |
|
5 |
import java.util.Set; |
|
6 |
|
|
7 |
import eu.dnetlib.api.DriverService; |
|
8 |
import eu.dnetlib.domain.functionality.Recommendation; |
|
9 |
|
|
10 |
/** |
|
11 |
* The class that manages Recommendation objects |
|
12 |
*/ |
|
13 |
public interface RecommendationService extends DriverService { |
|
14 |
|
|
15 |
/** |
|
16 |
* creates a new recommendation of type announcement |
|
17 |
* |
|
18 |
* @param recommendationText |
|
19 |
* the text of the recommendation |
|
20 |
* @param creationDate |
|
21 |
* the creation date of the announcement |
|
22 |
* @param expirationDate |
|
23 |
* the date the announcement expires |
|
24 |
* @return the id of the new recommendation |
|
25 |
* @throws RecommendationWebServiceException |
|
26 |
* if the announcement cannot be created |
|
27 |
*/ |
|
28 |
public String generateAnnouncement(int index, boolean active, |
|
29 |
String announcementTitle, String announcementText, |
|
30 |
Date creationDate, Date expirationDate) |
|
31 |
throws RecommendationServiceException; |
|
32 |
|
|
33 |
/** |
|
34 |
* Swap the index of 2 announcements |
|
35 |
* |
|
36 |
* @param announcementId1 |
|
37 |
* the id of the fist announcement |
|
38 |
* @param announcementId2 |
|
39 |
* the id of the second announcement |
|
40 |
*/ |
|
41 |
public void swapAnnouncements(String announcementId1, String announcementId2) |
|
42 |
throws RecommendationServiceException; |
|
43 |
|
|
44 |
/** |
|
45 |
* Swap the index of 2 user recommendaitons |
|
46 |
* |
|
47 |
* @param announcementId1 |
|
48 |
* the id of the fist announcement |
|
49 |
* @param announcementId2 |
|
50 |
* the id of the second announcement |
|
51 |
*/ |
|
52 |
public void swapUserRecommendations(String announcementId1, String announcementId2) |
|
53 |
throws RecommendationServiceException;; |
|
54 |
|
|
55 |
/** |
|
56 |
* Swap the index of 2 community recommendations |
|
57 |
* |
|
58 |
* @param announcementId1 |
|
59 |
* the id of the fist announcement |
|
60 |
* @param announcementId2 |
|
61 |
* the id of the second announcement |
|
62 |
*/ |
|
63 |
public void swapCommunityRecommendations(String announcementId1, String announcementId2) |
|
64 |
throws RecommendationServiceException; |
|
65 |
|
|
66 |
/** |
|
67 |
* creates a new recommendation |
|
68 |
* |
|
69 |
* @param index |
|
70 |
* the recommendation index |
|
71 |
* @param active |
|
72 |
* the state of the recommendaiton, is it active or not #param |
|
73 |
* title the title of the recommendation |
|
74 |
* @param rText |
|
75 |
* the recommendation text |
|
76 |
* @param creationDate |
|
77 |
* the date the recommendation was created |
|
78 |
* @param expirationDate |
|
79 |
* the date the recommendation expires |
|
80 |
* @return the id of the recommendation |
|
81 |
* @throws RecommendationServiceException |
|
82 |
* if the recommendation cannot be created |
|
83 |
*/ |
|
84 |
public Recommendation generateRecommendation(int index, boolean active, |
|
85 |
String title, String recommendationText, Date creationDate, |
|
86 |
Date expirationDate) throws RecommendationServiceException; |
|
87 |
|
|
88 |
/** |
|
89 |
* creates a new recommendation of type community |
|
90 |
* |
|
91 |
* @param recommendationText |
|
92 |
* the recommendation text |
|
93 |
* @param creationDate |
|
94 |
* @param expirationDate |
|
95 |
* @param communityId |
|
96 |
* the ids of the associated communities |
|
97 |
* @return the id of the recommendation |
|
98 |
* @throws RecommendationServiceException |
|
99 |
* if the community recommendation cannot be created |
|
100 |
*/ |
|
101 |
public String generateCommunityRecommendation(int index, boolean active, |
|
102 |
String title, String recommendationText, Date creationDate, |
|
103 |
Date expirationDate, Set<String> communityIds) |
|
104 |
throws RecommendationServiceException; |
|
105 |
|
|
106 |
/** |
|
107 |
* creates a new recommendation of type user |
|
108 |
* |
|
109 |
* @param recommendationText |
|
110 |
* @param creationDate |
|
111 |
* @param expirationDate |
|
112 |
* @return the id of the recommendation |
|
113 |
* @throws RecommendationServiceException |
|
114 |
* if the user recommendation cannot be created |
|
115 |
*/ |
|
116 |
public String generateUserRecommendation(int index, boolean active, |
|
117 |
String title, String userId, String recommendationText, |
|
118 |
Date creationDate, Date expirationDate) |
|
119 |
throws RecommendationServiceException; |
|
120 |
|
|
121 |
/** |
|
122 |
* retrieves the recommendation text of all announcements that haven't |
|
123 |
* expired |
|
124 |
* |
|
125 |
* @return the announcements' recommendation text |
|
126 |
* @throws RecommendationServiceException |
|
127 |
*/ |
|
128 |
public List<String> getAnnouncements() |
|
129 |
throws RecommendationServiceException; |
|
130 |
|
|
131 |
/** |
|
132 |
* retrieves ths ids of all announcements |
|
133 |
* |
|
134 |
* @throws RecommendationServiceException |
|
135 |
*/ |
|
136 |
public List<String> getAllAnnouncementIds() |
|
137 |
throws RecommendationServiceException; |
|
138 |
|
|
139 |
/** |
|
140 |
* retrieves the recommendation text of all announcements |
|
141 |
* |
|
142 |
* @return the recommendation text of all announcements |
|
143 |
* @throws RecommendationServiceException |
|
144 |
*/ |
|
145 |
public List<Recommendation> getAllAnnouncements() |
|
146 |
throws RecommendationServiceException; |
|
147 |
|
|
148 |
/** |
|
149 |
* retrieves all recommendations of type community, only the content |
|
150 |
* |
|
151 |
* @return the recommendation text of all community recommendations |
|
152 |
* @throws RecommendationServiceException |
|
153 |
*/ |
|
154 |
public List<String> getAllCommunityRecommendations() |
|
155 |
throws RecommendationServiceException; |
|
156 |
|
|
157 |
/** |
|
158 |
* retrieves all recommendations of type community, the objects |
|
159 |
* |
|
160 |
* @return the recommendation text of all community recommendations |
|
161 |
* @throws RecommendationServiceException |
|
162 |
*/ |
|
163 |
public List<Recommendation> getAllCommunityRecommendationsObj() |
|
164 |
throws RecommendationServiceException; |
|
165 |
|
|
166 |
public List<String> getCommunityRecommendations(String communityId) |
|
167 |
throws RecommendationServiceException; |
|
168 |
|
|
169 |
public List<Recommendation> getCommunityRecommendationsObj( |
|
170 |
String communityId) throws RecommendationServiceException; |
|
171 |
|
|
172 |
/** |
|
173 |
* retrieves all community recommendation content that are associated with a |
|
174 |
* community |
|
175 |
* |
|
176 |
* @param communityId |
|
177 |
* the id of the community |
|
178 |
* @return the recommendation text of the community recommendations |
|
179 |
* @throws RecommendationServiceException |
|
180 |
*/ |
|
181 |
public List<String> getAllCommunityRecommendations(String communityId) |
|
182 |
throws RecommendationServiceException; |
|
183 |
|
|
184 |
/** |
|
185 |
* retrieves all community recommendation objects that are associated with a |
|
186 |
* community. |
|
187 |
* |
|
188 |
* @param communityId |
|
189 |
* the id of the community |
|
190 |
* @return the recommendation text of the community recommendations |
|
191 |
* @throws RecommendationServiceException |
|
192 |
*/ |
|
193 |
public List<Recommendation> getAllCommunityRecommendationsObj( |
|
194 |
String communityId) throws RecommendationServiceException; |
|
195 |
|
|
196 |
public List<String> getAllUserRecommendations(String userId) |
|
197 |
throws RecommendationServiceException; |
|
198 |
|
|
199 |
/** |
|
200 |
* retrieves a recommendation |
|
201 |
* |
|
202 |
* @param recommendationId |
|
203 |
* the recommendation id |
|
204 |
* @return the recommendation or null if the recommendation does not exist |
|
205 |
* @throws RecommendationServiceException |
|
206 |
* |
|
207 |
*/ |
|
208 |
|
|
209 |
public Recommendation getRecommendation(String recommendationId) |
|
210 |
throws RecommendationServiceException; |
|
211 |
|
|
212 |
/** |
|
213 |
* retrieves the text of a recommendation |
|
214 |
* |
|
215 |
* @param recommendationId |
|
216 |
* the id of the recommendation |
|
217 |
* @return the recommendation text or null if the recommendation does not |
|
218 |
* exist |
|
219 |
* @throws RecommendationServiceException |
|
220 |
* |
|
221 |
*/ |
|
222 |
public String getRecommendationText(String recommendationId) |
|
223 |
throws RecommendationServiceException; |
|
224 |
|
|
225 |
/** |
|
226 |
* retrieves the recommendation text of a Set of recommendations |
|
227 |
* |
|
228 |
* @param recommendationIds |
|
229 |
* the ids of the recommendations |
|
230 |
* @return a Set of the recommendations' text |
|
231 |
* @throws RecommendationServiceException |
|
232 |
* |
|
233 |
*/ |
|
234 |
public List<String> getRecommendations(List<String> recommendationIds) |
|
235 |
throws RecommendationServiceException; |
|
236 |
|
|
237 |
/** |
|
238 |
* removes a recommendation |
|
239 |
* |
|
240 |
* @param recommendationId |
|
241 |
* the id of the recommendation |
|
242 |
* @throws RecommendationServiceException |
|
243 |
* if the recommendation does not exist or cannot be updated |
|
244 |
*/ |
|
245 |
public void removeRecommendation(String recommendationId) |
|
246 |
throws RecommendationServiceException; |
|
247 |
|
|
248 |
/** |
|
249 |
* removes a recommendation of type announcement |
|
250 |
* |
|
251 |
* @param announcementId |
|
252 |
* the id of the announcement |
|
253 |
* @throws RecommendationServiceException |
|
254 |
* if the announcement does not exist or cannot be updated |
|
255 |
*/ |
|
256 |
public void removeAnnouncement(String announcementId) |
|
257 |
throws RecommendationServiceException; |
|
258 |
|
|
259 |
/** |
|
260 |
* removes a recommendation of type community |
|
261 |
* |
|
262 |
* @param recommendationId |
|
263 |
* the id of the recommendation |
|
264 |
* @param communityId |
|
265 |
* the id of the community |
|
266 |
* @throws RecommendationServiceException |
|
267 |
*/ |
|
268 |
public void removeCommunityRecommendation(String recommendationId) |
|
269 |
throws RecommendationServiceException; |
|
270 |
|
|
271 |
public void removeUserRecommendation(String recommendationId) |
|
272 |
throws RecommendationServiceException; |
|
273 |
|
|
274 |
/** |
|
275 |
* updates a recommendation |
|
276 |
* |
|
277 |
* @param recommendationId |
|
278 |
* the id of the recommendation |
|
279 |
* @param recommendationText |
|
280 |
* the text of the recommendation |
|
281 |
* @param creationDate |
|
282 |
* the date the recommendation is created |
|
283 |
* @param expirationDate |
|
284 |
* the date the recommendation expires |
|
285 |
* @throws RecommendationServiceException |
|
286 |
* if the recommendation does not exist or cannot be updated |
|
287 |
*/ |
|
288 |
public void updateRecommendation(String recommendationId, int index, |
|
289 |
boolean active, String title, String recommendationText, |
|
290 |
Date creationDate, Date expirationDate) |
|
291 |
throws RecommendationServiceException; |
|
292 |
|
|
293 |
/** |
|
294 |
* updates an announcement and the corresponding recommendation |
|
295 |
* |
|
296 |
* @param announcementId |
|
297 |
* the id of the announcement |
|
298 |
* @param recommendationText |
|
299 |
* the text of the corresponding recommendation |
|
300 |
* @param creationDate |
|
301 |
* the creation date of the announcement |
|
302 |
* @param expirationDate |
|
303 |
* the expiration date of the announcement |
|
304 |
* @throws RecommendationServiceException |
|
305 |
* if the announcement recommendation does not exist or cannot |
|
306 |
* be updated |
|
307 |
*/ |
|
308 |
public void updateAnnouncement(String announcementId, int index, |
|
309 |
boolean active, String announcementTitle, String announcementText, |
|
310 |
Date creationDate, Date expirationDate) |
|
311 |
throws RecommendationServiceException; |
|
312 |
|
|
313 |
public void updateCommunityRecommendation(String recommendationId, |
|
314 |
int index, boolean active, String title, String recommendationText, |
|
315 |
Date creationDate, Date expirationDate, Set<String> communityIds) |
|
316 |
throws RecommendationServiceException; |
|
317 |
|
|
318 |
/* |
|
319 |
* /** sends an e-mail to all users with the recommendation text of an |
|
320 |
* announcement |
|
321 |
* |
|
322 |
* @param announcementId the id of the announcement @throws |
|
323 |
* RecommendationServiceException if the announcement or recommendation does |
|
324 |
* not exist |
|
325 |
* |
|
326 |
* public void sendAnnouncement( String announcementId ) throws |
|
327 |
* RecommendationServiceException; |
|
328 |
*/ |
|
329 |
|
|
330 |
public void addRecommendationToUser(String recommendationId, String userId) |
|
331 |
throws RecommendationServiceException; |
|
332 |
|
|
333 |
/** |
|
334 |
* gets all the community recommendation for a specific user |
|
335 |
* |
|
336 |
* @throws RecommendationServiceException |
|
337 |
*/ |
|
338 |
public List<String> getCommunityRecommendationsForUser(String userId) |
|
339 |
throws RecommendationServiceException; |
|
340 |
|
|
341 |
/** |
|
342 |
* gets all the community recommendation objects for a specific user |
|
343 |
* |
|
344 |
* @throws RecommendationServiceException |
|
345 |
*/ |
|
346 |
public List<Recommendation> getCommunityRecommendationsForUserObj( |
|
347 |
String userId) throws RecommendationServiceException; |
|
348 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/ValidatorServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import eu.dnetlib.api.DriverServiceException; |
|
4 |
|
|
5 |
public class ValidatorServiceException extends DriverServiceException { |
|
6 |
|
|
7 |
/** |
|
8 |
* |
|
9 |
*/ |
|
10 |
private static final long serialVersionUID = 1L; |
|
11 |
|
|
12 |
public ValidatorServiceException() { |
|
13 |
super(); |
|
14 |
} |
|
15 |
|
|
16 |
public ValidatorServiceException(String message, Throwable cause) { |
|
17 |
super(message, cause); |
|
18 |
} |
|
19 |
|
|
20 |
public ValidatorServiceException(String message) { |
|
21 |
super(message); |
|
22 |
} |
|
23 |
|
|
24 |
public ValidatorServiceException(Throwable cause) { |
|
25 |
super(cause); |
|
26 |
} |
|
27 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/NotificationServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
/** |
|
4 |
* This exception is thrown by notification service if any errors occur. |
|
5 |
* @author thanos@di.uoa.gr |
|
6 |
* @see NotificationService |
|
7 |
* |
|
8 |
*/ |
|
9 |
public class NotificationServiceException extends Exception { |
|
10 |
private static final long serialVersionUID = 1L; |
|
11 |
|
|
12 |
/** |
|
13 |
* Construct a new notification service exception with the specified message and cause. |
|
14 |
* @param message the message |
|
15 |
* @param cause the cause |
|
16 |
*/ |
|
17 |
public NotificationServiceException(final String message, final Throwable cause) { |
|
18 |
super(message, cause); |
|
19 |
} |
|
20 |
|
|
21 |
/** |
|
22 |
* Construct a new notification service exception with the specified message. |
|
23 |
* @param message the message |
|
24 |
*/ |
|
25 |
public NotificationServiceException(final String message) { |
|
26 |
super(message); |
|
27 |
} |
|
28 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/ForumServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import eu.dnetlib.api.DriverServiceException; |
|
4 |
|
|
5 |
/** |
|
6 |
* This exception is thrown by forum service on any error. |
|
7 |
* @author thanos@di.uoa.gr |
|
8 |
* |
|
9 |
*/ |
|
10 |
public class ForumServiceException extends DriverServiceException { |
|
11 |
/** |
|
12 |
* Used for serialization / deserialization |
|
13 |
*/ |
|
14 |
private static final long serialVersionUID = -8624823395470214377L; |
|
15 |
|
|
16 |
/** |
|
17 |
* Create a new forum service exception. |
|
18 |
*/ |
|
19 |
public ForumServiceException() { |
|
20 |
super(); |
|
21 |
} |
|
22 |
|
|
23 |
/** |
|
24 |
* Create a new forum service exception with the specified error message. |
|
25 |
* @param message the error message |
|
26 |
*/ |
|
27 |
public ForumServiceException(String message) { |
|
28 |
super(message); |
|
29 |
} |
|
30 |
|
|
31 |
/** |
|
32 |
* Create a new forum service exception with the specified cause. |
|
33 |
* @param cause the cause |
|
34 |
*/ |
|
35 |
public ForumServiceException(Throwable cause) { |
|
36 |
super(cause); |
|
37 |
} |
|
38 |
|
|
39 |
/** |
|
40 |
* Create a new forum service exception with the specified error message and cause. |
|
41 |
* @param message the error message |
|
42 |
* @param cause the cause |
|
43 |
*/ |
|
44 |
public ForumServiceException(String message, Throwable cause) { |
|
45 |
super(message, cause); |
|
46 |
} |
|
47 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/AlertService.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import java.net.URI; |
|
4 |
import java.net.URL; |
|
5 |
import java.util.Date; |
|
6 |
import java.util.SortedSet; |
|
7 |
|
|
8 |
import eu.dnetlib.api.DriverService; |
|
9 |
import eu.dnetlib.domain.functionality.AlertSubscription; |
|
10 |
import eu.dnetlib.domain.functionality.AlertTemplate; |
|
11 |
import eu.dnetlib.domain.functionality.NotificationEvent; |
|
12 |
import eu.dnetlib.domain.functionality.ObjectPage; |
|
13 |
import eu.dnetlib.domain.functionality.ResultPage; |
|
14 |
|
|
15 |
/** |
|
16 |
* This interface declares the available methods of alert service. Alert service is used to manage templates and subscriptions. |
|
17 |
* @author thanos@di.uoa.gr |
|
18 |
* @see eu.dnetlib.domain.functionality.AlertTemplate |
|
19 |
* @see eu.dnetlib.domain.functionality.AlertSubscription |
|
20 |
* @see eu.dnetlib.domain.functionality.NotificationEvent |
|
21 |
* @see AlertServiceException |
|
22 |
* |
|
23 |
*/ |
|
24 |
public interface AlertService extends DriverService { |
|
25 |
/** |
|
26 |
* Retrieve all the supported modes in which alerts can be sent. |
|
27 |
* @return a sorted set containing all the supported modes in which alerts can be sent |
|
28 |
*/ |
|
29 |
public SortedSet<String> getSupportedAlertModes(); |
|
30 |
|
|
31 |
/** |
|
32 |
* Retrieve a page of templates. |
|
33 |
* @param pageNumber the number of the page to retrieve |
|
34 |
* @param pageSize the size of the page to retrieve |
|
35 |
* @return an object page containing templates |
|
36 |
* @throws AlertServiceException if any errors occur |
|
37 |
*/ |
|
38 |
public ObjectPage<AlertTemplate> getTemplates(final int pageNumber, final int pageSize) throws AlertServiceException; |
|
39 |
|
|
40 |
/** |
|
41 |
* Add a template. |
|
42 |
* @param template the template to add |
|
43 |
* @throws AlertServiceException if any errors occur |
|
44 |
*/ |
|
45 |
public void addTemplate(final AlertTemplate template) throws AlertServiceException; |
|
46 |
|
|
47 |
/** |
|
48 |
* Remove a template. |
|
49 |
* @param templateId the unique identifier of the template to remove |
|
50 |
* @throws AlertServiceException if any errors occur |
|
51 |
*/ |
|
52 |
public void removeTemplate(final String templateId) throws AlertServiceException; |
|
53 |
|
|
54 |
/** |
|
55 |
* Retrieve a page of subscriptions. |
|
56 |
* @param pageNumber the number of the page to retrieve |
|
57 |
* @param pageSize the size of the page to retrieve |
|
58 |
* @return an object page containing subscriptions |
|
59 |
* @throws AlertServiceException if any errors occur |
|
60 |
*/ |
|
61 |
public ObjectPage<AlertSubscription> getSubscriptions(final int pageNumber, final int pageSize) throws AlertServiceException; |
|
62 |
|
|
63 |
/** |
|
64 |
* Retrieve some subscriptions by alert mode and subscriber. |
|
65 |
* @param alertMode the alert mode of the subscriptions to retrieve |
|
66 |
* @param subscriber the subscriber URI of the subscriptions to retrieve (prefix match) |
|
67 |
* @param limit the maximum number of subscriptions to retrieve |
|
68 |
* @param offset the offset to start at |
|
69 |
* @return a list of subscriptions |
|
70 |
* @throws AlertServiceException if any errors occur |
|
71 |
*/ |
|
72 |
public SortedSet<AlertSubscription> getSubscriptions(final String alerMode, final String subscriber, final int limit, final int offset) throws AlertServiceException; |
|
73 |
|
|
74 |
/** |
|
75 |
* Add a new subscription. |
|
76 |
* @param subscription the subscription to add |
|
77 |
* @throws AlertServiceException if any errors occur |
|
78 |
*/ |
|
79 |
public void addSubscription(final AlertSubscription subscription) throws AlertServiceException; |
|
80 |
|
|
81 |
/** |
|
82 |
* Enable a subscription. |
|
83 |
* @param templateId the unique identifier of the template of the subscription to enable |
|
84 |
* @param notificationService the URL of the notification service of the subscription to enable |
|
85 |
* @param queryId the unique identifier of the notification query of the subscription to enable |
|
86 |
* @param resultId the unique identifier of the result of the subscription to enable |
|
87 |
* @param alertMode the alert mode of the subscription to enable |
|
88 |
* @param subscriber the URI of the subscriber of the subscription to enable |
|
89 |
* @throws AlertServiceException if any errors occur |
|
90 |
*/ |
|
91 |
public void enableSubscription(final String templateId, final URL notificationService, final String queryId, final String resultId, final String alertMode, final URI subscriber) throws AlertServiceException; |
|
92 |
|
|
93 |
/** |
|
94 |
* Disable a subscription. |
|
95 |
* @param templateId the unique identifier of the template the subscription to disable |
|
96 |
* @param notificationService the URL of the notification service of the subscription to disable |
|
97 |
* @param queryId the unique identifier of the notification query of the subscription to disable |
|
98 |
* @param resultId the unique identifier of the result of the subscription to disable |
|
99 |
* @param alertMode the alert mode of the subscription to disable |
|
100 |
* @param subscriber the URI of the subscriber of the subscription to disable |
|
101 |
* @throws AlertServiceException if any errors occur |
|
102 |
*/ |
|
103 |
public void disableSubscription(final String templateId, final URL notificationService, final String queryId, final String resultId, final String alertMode, final URI subscriber) throws AlertServiceException; |
|
104 |
|
|
105 |
/** |
|
106 |
* Remove a subscription. |
|
107 |
* @param templateId the unique identifier of the template of the subscription to remove |
|
108 |
* @param notificationService the URL of the notification service of the subscription to remove |
|
109 |
* @param queryId the unique identifier of the notification query of the subscription to remove |
|
110 |
* @param resultId the unique identifier of the result of the subscription to remove |
|
111 |
* @param alertMode the alert mode of the subscription to remove |
|
112 |
* @param subscriber the URI of the subscriber of the subscription to remove |
|
113 |
* @throws AlertServiceException if any errors occur |
|
114 |
*/ |
|
115 |
public void removeSubscription(final String templateId, final URL notificationService, final String queryId, final String resultId, final String alertMode, final URI subscriber) throws AlertServiceException; |
|
116 |
|
|
117 |
/** |
|
118 |
* Count the results of an alert. |
|
119 |
* @param templateId the unique identifier of the template of the alert results to count |
|
120 |
* @param notificationService the URL of the notification service of the alert results to count |
|
121 |
* @param queryId the unique identifier of the notification query of the alert results to count |
|
122 |
* @param date the date that corresponds to the notification event of the alert results to count |
|
123 |
* @param resultId the unique identifier of the notification result of the alert results to count |
|
124 |
* @return the total number of the specified alert results |
|
125 |
* @throws AlertServiceException if any errors occur |
|
126 |
*/ |
|
127 |
public int countAlertResults(final URL notificationService, final String queryId, final Date date, final String resultId) throws AlertServiceException; |
|
128 |
|
|
129 |
/** |
|
130 |
* Retrieve the results of an alert. |
|
131 |
* @param notificationService the URL of the notification service of the alert results to retrieve |
|
132 |
* @param queryId the unique identfier of the notification query of the alert results to retrieve |
|
133 |
* @param resultId the unique identifier of the notification result of the alert results to retrieve |
|
134 |
* @param fromDate the date from which to retrieve alert results |
|
135 |
* @param toDate the date up to which to retrieve alert results |
|
136 |
* @param limit the maximum number of alert results to retrieve |
|
137 |
* @param offset the offset to start at |
|
138 |
* @return a result page |
|
139 |
* @throws AlertServiceException if any errors occur |
|
140 |
*/ |
|
141 |
public ResultPage getAlertResults(final URL notificationService, final String queryId, final String resultId, final Date fromDate, final Date toDate, final int limit, final int offset) throws AlertServiceException; |
|
142 |
|
|
143 |
/** |
|
144 |
* Alert this service about an event generated by a notification service. |
|
145 |
* @param notificationService the URL of the notification service |
|
146 |
* @param event the notification event |
|
147 |
* @throws AlertServiceException if any errors occur |
|
148 |
*/ |
|
149 |
public void alert(final URL notificationService, final NotificationEvent event) throws AlertServiceException; |
|
150 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/CollectionServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import eu.dnetlib.api.DriverServiceException; |
|
4 |
|
|
5 |
public class CollectionServiceException extends DriverServiceException{ |
|
6 |
private static final long serialVersionUID = 1L; |
|
7 |
|
|
8 |
public CollectionServiceException(){ |
|
9 |
super(); |
|
10 |
} |
|
11 |
|
|
12 |
public CollectionServiceException(String message, Throwable cause){ |
|
13 |
super(message, cause); |
|
14 |
} |
|
15 |
|
|
16 |
public CollectionServiceException(String message){ |
|
17 |
super(message); |
|
18 |
} |
|
19 |
|
|
20 |
public CollectionServiceException(Throwable cause){ |
|
21 |
super(cause); |
|
22 |
} |
|
23 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/LocalDownloadManagerService.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import eu.dnetlib.api.DriverService; |
|
4 |
|
|
5 |
public interface LocalDownloadManagerService extends DriverService { |
|
6 |
|
|
7 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/UserProfileServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import eu.dnetlib.api.DriverServiceException; |
|
4 |
|
|
5 |
public class UserProfileServiceException extends DriverServiceException { |
|
6 |
|
|
7 |
private static final long serialVersionUID = 8051839588351350465L; |
|
8 |
|
|
9 |
public UserProfileServiceException() { |
|
10 |
super(); |
|
11 |
} |
|
12 |
|
|
13 |
public UserProfileServiceException(String message, Throwable cause) { |
|
14 |
super(message, cause); |
|
15 |
} |
|
16 |
|
|
17 |
public UserProfileServiceException(String message) { |
|
18 |
super(message); |
|
19 |
} |
|
20 |
|
|
21 |
public UserProfileServiceException(Throwable cause) { |
|
22 |
super(cause); |
|
23 |
} |
|
24 |
|
|
25 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/MadgikValidator.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import eu.dnetlib.api.DriverService; |
|
4 |
|
|
5 |
public interface MadgikValidator extends DriverService { |
|
6 |
|
|
7 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/RecommendationServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import eu.dnetlib.api.DriverServiceException; |
|
4 |
|
|
5 |
public class RecommendationServiceException extends DriverServiceException { |
|
6 |
|
|
7 |
private static final long serialVersionUID = 1L; |
|
8 |
|
|
9 |
public RecommendationServiceException() { |
|
10 |
super(); |
|
11 |
} |
|
12 |
|
|
13 |
public RecommendationServiceException(String message, Throwable cause) { |
|
14 |
super(message, cause); |
|
15 |
} |
|
16 |
|
|
17 |
public RecommendationServiceException(String message) { |
|
18 |
super(message); |
|
19 |
} |
|
20 |
|
|
21 |
public RecommendationServiceException(Throwable cause) { |
|
22 |
super(cause); |
|
23 |
} |
|
24 |
|
|
25 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/CommunityService.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import eu.dnetlib.api.DriverService; |
|
6 |
import eu.dnetlib.domain.functionality.Community; |
|
7 |
import eu.dnetlib.domain.functionality.CommunitySearchCriteria; |
|
8 |
|
|
9 |
/** |
|
10 |
* The class that manages Community objects |
|
11 |
* |
|
12 |
*/ |
|
13 |
public interface CommunityService extends DriverService { |
|
14 |
/** |
|
15 |
* Create or edit a community. |
|
16 |
* @param community the community to save |
|
17 |
* @return the community just saved |
|
18 |
* @throws CommunityServiceException if any errors occur |
|
19 |
*/ |
|
20 |
public Community saveCommunity(Community community) throws CommunityServiceException; |
|
21 |
|
|
22 |
/** |
|
23 |
* Delete a community. |
|
24 |
* @param community the community to delete |
|
25 |
* @throws CommunityServiceException if any errors occur |
|
26 |
*/ |
|
27 |
public void deleteCommunity(Community community) throws CommunityServiceException; |
|
28 |
|
|
29 |
/** |
|
30 |
* Delete a community. |
|
31 |
* @param id the id of the community to delete |
|
32 |
* @throws CommunityServiceException if any errors occur |
|
33 |
*/ |
|
34 |
public void deleteCommunityById(String id) throws CommunityServiceException; |
|
35 |
|
|
36 |
/** |
|
37 |
* Search for a community by id |
|
38 |
* @param id the id of the community to search for |
|
39 |
* @return the community with the specified id or null if no such community exists |
|
40 |
* @throws CommunityServiceException |
|
41 |
*/ |
|
42 |
public Community getCommunityById(String id) throws CommunityServiceException; |
|
43 |
|
|
44 |
/** |
|
45 |
* Search for communities by the specified criteria. |
|
46 |
* @param criteria the search criteria to match |
|
47 |
* @return a list containing all the communities that match the specified criteria |
|
48 |
* @throws CommunityServiceException if any errors occur |
|
49 |
*/ |
|
50 |
public List<Community> searchCommunities(CommunitySearchCriteria criteria) |
|
51 |
throws CommunityServiceException; |
|
52 |
|
|
53 |
/** |
|
54 |
* Search for communities by the specified criteria. |
|
55 |
* @param criteria the search criteria to match |
|
56 |
* @return a list containing the ids of all the communities that match the specified criteria |
|
57 |
* @throws CommunityServiceException if any errors occur |
|
58 |
*/ |
|
59 |
public List<String> searchCommunityIds(CommunitySearchCriteria criteria) |
|
60 |
throws CommunityServiceException; |
|
61 |
|
|
62 |
/** |
|
63 |
* Check if a user is owner of a community. |
|
64 |
* @param communityId the id of the community to check for |
|
65 |
* @param userId the id of the user to check for |
|
66 |
* @return true if the user is owner of the community; false otherwise |
|
67 |
* @throws CommunityServiceException if any errors occur |
|
68 |
*/ |
|
69 |
public boolean isOwner(String communityId, String userId) throws CommunityServiceException; |
|
70 |
|
|
71 |
/** |
|
72 |
* Check if a user is manager of a community. |
|
73 |
* @param communityId the id of the community to check for |
|
74 |
* @param userId the id of the user to check for |
|
75 |
* @return true if the user is manager of the community; false otherwise |
|
76 |
* @throws CommunityServiceException |
|
77 |
*/ |
|
78 |
public boolean isManager(String communityId, String userId) throws CommunityServiceException; |
|
79 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/functionality/RatingService.java | ||
---|---|---|
1 |
package eu.dnetlib.api.functionality; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import eu.dnetlib.api.DriverService; |
|
6 |
import eu.dnetlib.domain.functionality.Rating; |
|
7 |
|
|
8 |
/** |
|
9 |
* This interface describes the methods available for a rating service. |
|
10 |
* @author thanos@di.uoa.gr |
|
11 |
* |
|
12 |
*/ |
|
13 |
public interface RatingService extends DriverService { |
|
14 |
/** |
|
15 |
* Rate a document by a specifed user. |
|
16 |
* @param userId the id of the user |
|
17 |
* @param documentId the id of the document |
|
18 |
* @param score the rating score |
|
19 |
* @throws RatingServiceException if any errors occur |
|
20 |
*/ |
|
21 |
public void rate(String userId, String documentId, float score) throws RatingServiceException; |
|
22 |
|
|
23 |
/** |
|
24 |
* Search for existing ratings by user. |
|
25 |
* @param userId the id of the user |
|
26 |
* @return a list containing all the ratings of the specified user ordered by score |
|
27 |
* @throws RatingServiceException if any errors occur |
|
28 |
*/ |
|
29 |
public List<Rating> searchRatingsByUser(String userId) throws RatingServiceException; |
|
30 |
|
|
31 |
/** |
|
32 |
* Search for existing ratings by document. |
|
33 |
* @param documentId the id of the document |
|
34 |
* @return a list containing all the ratings of the soecified document ordered by score |
|
35 |
* @throws RatingServiceException if any errors occur |
|
36 |
*/ |
|
37 |
public List<Rating> searchRatingsByDocument(String documentId) throws RatingServiceException; |
|
38 |
|
|
39 |
/** |
|
40 |
* Get the top ratings. |
|
41 |
* @param limit the maximum number of ratings to retrieve |
|
42 |
* @return a list containing the top ratings ordered by score |
|
43 |
* @throws RatingServiceException if any errors occur |
|
44 |
*/ |
|
45 |
public List<Rating> getTopRatings(int limit) throws RatingServiceException; |
|
46 |
|
|
47 |
/** |
|
48 |
* Get the top documents. |
|
49 |
* @param limit the maximum number of ratings to retrieve |
|
50 |
* @return a list containing the top document average ratings ordered by score |
|
51 |
* @throws RatingServiceException if any errors occur |
|
52 |
*/ |
|
53 |
public List<Rating> getTopDocuments(int limit) throws RatingServiceException; |
|
54 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/data/DatasourceManagerServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.api.data; |
|
2 |
|
|
3 |
@SuppressWarnings("serial") |
|
4 |
public class DatasourceManagerServiceException extends Exception { |
|
5 |
|
|
6 |
public DatasourceManagerServiceException() { |
|
7 |
super(); |
|
8 |
} |
|
9 |
|
|
10 |
public DatasourceManagerServiceException(String message, Throwable cause) { |
|
11 |
super(message, cause); |
|
12 |
} |
|
13 |
|
|
14 |
public DatasourceManagerServiceException(String message) { |
|
15 |
super(message); |
|
16 |
} |
|
17 |
|
|
18 |
public DatasourceManagerServiceException(Throwable cause) { |
|
19 |
super(cause); |
|
20 |
} |
|
21 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/data/SearchServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.api.data; |
|
2 |
|
|
3 |
import eu.dnetlib.api.DriverServiceException; |
|
4 |
|
|
5 |
public class SearchServiceException extends DriverServiceException { |
|
6 |
|
|
7 |
private static final long serialVersionUID = 4233470724221380778L; |
|
8 |
|
|
9 |
public SearchServiceException(String message) { |
|
10 |
super(message); |
|
11 |
} |
|
12 |
|
|
13 |
public SearchServiceException(String message, Throwable cause) { |
|
14 |
super(message, cause); |
|
15 |
} |
|
16 |
} |
modules/uoa-api/tags/uoa-api-1.2.1/trunk/src/main/java/eu/dnetlib/api/data/DatasourceManagerService.java | ||
---|---|---|
1 |
package eu.dnetlib.api.data; |
|
2 |
|
|
3 |
import java.util.Date; |
|
4 |
import java.util.List; |
|
5 |
|
|
6 |
import javax.jws.WebParam; |
|
7 |
|
|
8 |
import eu.dnetlib.api.DriverService; |
|
9 |
import eu.dnetlib.domain.data.Repository; |
|
10 |
import eu.dnetlib.domain.data.RepositoryInterface; |
|
11 |
|
|
12 |
public interface DatasourceManagerService extends DriverService { |
|
13 |
|
|
14 |
/** |
|
15 |
* Register a datasource. |
|
16 |
* |
Also available in: Unified diff
Removing failed release