Examples of TransactionEvent


Examples of org.geoserver.wfs.TransactionEvent

    public List getHistoryList(String layername){
        List matches = new ArrayList();
        Iterator it = myHistory.iterator();

        while (it.hasNext()){
            TransactionEvent e = (TransactionEvent) it.next();
            if ( e.getLayerName().equals( layername ) ) {
                matches.add( e );
            }
        }
       
        return matches;
View Full Code Here

Examples of org.geoserver.wfs.TransactionEvent

            Filter updatedFilter = filterFactory.id(updatedIds);
            Filter deletedFilter = filterFactory.id(deletedIds);

            // notify pre-update and pre-delete
           
            listener.dataStoreChange(new TransactionEvent(TransactionEventType.PRE_UPDATE, layerName,
                    vstore.getFeatures(updatedFilter), rollback));
            listener.dataStoreChange(new TransactionEvent(TransactionEventType.PRE_DELETE, layerName,
                    vstore.getFeatures(deletedFilter), rollback));

            // now do the actual rollback
            try {
                vstore.rollback(version, (Filter) rollback.getFilter(), users);
            } catch (Exception e) {
                throw new WFSTransactionException("Could not perform the rollback", e, rollback
                        .getHandle());
            }

            // notify post update and post insert
            listener.dataStoreChange(new TransactionEvent(TransactionEventType.POST_INSERT, layerName,
                    vstore.getFeatures(insertedFilter)));
            listener.dataStoreChange(new TransactionEvent(TransactionEventType.POST_UPDATE, layerName,
                    vstore.getFeatures(updatedFilter)));

            // update summary information
            response.getTransactionSummary().setTotalInserted(BigInteger.valueOf(inserted));
            response.getTransactionSummary().setTotalUpdated(BigInteger.valueOf(updated));
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.