Examples of WorkspaceInfoImpl


Examples of org.geoserver.catalog.impl.WorkspaceInfoImpl

   
    @Before
    public void setUp() throws Exception {
        // make a nice little catalog that does always tell us stuff is there
        Catalog catalog = createNiceMock(Catalog.class);
        expect(catalog.getWorkspaceByName((String) anyObject())).andReturn(new WorkspaceInfoImpl()).anyTimes();
        expect(catalog.getLayerByName((String) anyObject())).andReturn(new LayerInfoImpl()).anyTimes();
        replay(catalog);
       
        // prepare some base rules
        props = new Properties();
View Full Code Here

Examples of org.geoserver.catalog.impl.WorkspaceInfoImpl

       
        NamespaceInfoImpl ns = new NamespaceInfoImpl();
        ns.setPrefix("fakeWs");
        ns.setURI("http://fakews.org");

        WorkspaceInfoImpl workspace = new WorkspaceInfoImpl();
        workspace.setId("fakeWs");
        workspace.setName("fakeWs");

        DataStoreInfoImpl dataStoreInfo = new DataStoreInfoImpl(catalog);
        dataStoreInfo.setName("fakeDs");
        dataStoreInfo.setId("fakeDs");
        dataStoreInfo.setWorkspace(workspace);
View Full Code Here

Examples of org.geoserver.catalog.impl.WorkspaceInfoImpl

        namespaceInfo.setId("testNs");
        namespaceInfo.setPrefix(TEST_NS_PREFIX);
        namespaceInfo.setURI(TEST_NAMESPACE);
        catalog.add(namespaceInfo);

        workspaceInfo = new WorkspaceInfoImpl();
        catalog.setDefaultWorkspace(workspaceInfo);

        defaultStyle = new StyleInfoImpl(catalog) {
            /**
             * Override so it does not try to load a file from disk
View Full Code Here

Examples of org.geoserver.catalog.impl.WorkspaceInfoImpl

    }

    private CatalogInfo prototype(CatalogInfo original, Catalog catalog) {
        CatalogInfo prototype;
        if (original instanceof WorkspaceInfo) {
            prototype = new WorkspaceInfoImpl();
        } else if (original instanceof DataStoreInfo) {
            prototype = new DataStoreInfoImpl(catalog);
        } else if (original instanceof CoverageStoreInfo) {
            prototype = new CoverageStoreInfoImpl(catalog);
        } else if (original instanceof WMSStoreInfo) {
View Full Code Here

Examples of org.geoserver.catalog.impl.WorkspaceInfoImpl

    }
   
    @Test
    public void testRequest() throws InterruptedException, ExecutionException {
        // setup the state
        final WorkspaceInfo ws = new WorkspaceInfoImpl();
        LocalWorkspace.set(ws);
        // test it's transferred properly using the base class machinery
        testThreadLocalTransfer(new ThreadLocalTransferCallable(new LocalWorkspaceThreadLocalTransfer()) {
           
            @Override
View Full Code Here

Examples of org.geoserver.catalog.impl.WorkspaceInfoImpl

    public void testThreadLocalTransfer() throws InterruptedException, ExecutionException {
        final Request request = new Request();
        Dispatcher.REQUEST.set(request);
        final LayerInfo layer = new LayerInfoImpl();
        LocalLayer.set(layer);
        final WorkspaceInfo ws = new WorkspaceInfoImpl();
        LocalWorkspace.set(ws);
        final Object myState = new Object();
        AdminRequest.start(myState);
        final Authentication auth = new UsernamePasswordAuthenticationToken("user", "password");
        SecurityContextHolder.getContext().setAuthentication(auth);
View Full Code Here

Examples of org.geoserver.catalog.impl.WorkspaceInfoImpl

        namespaceInfo.setId("testNs");
        namespaceInfo.setPrefix(TEST_NS_PREFIX);
        namespaceInfo.setURI(TEST_NAMESPACE);
        catalog.add(namespaceInfo);

        workspaceInfo = new WorkspaceInfoImpl();
        catalog.setDefaultWorkspace(workspaceInfo);

        defaultStyle = new StyleInfoImpl(catalog) {
            /**
             * Override so it does not try to load a file from disk
View Full Code Here

Examples of org.geoserver.catalog.impl.WorkspaceInfoImpl

                       map.put( null, ns );
                   }
                   LOGGER.info( "Loading namespace '" + ns.getPrefix() + "'" );
               }
               else {
                   WorkspaceInfoImpl ws = (WorkspaceInfoImpl) context.convertAnother( map, WorkspaceInfoImpl.class );
                   map.put( ws.getName() , ws );
                   if ( def ) {
                       map.put( null, ws );
                   }
                   LOGGER.info( "Loading workspace '" + ws.getName() + "'" );
               }
              
               reader.moveUp();
            }
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.