#5034 Add methods for testing handler / operations architecture
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / TestServiceImpl.java
1 // $Id$
2 /**
3 * Copyright (C) 2015 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10 package eu.etaxonomy.cdm.api.service;
11
12 import org.springframework.stereotype.Service;
13
14 /**
15 * @author cmathew
16 * @date 26 Jun 2015
17 *
18 */
19 @Service
20 public class TestServiceImpl implements ITestService {
21
22 /* (non-Javadoc)
23 * @see eu.etaxonomy.cdm.api.service.ITestService#wait(int)
24 */
25 @Override
26 public void waitFor(long timeToWaitInMs) throws InterruptedException {
27 Thread.sleep(timeToWaitInMs);
28 }
29
30 /* (non-Javadoc)
31 * @see eu.etaxonomy.cdm.api.service.ITestService#returnResult(eu.etaxonomy.cdm.api.service.UpdateResult)
32 */
33 @Override
34 public UpdateResult returnResult(UpdateResult result) {
35 return result;
36 }
37
38 /* (non-Javadoc)
39 * @see eu.etaxonomy.cdm.api.service.ITestService#throwException(java.lang.Exception)
40 */
41 @Override
42 public UpdateResult throwException(Exception ex) {
43 throw new RuntimeException(ex);
44 }
45
46 }