Package atg.adapter.gsa

Examples of atg.adapter.gsa.GSARepository


        songsRepositoryTest();
    }

    private void songsRepositoryTest()
            throws TransactionDemarcationException, RepositoryException, IOException {
        GSARepository songsRepository = (GSARepository) resolveNucleusComponent(
                "/GettingStarted/SongsRepository"
        );
        assertNotNull(songsRepository);

        final TransactionDemarcation td = new TransactionDemarcation();
        assertNotNull(td);

        try {
            // Start a new transaction
            td.begin(songsRepository.getTransactionManager());
            // Create a new artist
            MutableRepositoryItem artist = songsRepository.createItem("artist");
            artist.setPropertyValue("name", "joe");
            // Persist to the repository
            songsRepository.addItem(artist);
            // Try to get it back from the repository
            String id = artist.getRepositoryId();
            RepositoryItem retrievedArtist = songsRepository.getItem(
                    id, "artist"
            );

            assertEquals(artist, retrievedArtist);
        } finally {
View Full Code Here


                null,
                null,
                true
        );
        Nucleus n = startNucleus(pConfigPathWhereToCreateTheRepository);
        GSARepository r = (GSARepository) n.resolveName(repositoryComponentPath);
        try {
            getClass().getMethod(pMethodName, new Class[] { GSARepository.class })
                    .invoke(this, r);
        } catch ( NoSuchMethodError e ) {
            throw new AssertionError(
View Full Code Here

        Configuration c = pRepository.getServiceConfiguration();
        Nucleus n = pRepository.getNucleus();
        NucleusNameResolver r = new NucleusNameResolver(
                n, n, pRepository.getNameContext(), true
        );
        GSARepository newRepository = null;
        if (pRepository instanceof VersionRepository) {
            newRepository = (GSARepository) c.createNewInstance(((VersionRepository) pRepository).getWrappedRepository());
            c.configureService(
                    newRepository, r, ((VersionRepository) pRepository).getWrappedRepository()
            );
        }
        else {
            newRepository = (GSARepository) c.createNewInstance(pRepository);
            c.configureService(newRepository, r, pRepository);
        }
        newRepository.setDataSource(pDS);
        newRepository.setForeignRepositorySuffix("-Shadow");

    /*
    // Fool this new repository into thinking that it has been
    // bound to the same name context as the original repository
    // This changes will make sure that getAbsoluteName() returns
View Full Code Here

TOP

Related Classes of atg.adapter.gsa.GSARepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.