Examples of StoreInfo


Examples of org.geoserver.catalog.StoreInfo

            Property<StoreInfo> property) {

        final CatalogIconFactory icons = CatalogIconFactory.get();

        if (property == TYPE) {
            final StoreInfo storeInfo = (StoreInfo) itemModel.getObject();

            ResourceReference storeIcon = icons.getStoreIcon(storeInfo);

            Fragment f = new Fragment(id, "iconFragment", StorePanel.this);
            f.add(new Image("storeIcon", storeIcon));

            return f;
        } else if (property == WORKSPACE) {
            return workspaceLink(id, itemModel);
        } else if (property == NAME) {
            return storeNameLink(id, itemModel);
        } else if (property == ENABLED) {
            final StoreInfo storeInfo = (StoreInfo) itemModel.getObject();
            ResourceReference enabledIcon;
            if (storeInfo.isEnabled()) {
                enabledIcon = icons.getEnabledIcon();
            } else {
                enabledIcon = icons.getDisabledIcon();
            }
            Fragment f = new Fragment(id, "iconFragment", StorePanel.this);
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

    private Component storeNameLink(String id, final IModel itemModel) {
        String wsName = (String) WORKSPACE.getModel(itemModel).getObject();
        IModel storeNameModel = NAME.getModel(itemModel);
        String storeName = (String) storeNameModel.getObject();
        StoreInfo store = getCatalog().getStoreByName(wsName, storeName, StoreInfo.class);
        if(store instanceof DataStoreInfo) {
            return new SimpleBookmarkableLink(id, DataAccessEditPage.class, storeNameModel,
                    DataAccessEditPage.STORE_NAME, storeName,
                    DataAccessEditPage.WS_NAME, wsName);
        } else {
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        return new SimpleBookmarkableLink(id, WorkspaceEditPage.class, nameModel,
                "name", (String) nameModel.getObject());
    }

    protected Component removeLink(String id, final IModel itemModel) {
        StoreInfo info = (StoreInfo) itemModel.getObject();

        ResourceModel resRemove = new ResourceModel("removeStore", "Remove");

        ParamResourceModel confirmRemove = new ParamResourceModel("confirmRemoveStoreX", this, info
                .getName());

        SimpleAjaxLink linkPanel = new ConfirmationAjaxLink(id, null, resRemove, confirmRemove) {
            public void onClick(AjaxRequestTarget target) {
                getCatalog().remove((StoreInfo) itemModel.getObject());
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

    /**
     * @see ResourceInfo#enabled()
     */
    public boolean enabled(){
        StoreInfo store = getStore();
        boolean storeEnabled = store != null && store.isEnabled();
        return storeEnabled && this.isEnabled();
    }
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        try (
                CloseableIterator<StoreInfo> sit = catalog.list(StoreInfo.class, equal("workspace", workspace))
        ) {
            while (sit.hasNext()) {
                StoreInfo store = sit.next();

                persist(store);
            }
        }
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        }
        if (!file.exists()) {
            return;
        }

        StoreInfo s = depersist(file, StoreInfo.class);
        s.setWorkspace(workspace);
        updateConnectionParams(s);
        catalog.add(s);

        for (File dir : storeDir.listFiles(DIRECTORY)) {
            loadResource(dir, s);
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        }
        return l;
    }

    protected StoreInfo findStore(String wsName, String name, Catalog cat) {
        StoreInfo s = cat.getStoreByName(wsName, name, StoreInfo.class);
        if (s == null) {
            throw new NotFoundException(String.format("No such store %s:%s", wsName, name));
        }
        return s;
    }
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

                .put("workspace", wsName)
                .put("title", title(layer))
                .put("description", description(layer))
                .put("type", type.toString());
       
        StoreInfo store = r.getStore();
        if( req != null ){
            obj.putObject("resource")
                .put("name",r.getName())
                .put("store",store.getName())
                .put("workspace",wsName)
                .put("url",
                     url(req, "/stores/%s/%s/%s",wsName, store.getName(),r.getName())
                );
        }
       
        JSONArr keywords = new JSONArr();
        keywords.raw().addAll( r.keywordValues() );
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        String storeName = ref.str("store");
        Name resourceName = new NameImpl(ref.str("name"));

        CatalogBuilder builder = new CatalogBuilder(cat);

        StoreInfo store = findStore(ws.getName(), storeName, cat);

        if( store instanceof DataStoreInfo){
            DataStoreInfo dataStore = (DataStoreInfo) store;
            builder.setStore(dataStore);
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

//            obj.put("name", info.getName());
            obj.put("url",IO.url(req,"/layers/%s/%s",wsName,r.getName()));
//            obj.put("title", IO.title(info));
//            obj.put("description", IO.description(info));
//            obj.put("type",IO.Type.of(info.getResource()).toString());
            StoreInfo store = r.getStore();
            obj.putObject("resource")
                .put("name",r.getNativeName())
                .put("workspace",wsName)
                .put("store",store.getName())
                    .put("url",
                         IO.url(req, "/stores/%s/%s/%s", wsName, store.getName(),r.getNativeName())
                );
           
        } else if (l instanceof LayerGroupInfo) {
            LayerGroupInfo group = (LayerGroupInfo) l;
           
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.