Examples of StoreInfo


Examples of org.geoserver.catalog.StoreInfo

    }

    public void validate(final IValidatable validatable) {

        final Catalog catalog = GeoServerApplication.get().getCatalog();
        final StoreInfo store = catalog.getStore(storeId, StoreInfo.class);
        final WorkspaceInfo previousWorkspace = catalog.getWorkspace(wsId);

        final WorkspaceInfo newWorkspace = (WorkspaceInfo) validatable.getValue();
        if (previousWorkspace.equals(newWorkspace)) {
            return;
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        selectLayers.setVisible(storeId != null);
        selectLayersContainer.add(selectLayers);
       
        selectLayers.add(storeName = new Label("storeName", new Model()));
        if(storeId != null) {
            StoreInfo store = getCatalog().getStore(storeId, StoreInfo.class);
            storeName.setModelObject(store.getName());
        }
       
        provider = new NewLayerPageProvider();
        provider.setStoreId(storeId);
        provider.setShowPublished(true);
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        stores.add(new AjaxFormComponentUpdatingBehavior("onchange") {
           
            @Override
            protected void onUpdate(AjaxRequestTarget target) {
                if (stores.getModelObject() != null) {
                    StoreInfo store = (StoreInfo) stores.getModelObject();
                    provider.setStoreId(store.getId());
                    storeName.setModelObject(store.getName());
                    selectLayers.setVisible(true);

                    // make sure we can actually list the contents, it may happen
                    // the store is actually unreachable, in that case we
                    // want to display an error message
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

     * @param resource
     * @return
     */
    LayerInfo buildLayerInfo(Resource resource) {
        Catalog catalog = getCatalog();
        StoreInfo store = catalog.getStore(getSelectedStoreId(), StoreInfo.class);

        // try to build from coverage store or data store
        try {
            CatalogBuilder builder = new CatalogBuilder(catalog);
            builder.setStore(store);
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

    }
   
    static final class StoreListChoiceRenderer implements IChoiceRenderer {

        public Object getDisplayValue(Object store) {
            StoreInfo info = (StoreInfo) store;
            return new StringBuilder(info.getWorkspace().getName()).append(':').append(
                    info.getName());
        }
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

            return;
        }

        Catalog catalog = GeoServerApplication.get().getCatalog();

        final StoreInfo existing = catalog.getStoreByName(workspace, name, StoreInfo.class);
        if (existing != null) {
            final String existingId = existing.getId();
            if (!existingId.equals(edittingStoreId)) {
                ValidationError error = new ValidationError();
                error.addMessageKey("StoreNameValidator.storeExistsInWorkspace");
                error.setVariable("workspace", workspace.getName());
                error.setVariable("storeName", name);
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        List<StoreInfo> stores = catalog.getStoresByWorkspace("sf",StoreInfo.class);
        NodeList links = xp.getMatchingNodes("//html:a", dom );
        assertEquals( stores.size(), links.getLength() );
       
        for ( int i = 0; i < stores.size(); i++ ){
            StoreInfo store = stores.get( i );
            Element link = (Element) links.item( i );
           
            assertTrue( link.getAttribute("href").endsWith( store.getName() + ".html") );
        }
    }
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

            return new ArrayList<Resource>();
       
        // else, grab the resource list
        try {
            List<Resource> result;
            StoreInfo store = getCatalog().getStore(storeId, StoreInfo.class);
           
            Map<String, Resource> resources = new HashMap<String, Resource>();
            if(store instanceof DataStoreInfo) {
                DataStoreInfo dstore = (DataStoreInfo) store;
               
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        assertFalse(group.getLayers().contains(layer));
    }
   
    public void testCascadeStore() {
        String citeStore = MockData.CITE_PREFIX;
        StoreInfo store = catalog.getStoreByName(citeStore, StoreInfo.class);
        String buildings = getLayerId(MockData.BUILDINGS);
        String lakes = getLayerId(MockData.LAKES);
        assertNotNull(store);
        assertNotNull(catalog.getLayerByName(buildings));
        assertNotNull(catalog.getResourceByName(buildings, ResourceInfo.class));
        assertNotNull(catalog.getLayerByName(lakes));
        assertNotNull(catalog.getResourceByName(lakes, ResourceInfo.class));
        assertNotNull(catalog.getLayerGroupByName(LAKES_GROUP));
       
        store.accept(visitor);
       
        assertNull(catalog.getStoreByName(citeStore, StoreInfo.class));
        assertNull(catalog.getLayerByName(buildings));
        assertNull(catalog.getResourceByName(buildings, ResourceInfo.class));
        assertNull(catalog.getLayerByName(lakes));
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

    private Component storeLink(String id, final IModel model) {
        IModel storeModel = STORE.getModel(model);
        String wsName = (String) WORKSPACE.getModel(model).getObject();
        String storeName = (String) storeModel.getObject();
        StoreInfo store = getCatalog().getStoreByName(wsName, storeName, StoreInfo.class);
        if(store instanceof DataStoreInfo) {
            return new SimpleBookmarkableLink(id, DataAccessEditPage.class, storeModel,
                    DataAccessEditPage.STORE_NAME, storeName,
                    DataAccessEditPage.WS_NAME, wsName);
        } else {
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.