Examples of StoreInfo


Examples of net.suberic.pooka.StoreInfo

   * all available Stores will be listed, with their folders under them.
   */
  public MailFileSystemView() {
    Vector v = Pooka.getStoreManager().getStoreList();
    for (int i = v.size() - 1; i >= 0; i--) {
      StoreInfo current = (StoreInfo) v.elementAt(i);
      if (! current.isConnected())
        v.removeElementAt(i);
    }

    storeList = new StoreInfo[v.size()];
    for (int i = 0; i < v.size(); i++) {
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        }

        @Override
        protected Object load() {
            Catalog catalog = GeoServerApplication.get().getCatalog();
            StoreInfo storeInfo = catalog.getStore(id, StoreInfo.class);
            return storeInfo;
        }
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

            store.setWorkspace(catalogDAO.getDefaultWorkspace());
        }

        validate(store, true);
        resolve(store);
        StoreInfo unwrapped = ModificationProxy.unwrap(store);
        unwrapped.setWorkspace(ModificationProxy.unwrap(unwrapped.getWorkspace()));
        catalogDAO.save(unwrapped);
        ((StoreInfoImpl) store).setId(store.getId()); // make the ModificationProxy aware of the id
        if (LOGGER.isLoggable(Level.INFO))
            LOGGER.info("Added store " + store.getClass().getSimpleName() + "[id: " + store.getId()
                    + " name:" + store.getName() + "]");
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        if (store.getWorkspace() == null) {
            throw new IllegalArgumentException("Store must be part of a workspace");
        }

        WorkspaceInfo workspace = store.getWorkspace();
        StoreInfo existing = getStoreByName(workspace, store.getName(), StoreInfo.class);
        if (existing != null && !existing.getId().equals(store.getId())) {
            String msg = "Store '" + store.getName() + "' already exists in workspace '"
                    + workspace.getName() + "'";
            throw new IllegalArgumentException(msg);
        }
    }
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

    protected <T> List<T> createProxyList(List<T> list, Class<T> clazz) {
        return list;
    }

    public <T extends StoreInfo> T getStore(String id, Class<T> clazz) {
        StoreInfo store = catalogDAO.getStore(id, clazz);
        if (store == null) {
            return null;
        } else {
            resolve(store);
            return createProxy((T) store, (Class<T>) mapStoreClass(store));
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        }

        // look for secondary match
        List matches = catalogDAO.getStoresByName(name, clazz);
        if (matches.size() == 1) {
            StoreInfo store = (StoreInfo) matches.get(0);
            resolve(store);
            return createProxy((T) store, (Class<T>) mapStoreClass(store));
        }

        return null;
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

            workspace = catalogDAO.getDefaultWorkspace();
        } else {
            workspace = ModificationProxy.unwrap(workspace);
        }

        StoreInfo store = catalogDAO.getStoreByName(workspace, name, clazz);
        if (store == null) {
            return null;
        } else {
            resolve(store);
            return createProxy((T) store, (Class<T>) mapStoreClass(store));
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        validate(resource, true);
        resolve(resource);
        // resources.put(resource.getClass(), resource);
        ResourceInfo unwrappedResource = ModificationProxy.unwrap(resource);
        unwrappedResource.setNamespace(ModificationProxy.unwrap(unwrappedResource.getNamespace()));
        StoreInfo unwrappedStore = ModificationProxy.unwrap(resource.getStore());
        unwrappedResource.setStore(unwrappedStore);
        unwrappedStore.setWorkspace(ModificationProxy.unwrap(unwrappedStore.getWorkspace()));

        fixNativeName(unwrappedResource);

        catalogDAO.save(unwrappedResource);
        added(resource);
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        }
        if (resource.getNamespace() == null) {
            throw new IllegalArgumentException("Resource must be part of a namespace");
        }

        StoreInfo store = resource.getStore();
        ResourceInfo existing = getResourceByStore(store, resource.getName(), ResourceInfo.class);
        if (existing != null && !existing.getId().equals(resource.getId())) {
            String msg = "Resource named '" + resource.getName() + "' already exists in store: '"
                    + store.getName() + "'";
            throw new IllegalArgumentException(msg);
        }

        NamespaceInfo namespace = resource.getNamespace();
        existing = getResourceByName(namespace, resource.getName(), ResourceInfo.class);
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

    protected void resolve(ResourceInfo resource) {
        ResourceInfoImpl r = (ResourceInfoImpl) resource;

        // resolve the store
        StoreInfo resolved = ResolvingProxy.resolve(this, r.getStore());
        if (resolved != null) {
            resolve(resolved);
            r.setStore(resolved);
        }
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.