Search in sources :

Example 6 with CompositeVDB

use of org.teiid.deployers.CompositeVDB in project teiid by teiid.

the class TestResteasyEnabler method testOtherModels.

@Test
public void testOtherModels() throws VirtualDatabaseException {
    RestWarGenerator generator = Mockito.mock(RestWarGenerator.class);
    ResteasyEnabler resteasyEnabler = new ResteasyEnabler(generator) {

        Admin getAdmin() {
            return Mockito.mock(Admin.class);
        }

        Executor getExecutor() {
            return ExecutorUtils.getDirectExecutor();
        }
    };
    MetadataStore ms = new MetadataStore();
    CompositeVDB vdb = TestCompositeVDB.createCompositeVDB(ms, "x");
    vdb.getVDB().addProperty("{http://teiid.org/rest}auto-generate", "true");
    ModelMetaData model = new ModelMetaData();
    model.setName("other");
    model.setModelType(Type.OTHER);
    vdb.getVDB().addModel(model);
    resteasyEnabler.finishedDeployment("x", vdb);
}
Also used : MetadataStore(org.teiid.metadata.MetadataStore) TestCompositeVDB(org.teiid.deployers.TestCompositeVDB) CompositeVDB(org.teiid.deployers.CompositeVDB) RestWarGenerator(org.teiid.deployers.RestWarGenerator) ModelMetaData(org.teiid.adminapi.impl.ModelMetaData) Test(org.junit.Test)

Aggregations

CompositeVDB (org.teiid.deployers.CompositeVDB)6 MetadataStore (org.teiid.metadata.MetadataStore)4 ModelMetaData (org.teiid.adminapi.impl.ModelMetaData)3 VDBLifeCycleListener (org.teiid.deployers.VDBLifeCycleListener)3 Test (org.junit.Test)2 SessionMetadata (org.teiid.adminapi.impl.SessionMetadata)2 VDBMetaData (org.teiid.adminapi.impl.VDBMetaData)2 TestCompositeVDB (org.teiid.deployers.TestCompositeVDB)2 Collection (java.util.Collection)1 Date (java.util.Date)1 StartException (org.jboss.msc.service.StartException)1 Translator (org.teiid.adminapi.Translator)1 VDBTranslatorMetaData (org.teiid.adminapi.impl.VDBTranslatorMetaData)1 InvalidSessionException (org.teiid.client.security.InvalidSessionException)1 CompositeGlobalTableStore (org.teiid.deployers.CompositeGlobalTableStore)1 RestWarGenerator (org.teiid.deployers.RestWarGenerator)1 UDFMetaData (org.teiid.deployers.UDFMetaData)1 VirtualDatabaseException (org.teiid.deployers.VirtualDatabaseException)1 ConnectorManagerRepository (org.teiid.dqp.internal.datamgr.ConnectorManagerRepository)1 TranslatorRepository (org.teiid.dqp.internal.datamgr.TranslatorRepository)1