Examples of CatalogInfo


Examples of org.geoserver.catalog.CatalogInfo

        }

        ModificationProxy h = (ModificationProxy) Proxy.getInvocationHandler(object);

        // get the real object
        CatalogInfo real = (CatalogInfo) h.getProxyObject();

        // fire out what changed
        List propertyNames = h.getPropertyNames();
        List newValues = h.getNewValues();
        List oldValues = h.getOldValues();
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

        public void handleModifyEvent(CatalogModifyEvent event) {
        }

        public void handlePostModifyEvent(CatalogPostModifyEvent event) {
            CatalogInfo src = event.getSource();
            src.accept(catalogVisitor);
        }
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

     */
    protected void delete(CatalogInfo entity) {
//        if (!(entity instanceof Hibernable))
//            LOGGER.severe("Trying to handle a " + entity.getClass().getName());

        CatalogInfo attached = entityManager.merge(entity);
        entityManager.remove(attached);
        entityManager.flush();// TODO useless?
    }
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

        //this object is a proxy
        ModificationProxy h =
            (ModificationProxy) Proxy.getInvocationHandler(object);
       
        //get the real object
        CatalogInfo real = (CatalogInfo) h.getProxyObject();
       
        //fire out what changed
        List propertyNames = h.getPropertyNames();
        List newValues = h.getNewValues();
        List oldValues = h.getOldValues();
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

       
        // collect the objects that will be removed (besides the roots)
        Catalog catalog = GeoServerApplication.get().getCatalog();
        CascadeRemovalReporter visitor = new CascadeRemovalReporter(catalog);
        for (Iterator<CatalogInfo> i = (Iterator<CatalogInfo>) roots.iterator(); i.hasNext();) {
            CatalogInfo root = i.next();
            StringResourceModel reason = canRemove(root);
            if ( reason != null ) {
                notRemoved.put(root, reason);
                i.remove();
            }
            else {
                root.accept(visitor);
            }
        }
        visitor.removeAll(roots);
       
        // add roots
        WebMarkupContainer root = new WebMarkupContainer("rootObjects");
        root.add(new Label("rootObjectNames", names(roots)));
        root.setVisible( !roots.isEmpty() );
        add(root);
       
        // objects that could not be removed
        WebMarkupContainer nr = new WebMarkupContainer("notRemovedObjects");
        nr.setVisible( !notRemoved.isEmpty() );
        nr.add( notRemovedList(notRemoved));
        add(nr);
       
        // removed objects root (we show it if any removed object is on the list)
        WebMarkupContainer removed = new WebMarkupContainer("removedObjects");
        List<CatalogInfo> cascaded = visitor.getObjects(CatalogInfo.class, DELETE);
        // remove the resources, they are cascaded, but won't be show in the UI
        for (Iterator it = cascaded.iterator(); it.hasNext();) {
            CatalogInfo catalogInfo = (CatalogInfo) it.next();
            if(catalogInfo instanceof ResourceInfo)
                it.remove();
        }
        removed.setVisible(cascaded.size() > 0);
        add(removed);
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

        List<CatalogInfo> items = new ArrayList(notRemoved.keySet());
        ListView lv = new ListView("notRemovedList", items) {
           
            @Override
            protected void populateItem(ListItem item) {
                CatalogInfo object = (CatalogInfo) item.getModelObject();
                StringResourceModel reason = notRemoved.get(object);
                item.add( new Label( "name", name(object) ) );
                item.add( new Label( "reason", reason));
            }
        };
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

        //this object is a proxy
        ModificationProxy h =
            (ModificationProxy) Proxy.getInvocationHandler(object);
       
        //get the real object
        CatalogInfo real = (CatalogInfo) h.getProxyObject();
       
        //fire out what changed
        List propertyNames = h.getPropertyNames();
        List newValues = h.getNewValues();
        List oldValues = h.getOldValues();
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

        }       
    }
   
    @Override
    public Feature next() {
        CatalogInfo info = nextInternal();
       
        if (info instanceof ResourceInfo) {
          return convertToFeature( (ResourceInfo) info );
        } else {
          return convertToFeature( (LayerGroupInfo) info );
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

        final String name = RESTUtils.getAttribute(request, "layer");
        if (name == null) {
            throw new RestletException("No layer name specified", Status.CLIENT_ERROR_BAD_REQUEST);
        }
        final Catalog catalog = geoserver.getCatalog();
        CatalogInfo layer = catalog.getLayerByName(name);
        MetadataMap mdmap;
        if (layer == null) {
            layer = catalog.getLayerGroupByName(name);
            if (layer == null) {
                throw new RestletException("Layer " + name + " not found",
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

            final Class<? extends CatalogInfo> clazz) {
       
        org.opengis.filter.expression.Function visible = new InternalVolatileFunction() {
            @Override
            public Boolean evaluate(Object object) {
                CatalogInfo info = (CatalogInfo) object;
                if(info instanceof NamespaceInfo) {
                    info = getCatalog().getWorkspaceByName(((NamespaceInfo) info).getPrefix());
                }
                String name = (String) OwsUtils.property(info, "name", String.class);
                WrapperPolicy policy = getSecurityWrapper()
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.