1
|
package eu.dnetlib.enabling.is.sn;
|
2
|
|
3
|
import org.apache.commons.logging.Log;
|
4
|
import org.apache.commons.logging.LogFactory;
|
5
|
|
6
|
import eu.dnetlib.enabling.is.sn.rmi.ISSNException;
|
7
|
|
8
|
/**
|
9
|
* As a complementary approach w.r.t unit tests, this class is an extension of
|
10
|
* the default ISSN Service which creates a number of initial subscriptions so that we can play
|
11
|
* with some notifications.
|
12
|
*
|
13
|
* This class plays well with TestISStoreServiceImpl, which creates some profiles at startup time
|
14
|
* and schedules some automated mutations.
|
15
|
*
|
16
|
* @author marko
|
17
|
*
|
18
|
*/
|
19
|
public class TestISSNServiceImpl extends ISSNServiceImpl {
|
20
|
/**
|
21
|
* logger.
|
22
|
*/
|
23
|
private static final Log log = LogFactory.getLog(TestISSNServiceImpl.class); // NOPMD by marko on 11/24/08 5:02 PM
|
24
|
|
25
|
/**
|
26
|
* {@inheritDoc}
|
27
|
* @see eu.dnetlib.enabling.tools.AbstractBaseService#start()
|
28
|
*/
|
29
|
@Override
|
30
|
public void start() {
|
31
|
super.start();
|
32
|
|
33
|
try {
|
34
|
subscribe(getEprBuilder().getEndpointReference(getEndpoint()), "CREATE/TestResourceType/*", 0);
|
35
|
} catch (ISSNException e) {
|
36
|
log.fatal("cannot subscribe test subscriptions", e);
|
37
|
}
|
38
|
}
|
39
|
|
40
|
}
|