Changeset 3477


Ignore:
Timestamp:
08/26/13 15:41:57 (11 years ago)
Author:
olhsha
Message:

renaming DaoDispatcher?

Location:
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend
Files:
9 edited
5 moved

Legend:

Unmodified
Added
Removed
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/pom.xml

    r3111 r3477  
    123123                    </execution>
    124124                </executions>
    125             </plugin>     
     125            </plugin>
     126            <plugin>
     127                <groupId>org.apache.maven.plugins</groupId>
     128                <artifactId>maven-javadoc-plugin</artifactId>
     129                <version>2.9.1</version>
     130            </plugin>   
    126131        </plugins>
    127132    </build>
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/BackendConstants.java

    r3365 r3477  
    2424public class BackendConstants {
    2525   
    26      // Hash Parameters
    27     public static final int NOTEBOOK_HASH_PARAM_1 =  7;
    28     public static final int NOTEBOOK_HASH_PARAM_2 =  29;
    29     public static final int ANNOTATION_HASH_PARAM_1 =  5;
    30     public static final int ANNOTATION_HASH_PARAM_2 =  23;
    31     public static final int USER_HASH_PARAM_1 =  5;
    32     public static final int USER_HASH_PARAM_2 =  19;
    33     // peter, is it okay?
    34     public static final int SOURCE_HASH_PARAM_1 =  7;
    35     public static final int SOURCE_HASH_PARAM_2 =  23;
    36     public static final int CACHED_REPRESENTATION_HASH_PARAM_1 =  7;
    37     public static final int CACHED_REPRESENTATION_HASH_PARAM_2 =  19;
    38     public static final int VERSION_HASH_PARAM_1 =  5;
    39     public static final int VERSION_HASH_PARAM_2 =  29;
    40    
    4126    public static final String regExpIdentifier = "[a-zA-Z0-9_-]*";
    4227   
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/AnnotationDao.java

    r3476 r3477  
    4646     * @return the Annotation object with empty list of sources.
    4747     *
    48      * (Constructing a complete Annotation object using  "getAnnotationWithoutSources" and "retrieveSourceIDs" is done in "DaoDispatchter"
     48     * (Constructing a complete Annotation object using  "getAnnotationWithoutSources" and "retrieveSourceIDs" is done in "DaoDispatchter".)
    4949     *
    5050     */
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/DBIntegrityService.java

    r3476 r3477  
    3131 *
    3232 * @author olhsha
     33 **/
     34
     35/**
    3336 *
    3437 * Resource  and the corresponding Dao's are, so to say, "lavelled".  Notebook has level 5, Annotation has level 4, Source has level 3, Version has level 2 and CachedRepresentation has level 1. Users are not subject to this hierarchy.
     
    4346 * Second, delete<X> is called from the corresponding Dao.
    4447 * Third, delete<X-1> are recursively called for all the related sub-resources of the level X-1. E.g., after deleting an annotation itself all the sources (which are not used by other annotations) must be deleted as well.
     48 
     49 *
     50 * Comments on Dao-classes.
     51 *
     52 * Each Dao-class contains "isInUse(internalID") method. It return "true" if the resource  with ID occurs at least in one of the joint tables. Used in "delete(internalID)" methods.
     53 *
     54 * If the resource with "internalID" is asked to be deleted, the deletion methods will first call "isInUse(internalID)". If it returns 'true" nothing will happen. Otherwise deletion is happen.
     55 *
     56 * Each "add(object)" method returns the added-object's new internalID or null if the DB has not been updated for some reason.
     57 *
    4558 **/
    4659
    47 /**
    48  *
    49  * Comments on Dao-classes.
    50  *
    51  * -- Each Dao-class contains "isInUse(internalID") method. It return "true" if the resource  with ID occurs at least in one of the joint tables. Used in "delete(internalID)" methods.
    52  *
    53  * -- If the resource with "internalID" is asked to be deleted, the deletion methods will first call "isInUse(internalID)". If it returns 'true" nothing will happen. Otherwise deletion is happen.
    54  *
    55  * -- every "add(object)" method return the added object new internalID or null if the DB has not been updated for some reason.
    56  *
    57  **/
    58 
    59 
    60 public interface DaoDispatcher{
     60
     61public interface DBIntegrityService{
    6162   
    6263    public void setServiceURI(String serviceURI);
     
    201202    *
    202203    * @param sourceID
    203     * @return result[0] = # deleted rows in the table "source" ( 0 is the source is in use).
     204    * @return result[0] = # deleted rows in the table "source" (0 is the source is in use).
    204205    * result[1] = # deleted rows in the table "sources_versions".
    205     * result[2] = # deleted rows in the table source.
     206    * result[2] = # deleted rows in the table "version".
    206207    * @throws SQLException
    207208    */
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/impl/DBIntegrityServiceImlp.java

    r3476 r3477  
    2121import eu.dasish.annotation.backend.dao.AnnotationDao;
    2222import eu.dasish.annotation.backend.dao.CachedRepresentationDao;
    23 import eu.dasish.annotation.backend.dao.DaoDispatcher;
     23import eu.dasish.annotation.backend.dao.DBIntegrityService;
    2424import eu.dasish.annotation.backend.dao.NotebookDao;
    2525import eu.dasish.annotation.backend.dao.SourceDao;
     
    4747 * @author olhsha
    4848 */
    49 public class DaoDispatcherImpl implements DaoDispatcher
     49public class DBIntegrityServiceImlp implements DBIntegrityService
    5050{
    5151
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/AnnotationResource.java

    r3461 r3477  
    1919
    2020import eu.dasish.annotation.backend.BackendConstants;
    21 import eu.dasish.annotation.backend.dao.DaoDispatcher;
     21import eu.dasish.annotation.backend.dao.DBIntegrityService;
    2222import eu.dasish.annotation.schema.Annotation;
    2323import eu.dasish.annotation.schema.ObjectFactory;
     
    4747   
    4848    @Autowired
    49     private DaoDispatcher daoDispatcher;
     49    private DBIntegrityService dbIntegrityService;
    5050    @Context
    5151    private HttpServletRequest httpServletRequest;
     
    6262    @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}")
    6363    public JAXBElement<Annotation> getAnnotation(@PathParam("annotationid") String ExternalIdentifier) throws SQLException {
    64         final Number annotationID = daoDispatcher.getAnnotationInternalIdentifier(UUID.fromString(ExternalIdentifier));
    65         daoDispatcher.setServiceURI(httpServletRequest.getServletPath());
    66         final Annotation annotation = daoDispatcher.getAnnotation(annotationID);
     64        final Number annotationID = dbIntegrityService.getAnnotationInternalIdentifier(UUID.fromString(ExternalIdentifier));
     65        dbIntegrityService.setServiceURI(httpServletRequest.getServletPath());
     66        final Annotation annotation = dbIntegrityService.getAnnotation(annotationID);
    6767        return new ObjectFactory().createAnnotation(annotation);
    6868    }
     
    7373    @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}")
    7474    public String deleteAnnotation(@PathParam("annotationid") String externalIdentifier) throws SQLException {
    75         final Number annotationID = daoDispatcher.getAnnotationInternalIdentifier(UUID.fromString(externalIdentifier));
    76         int[] resultDelete = daoDispatcher.deleteAnnotation(annotationID);
     75        final Number annotationID = dbIntegrityService.getAnnotationInternalIdentifier(UUID.fromString(externalIdentifier));
     76        int[] resultDelete = dbIntegrityService.deleteAnnotation(annotationID);
    7777        String result = Integer.toString(resultDelete[0]);
    7878        return result;
     
    8989        String remoteUser = httpServletRequest.getRemoteUser();
    9090        UUID userExternalID = (remoteUser != null) ? UUID.fromString(remoteUser) : null;
    91         Number userID = daoDispatcher.getUserInternalIdentifier(userExternalID);
     91        Number userID = dbIntegrityService.getUserInternalIdentifier(userExternalID);
    9292       
    93         daoDispatcher.setServiceURI(httpServletRequest.getServletPath());
     93        dbIntegrityService.setServiceURI(httpServletRequest.getServletPath());
    9494       
    95         Number newAnnotationID =  daoDispatcher.addUsersAnnotation(annotation, userID);
    96         Annotation newAnnotation = daoDispatcher.getAnnotation(newAnnotationID);
     95        Number newAnnotationID =  dbIntegrityService.addUsersAnnotation(annotation, userID);
     96        Annotation newAnnotation = dbIntegrityService.getAnnotation(newAnnotationID);
    9797        return (new ObjectFactory().createAnnotation(newAnnotation));
    9898    }
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/resources/spring-config/dbIntegrityService.xml

    r3452 r3477  
    2424       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    2525">
    26     <bean class="eu.dasish.annotation.backend.dao.impl.DaoDispatcherImpl">
     26    <bean class="eu.dasish.annotation.backend.dao.impl.DBIntegrityServiceImlp">
    2727        <!-- <constructor-arg ref="dataSource"/> -->
    2828    </bean>
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/MockObjectsFactory.java

    r3452 r3477  
    2424import eu.dasish.annotation.backend.dao.UserDao;
    2525import eu.dasish.annotation.backend.dao.VersionDao;
    26 import eu.dasish.annotation.backend.dao.DaoDispatcher;
     26import eu.dasish.annotation.backend.dao.DBIntegrityService;
    2727import org.jmock.Mockery;
    2828
     
    6565    }
    6666   
    67     public DaoDispatcher newDaoDispatcher() {
    68         return context.mock(DaoDispatcher.class);
     67    public DBIntegrityService newDBIntegrityService() {
     68        return context.mock(DBIntegrityService.class);
    6969    }
    7070}
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/dao/impl/DBIntegrityServiceTest.java

    r3455 r3477  
    6161    "/spring-test-config/mockUserDao.xml", "/spring-test-config/mockNotebookDao.xml",
    6262    "/spring-test-config/mockSourceDao.xml", "/spring-test-config/mockVersionDao.xml", "/spring-test-config/mockCachedRepresentationDao.xml",
    63     "/spring-config/daoDispatcher.xml"})
    64 public class DaoDispatcherTest {
    65 
    66     @Autowired
    67     private DaoDispatcherImpl daoDispatcher;
     63    "/spring-config/dbIntegrityService.xml"})
     64public class DBIntegrityServiceTest {
     65
     66    @Autowired
     67    private DBIntegrityServiceImlp dbIntegrityService;
    6868    @Autowired
    6969    private Mockery mockery;
     
    8282    TestInstances testInstances = new TestInstances();
    8383
    84     public DaoDispatcherTest() {
     84    public DBIntegrityServiceTest() {
    8585    }
    8686
    8787    ///////// GETTERS /////////////
    8888    /**
    89      * Test of getAnnotationInternalIdentifier method, of class DaoDispatcherImpl.
     89     * Test of getAnnotationInternalIdentifier method, of class DBIntegrityServiceImlp.
    9090     */
    9191    @Test
     
    100100            }
    101101        });
    102         assertEquals(2, daoDispatcher.getAnnotationInternalIdentifier(externalID));
    103     }
    104 
    105     /**
    106      * Test of getAnnotationExternalIdentifier method, of class DaoDispatcherImpl.
     102        assertEquals(2, dbIntegrityService.getAnnotationInternalIdentifier(externalID));
     103    }
     104
     105    /**
     106     * Test of getAnnotationExternalIdentifier method, of class DBIntegrityServiceImlp.
    107107     */
    108108    @Test
     
    117117            }
    118118        });
    119         assertEquals(TestBackendConstants._TEST_ANNOT_2_EXT, daoDispatcher.getAnnotationExternalIdentifier(2).toString());
    120     }
    121 
    122     /**
    123      * Test of getUserInternalIdentifier method, of class DaoDispatcherImpl.
     119        assertEquals(TestBackendConstants._TEST_ANNOT_2_EXT, dbIntegrityService.getAnnotationExternalIdentifier(2).toString());
     120    }
     121
     122    /**
     123     * Test of getUserInternalIdentifier method, of class DBIntegrityServiceImlp.
    124124     */
    125125    @Test
     
    135135            }
    136136        });
    137         assertEquals(5, daoDispatcher.getUserInternalIdentifier(externalID));
    138     }
    139 
    140     /**
    141      * Test of getUserExternalIdentifier method, of class DaoDispatcherImpl.
     137        assertEquals(5, dbIntegrityService.getUserInternalIdentifier(externalID));
     138    }
     139
     140    /**
     141     * Test of getUserExternalIdentifier method, of class DBIntegrityServiceImlp.
    142142     */
    143143    @Test
     
    152152            }
    153153        });
    154         assertEquals(TestBackendConstants._TEST_USER_5_EXT_ID, daoDispatcher.getUserExternalIdentifier(5).toString());
    155     }
    156 
    157     /**
    158      * Test of getAnnotation method, of class DaoDispatcherImpl.
     154        assertEquals(TestBackendConstants._TEST_USER_5_EXT_ID, dbIntegrityService.getUserExternalIdentifier(5).toString());
     155    }
     156
     157    /**
     158     * Test of getAnnotation method, of class DBIntegrityServiceImlp.
    159159     */
    160160    @Test
     
    210210        });
    211211
    212         Annotation result = daoDispatcher.getAnnotation(1);
     212        Annotation result = dbIntegrityService.getAnnotation(1);
    213213        assertEquals(TestBackendConstants._TEST_ANNOT_2_EXT, result.getURI());
    214214        assertEquals(TestBackendConstants._TEST_ANNOT_2_BODY, result.getBody().getAny().get(0));
     
    225225
    226226    /**
    227      * Test of getFilteredAnnotationIDs method, of class DaoDispatcherImpl.
     227     * Test of getFilteredAnnotationIDs method, of class DBIntegrityServiceImlp.
    228228     */
    229229    @Test
     
    269269
    270270
    271         List result = daoDispatcher.getFilteredAnnotationIDs(link, text, access, namespace, owner, after, before);
     271        List result = dbIntegrityService.getFilteredAnnotationIDs(link, text, access, namespace, owner, after, before);
    272272        assertEquals(1, result.size());
    273273        assertEquals(2, result.get(0));
     
    276276    ////////////// ADDERS /////////////////////////
    277277    /**
    278      * Test of addCachedForVersion method, of class DaoDispatcherImpl.
     278     * Test of addCachedForVersion method, of class DBIntegrityServiceImlp.
    279279     */
    280280    @Test
     
    305305
    306306
    307         Number[] result = daoDispatcher.addCachedForVersion(versionID, newCached);
     307        Number[] result = dbIntegrityService.addCachedForVersion(versionID, newCached);
    308308        assertEquals(2, result.length);
    309309        assertEquals(1, result[0]);
     
    312312
    313313    /**
    314      * Test of addSiblingVersionForSource method, of class DaoDispatcherImpl.
     314     * Test of addSiblingVersionForSource method, of class DBIntegrityServiceImlp.
    315315     */
    316316    @Test
     
    337337        });
    338338
    339         Number[] result = daoDispatcher.addSiblingVersionForSource(1, mockVersion);
     339        Number[] result = dbIntegrityService.addSiblingVersionForSource(1, mockVersion);
    340340        assertEquals(2, result.length);
    341341        assertEquals(1, result[0]);
     
    358358            }
    359359        });
    360         Number[] resultTwo = daoDispatcher.addSiblingVersionForSource(1, mockVersionTwo);
     360        Number[] resultTwo = dbIntegrityService.addSiblingVersionForSource(1, mockVersionTwo);
    361361        assertEquals(2, resultTwo.length);
    362362        assertEquals(1, resultTwo[0]);
     
    365365
    366366    /**
    367      * Test of addSourcesForAnnotation method, of class DaoDispatcherImpl.
     367     * Test of addSourcesForAnnotation method, of class DBIntegrityServiceImlp.
    368368     */
    369369    @Test
     
    392392        });
    393393
    394         Map<String, String> result = daoDispatcher.addSourcesForAnnotation(1, mockSourceSOne);
     394        Map<String, String> result = dbIntegrityService.addSourcesForAnnotation(1, mockSourceSOne);
    395395        assertEquals(0, result.size());
    396396
     
    405405        mockSourceSTwo.add(testSourceTwo);
    406406
    407 //        final Source mockNewSource = daoDispatcher.createSource(testNewSource);
    408 //        final Version mockNewVersion = daoDispatcher.createVersion(testNewSource);
     407//        final Source mockNewSource = dbIntegrityService.createSource(testNewSource);
     408//        final Version mockNewVersion = dbIntegrityService.createVersion(testNewSource);
    409409
    410410        mockery.checking(new Expectations() {
     
    432432        });
    433433
    434         Map<String, String> resultTwo = daoDispatcher.addSourcesForAnnotation(1, mockSourceSTwo);
     434        Map<String, String> resultTwo = dbIntegrityService.addSourcesForAnnotation(1, mockSourceSTwo);
    435435        assertEquals(1, resultTwo.size());
    436436        assertFalse(null == resultTwo.get(testNewSource.getId()));
     
    439439
    440440    /**
    441      * Test of addUsersAnnotation method, of class DaoDispatcherImpl.
     441     * Test of addUsersAnnotation method, of class DBIntegrityServiceImlp.
    442442     */
    443443    @Test
     
    470470        });
    471471
    472         Number result = daoDispatcher.addUsersAnnotation(testAnnotation, 5);
     472        Number result = dbIntegrityService.addUsersAnnotation(testAnnotation, 5);
    473473        assertEquals(6, result);
    474474    }
     
    476476    //////////////////// DELETERS ////////////////
    477477    /**
    478      * Test of deleteCachedForVersion method, of class DaoDispatcherImpl.
     478     * Test of deleteCachedForVersion method, of class DBIntegrityServiceImlp.
    479479     */
    480480    @Test
     
    492492        });
    493493
    494         int[] result = daoDispatcher.deleteCachedOfVersion(6, 5);
     494        int[] result = dbIntegrityService.deleteCachedOfVersion(6, 5);
    495495        assertEquals(2, result.length);
    496496        assertEquals(1, result[0]);
     
    524524        });
    525525
    526         int[] result = daoDispatcher.deleteAllCachedOfVersion(6);
     526        int[] result = dbIntegrityService.deleteAllCachedOfVersion(6);
    527527        assertEquals(1, result[0]); //version
    528528        assertEquals(1, result[1]); // versions-cached
     
    540540
    541541
    542         int[] resultTwo = daoDispatcher.deleteAllCachedOfVersion(5); // version is in use by the source 4
     542        int[] resultTwo = dbIntegrityService.deleteAllCachedOfVersion(5); // version is in use by the source 4
    543543        assertEquals(0, resultTwo[0]);
    544544        assertEquals(0, resultTwo[1]);
     
    557557        });
    558558
    559         int[] result = daoDispatcher.deleteAllVersionsOfSource(1); //the source is in use, should not be deleted
     559        int[] result = dbIntegrityService.deleteAllVersionsOfSource(1); //the source is in use, should not be deleted
    560560        assertEquals(0, result[0]); //
    561561        assertEquals(0, result[1]);
     
    592592
    593593
    594         int[] resultTwo = daoDispatcher.deleteAllVersionsOfSource(5);// the source will be deleted because it is not referred by any annotation
     594        int[] resultTwo = dbIntegrityService.deleteAllVersionsOfSource(5);// the source will be deleted because it is not referred by any annotation
    595595        assertEquals(3, resultTwo.length);
    596596        assertEquals(1, resultTwo[0]); // source 7 is deleted
     
    600600
    601601    /**
    602      * Test of deleteAnnotationWithSources method, of class DaoDispatcherImpl.
     602     * Test of deleteAnnotationWithSources method, of class DBIntegrityServiceImlp.
    603603     */
    604604    @Test
     
    628628            }
    629629        });
    630         int[] result = daoDispatcher.deleteAnnotation(3);// the source will be deleted because it is not referred by any annotation
     630        int[] result = dbIntegrityService.deleteAnnotation(3);// the source will be deleted because it is not referred by any annotation
    631631        assertEquals(4, result.length);
    632632        assertEquals(1, result[0]); // annotation 3 is deleted
     
    643643//        newSourceInfo.setVersion(null);
    644644//       
    645 //        Source result = daoDispatcher.createSource(newSourceInfo);
     645//        Source result = dbIntegrityService.createSource(newSourceInfo);
    646646//        assertEquals(TestBackendConstants._TEST_NEW_SOURCE_LINK, result.getLink());
    647647//        assertFalse(null == result.getURI());
     
    655655//        newSourceInfo.setVersion(null);
    656656//       
    657 //        Version result = daoDispatcher.createVersion(newSourceInfo);
     657//        Version result = dbIntegrityService.createVersion(newSourceInfo);
    658658//        assertFalse(null == result.getVersion()); // will be chnaged once the schema for version is fixed: ID is added
    659659//       
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/dao/impl/JdbcNotebookDaoTest.java

    r3463 r3477  
    5151    "/spring-test-config/mockSourceDao.xml", "/spring-test-config/mockUserDao.xml",
    5252    "/spring-test-config/mockCachedRepresentationDao.xml", "/spring-test-config/mockVersionDao.xml",
    53     "/spring-test-config/dataSource.xml", "/spring-test-config/mockDaoDispatcher.xml","/spring-config/notebookDao.xml"})
     53    "/spring-test-config/dataSource.xml", "/spring-test-config/mockDBIntegrityService.xml","/spring-config/notebookDao.xml"})
    5454public class JdbcNotebookDaoTest extends JdbcResourceDaoTest{
    5555
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/rest/AnnotationResourceTest.java

    r3461 r3477  
    1818package eu.dasish.annotation.backend.rest;
    1919
    20 import eu.dasish.annotation.backend.dao.DaoDispatcher;
     20import eu.dasish.annotation.backend.dao.DBIntegrityService;
    2121import com.sun.jersey.api.client.GenericType;
    2222import eu.dasish.annotation.backend.Helpers;
     
    4747
    4848@RunWith(value = SpringJUnit4ClassRunner.class)
    49 @ContextConfiguration(locations = { "/spring-test-config/mockery.xml", "/spring-test-config/mockDaoDispatcher.xml",
     49@ContextConfiguration(locations = { "/spring-test-config/mockery.xml", "/spring-test-config/mockDBIntegrityService.xml",
    5050"/spring-test-config/mockAnnotationDao.xml","/spring-test-config/mockUserDao.xml", "/spring-test-config/mockNotebookDao.xml",
    5151"/spring-test-config/mockSourceDao.xml", "/spring-test-config/mockVersionDao.xml", "/spring-test-config/mockCachedRepresentationDao.xml"})
     
    5555    private Mockery mockery;
    5656    @Autowired
    57     private DaoDispatcher daoDispatcher;
     57    private DBIntegrityService daoDispatcher;
    5858    @Autowired
    5959    private AnnotationResource annotationResource;
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/rest/AnnotationsTest.java

    r3461 r3477  
    1818package eu.dasish.annotation.backend.rest;
    1919
    20 import eu.dasish.annotation.backend.dao.DaoDispatcher;
     20import eu.dasish.annotation.backend.dao.DBIntegrityService;
    2121import com.sun.jersey.api.client.ClientResponse;
    2222import eu.dasish.annotation.backend.Helpers;
     
    4040public class AnnotationsTest extends ResourcesTest{
    4141   
    42     private DaoDispatcher daoDispatcher;
     42    private DBIntegrityService daoDispatcher;
    4343   
    4444    public AnnotationsTest() {
    4545        super(AnnotationResource.class.getPackage().getName());       
    46         daoDispatcher = webAppContext.getBean(DaoDispatcher.class);
     46        daoDispatcher = webAppContext.getBean(DBIntegrityService.class);
    4747    }
    4848   
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/rest/NotebookResourceTest.java

    r3463 r3477  
    4444@RunWith(value = SpringJUnit4ClassRunner.class)
    4545@ContextConfiguration(locations = {"/spring-test-config/dataSource.xml", "/spring-test-config/mockAnnotationDao.xml", "/spring-test-config/mockUserDao.xml",
    46     "/spring-test-config/mockSourceDao.xml", "/spring-test-config/mockNotebookDao.xml", "/spring-test-config/mockDaoDispatcher.xml", "/spring-test-config/mockery.xml"})
     46    "/spring-test-config/mockSourceDao.xml", "/spring-test-config/mockNotebookDao.xml", "/spring-test-config/mockDBIntegrityService.xml", "/spring-test-config/mockery.xml"})
    4747public class NotebookResourceTest {
    4848
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/resources/spring-test-config/mockDBIntegrityService.xml

    r3450 r3477  
    2929           
    3030    <!-- Mocked dispatcher -->
    31     <bean id="daoDispatcher" factory-bean="mockObjectsFactory" factory-method="newDaoDispatcher" />
     31    <bean id="dbIntegrityService" factory-bean="mockObjectsFactory" factory-method="newDBIntegrityService" />
    3232   
    3333</beans>
Note: See TracChangeset for help on using the changeset viewer.