Examples of CatalogInfo


Examples of org.geoserver.catalog.CatalogInfo

    /**
     * @see org.geoserver.catalog.event.CatalogListener#handleModifyEvent(org.geoserver.catalog.event.CatalogModifyEvent)
     * @see #handlePostModifyEvent
     */
    public void handleModifyEvent(CatalogModifyEvent event) throws CatalogException {
        CatalogInfo source = event.getSource();
        if (source instanceof LayerInfo || source instanceof LayerGroupInfo
                || source instanceof FeatureTypeInfo || source instanceof CoverageInfo
                || source instanceof WMSLayerInfo || source instanceof WorkspaceInfo) {
            PRE_MODIFY_EVENT.set(event);

View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

     * </p>
     *
     * @see org.geoserver.catalog.event.CatalogListener#handlePostModifyEvent(org.geoserver.catalog.event.CatalogPostModifyEvent)
     */
    public void handlePostModifyEvent(final CatalogPostModifyEvent event) throws CatalogException {
        final CatalogInfo source = event.getSource();
        if (!(source instanceof LayerInfo || source instanceof LayerGroupInfo
                || source instanceof FeatureTypeInfo || source instanceof CoverageInfo
                || source instanceof WMSLayerInfo || source instanceof WorkspaceInfo)) {
            return;
        }
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

     *
     * @see org.geoserver.catalog.event.CatalogListener#handleRemoveEvent(org.geoserver.catalog.event.CatalogRemoveEvent)
     * @see GWC#removeTileLayers(List)
     */
    public void handleRemoveEvent(CatalogRemoveEvent event) throws CatalogException {
        CatalogInfo obj = event.getSource();
        if (!(obj instanceof LayerInfo || obj instanceof LayerGroupInfo)) {
            return;
        }
        if (!mediator.hasTileLayer(obj)) {
            return;
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

    }

    private Object readResolve() throws ObjectStreamException {
        // replace the main proxy object
        if(proxyObject instanceof CatalogInfo) {
            CatalogInfo replacement = replaceCatalogInfo((CatalogInfo) proxyObject);
            if(replacement != null) {
                proxyObject = unwrap(replacement);
            }
        }
       
        // any dirty property value
        if(properties != null) {
            for (Entry<String, Object> property : properties.entrySet()) {
                Object value = property.getValue();
                if(value instanceof CatalogInfo) {
                    CatalogInfo replacement = replaceCatalogInfo((CatalogInfo) value);
                    if(replacement != null) {
                        property.setValue(unwrap(replacement));
                    }
                } else if(value instanceof Collection) {
                    Collection clone = cloneCollection((Collection) value);
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

        MetadataMap clone = new MetadataMap();
        for (Entry<String, Serializable> entry : original.entrySet()) {
            String key = entry.getKey();
            Serializable value = entry.getValue();
            if(value instanceof CatalogInfo) {
                CatalogInfo replacement = replaceCatalogInfo((CatalogInfo) value);
                if(replacement != null) {
                    value = replacement;
                }
            }
           
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

        Class<? extends Collection> oldCollectionClass = oldCollection.getClass();
        try {
            Collection clone = oldCollectionClass.newInstance();
            for (Object o : oldCollection) {
                if(o instanceof CatalogInfo) {
                    CatalogInfo replacement = replaceCatalogInfo((CatalogInfo) o);
                    if(replacement != null) {
                        clone.add(unwrap(replacement));
                    } else {
                        clone.add(o);
                    }
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

    private CatalogInfo replaceCatalogInfo(CatalogInfo ci) {
        String id = ci.getId();
        Catalog catalog = (Catalog) GeoServerExtensions.bean("catalog");
        FilterFactory ff = CommonFactoryFinder.getFilterFactory();
        Class iface = getCatalogInfoInterface(ci.getClass());
        CatalogInfo replacement = catalog.get(iface, ff.equal(ff.property("id"), ff.literal(id), true));
        return replacement;
    }
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

     * <p>
     *
     * @see org.geoserver.catalog.event.CatalogListener#handleModifyEvent(org.geoserver.catalog.event.CatalogModifyEvent)
     */
    public void handleModifyEvent(CatalogModifyEvent event) throws CatalogException {
        CatalogInfo source = event.getSource();
        if (!(source instanceof StyleInfo)) {
            return;
        }
        final List<String> propertyNames = event.getPropertyNames();
        if (!propertyNames.contains("name")) {
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

    protected void beforeSaved(CatalogInfo object) {
        // 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<String> propertyNames = h.getPropertyNames();
        List<Object> newValues = h.getNewValues();
        List<Object> oldValues = h.getOldValues();
View Full Code Here

Examples of org.geoserver.catalog.CatalogInfo

        return real;
    }

    protected void afterSaved(CatalogInfo object) {
        CatalogInfo real = ModificationProxy.unwrap(object);

        // fire the post modify event
        getCatalog().firePostModified(real);
    }
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.