Examples of WorkspaceInfo


Examples of org.geoserver.catalog.WorkspaceInfo

                name, clazz);
    }

    public <T extends StoreInfo> List<T> getStoresByWorkspace(String workspaceName, Class<T> clazz) {

        WorkspaceInfo workspace = null;
        if (workspaceName != null) {
            workspace = getWorkspaceByName(workspaceName);
            if (workspace == null) {
                return Collections.EMPTY_LIST;
            }
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

    void validate(WorkspaceInfo workspace, boolean isNew) {
        if (isNull(workspace.getName())) {
            throw new NullPointerException("workspace name must not be null");
        }

        WorkspaceInfo existing = catalogDAO.getWorkspaceByName(workspace.getName());
        if (existing != null && !existing.getId().equals(workspace.getId())) {
            throw new IllegalArgumentException("Workspace named '" + workspace.getName()
                    + "' already exists.");
        }

    }
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

        saved(workspace);
    }

    public WorkspaceInfo getDefaultWorkspace() {
        WorkspaceInfo workspace = catalogDAO.getDefaultWorkspace();
        if (workspace != null) {
            resolve(workspace);
            return createProxy(workspace, WorkspaceInfo.class);
        } else
            return null;
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

    }

    public void setDefaultWorkspace(WorkspaceInfo workspace) {

        WorkspaceInfo wsold = catalogDAO.getDefaultWorkspace();
        WorkspaceInfo wsnew = catalogDAO.getWorkspaceByName(workspace.getName());
        if (wsnew == null) {
            throw new IllegalArgumentException("No such workspace: '" + workspace.getName() + "'");
        }

        if (wsold != null && wsold.getName().equals(wsnew.getName())) // setting existing default
            return;

        ((WorkspaceInfoImpl) wsnew).setDefault(true);
        catalogDAO.update(wsnew);
        if (wsold != null) {
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

        return createProxyList(workspaces, WorkspaceInfo.class);

    }

    public WorkspaceInfo getWorkspace(String id) {
        WorkspaceInfo workspace = catalogDAO.getWorkspace(id);
        if (workspace != null) {
            resolve(workspace);
            return createProxy(workspace, WorkspaceInfo.class);
        } else
            return null;
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

            return null;

    }

    public WorkspaceInfo getWorkspaceByName(String name) {
        WorkspaceInfo workspace = catalogDAO.getWorkspaceByName(name);
        if (workspace != null) {
            resolve(workspace);
            return createProxy(workspace, WorkspaceInfo.class);
        } else
            return null;
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

    protected void resolve(StoreInfo store) {
        StoreInfoImpl s = (StoreInfoImpl) store;

        // resolve the workspace
        WorkspaceInfo resolved = ResolvingProxy.resolve(this, s.getWorkspace());
        if (resolved != null) {
            s.setWorkspace(resolved);
        } else {
            // this means the workspace has not yet been added to the catalog, keep the proxy around
        }
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

        clearCatalog();
        removeExistingNS();

        // store needs a workspace...
        WorkspaceInfo ws = catalog.getFactory().createWorkspace();
        ws.setName("testDataStoreWorkspace");

        assertNull(ws.getId());
        catalog.add(ws);
        assertNotNull(ws.getId());

        endTransaction();
        startNewTransaction();

        // create a new store
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

        endTransaction();
        // ----------------------------------------------------------------------
        startNewTransaction();

        // store needs a workspace...
        WorkspaceInfo ws = catalog.getFactory().createWorkspace();
        ws.setName("testCoverageStoreWorkspace");
        catalog.add(ws);

        endTransaction();
        // ----------------------------------------------------------------------
        startNewTransaction();
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

        endTransaction();
        startNewTransaction();

        // store needs a workspace...
        WorkspaceInfo ws = catalog.getFactory().createWorkspace();
        ws.setName("testNamespaceWorkspace");
        catalog.add(ws);

        endTransaction();
        startNewTransaction();
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.