Examples of addAuthorization()


Examples of org.geotools.data.DefaultTransaction.addAuthorization()

                if (numberLocked > 0) {
                    Transaction t = new DefaultTransaction();

                    try {
                        try {
                            t.addAuthorization(response.getLockId());
                            DataStore dataStore = (DataStore) source.getDataStore();
                            dataStore.getLockingManager().refresh(response.getLockId(), t);
                        } finally {
                            t.commit();
                        }
View Full Code Here

Examples of org.geotools.data.DefaultTransaction.addAuthorization()

                org.geotools.data.Transaction t = new DefaultTransaction("Refresh "
                        + meta.getWorkspace().getName());

                try {
                    t.addAuthorization(lockId);

                    if (lockingManager.release(lockId, t)) {
                        refresh = true;
                    }
                } catch (IOException e) {
View Full Code Here

Examples of org.geotools.data.DefaultTransaction.addAuthorization()

                org.geotools.data.Transaction t = new DefaultTransaction("Refresh "
                        + meta.getWorkspace().getName());

                try {
                    t.addAuthorization(lockId);

                    if (lockingManager.refresh(lockId, t)) {
                        refresh = true;
                    }
                } catch (IOException e) {
View Full Code Here

Examples of org.geotools.data.DefaultTransaction.addAuthorization()

      IOException {
    final LockingManagement memoryLockManager = new MemoryLockManager(
        "default");
    final Transaction t1 = Transaction.AUTO_COMMIT;
    final DefaultTransaction t2 = new DefaultTransaction();
    t2.addAuthorization("auth1");
    FeatureLock lock = new FeatureLock(
        "auth1",
        1 /* minute */);
    memoryLockManager.lockFeatureID(
        "sometime",
 
View Full Code Here

Examples of org.geotools.data.DefaultTransaction.addAuthorization()

      IOException {
    final LockingManagement memoryLockManager = new MemoryLockManager(
        "default");
    final Transaction t1 = Transaction.AUTO_COMMIT;
    final DefaultTransaction t2 = new DefaultTransaction();
    t2.addAuthorization("auth1");
    FeatureLock lock = new FeatureLock(
        "auth1",
        1 /* minute */);
    memoryLockManager.lockFeatureID(
        "sometime",
 
View Full Code Here

Examples of org.geotools.data.DefaultTransaction.addAuthorization()

                if (numberLocked > 0) {
                    Transaction t = new DefaultTransaction();

                    try {
                        try {
                            t.addAuthorization(fLock.getAuthorization());
                            DataStore dataStore = (DataStore) source.getDataStore();
                            dataStore.getLockingManager().refresh(fLock.getAuthorization(), t);
                        } finally {
                            t.commit();
                        }
View Full Code Here

Examples of org.geotools.data.DefaultTransaction.addAuthorization()

                org.geotools.data.Transaction t = new DefaultTransaction("Refresh "
                        + meta.getWorkspace().getName());

                try {
                    t.addAuthorization(lockId);

                    if (lockingManager.release(lockId, t)) {
                        refresh = true;
                    }
                } catch (IOException e) {
View Full Code Here

Examples of org.geotools.data.DefaultTransaction.addAuthorization()

                org.geotools.data.Transaction t = new DefaultTransaction("Refresh "
                        + meta.getWorkspace().getName());

                try {
                    t.addAuthorization(lockId);

                    if (lockingManager.refresh(lockId, t)) {
                        refresh = true;
                    }
                } catch (IOException e) {
View Full Code Here

Examples of org.geotools.data.DefaultTransaction.addAuthorization()

    public void testLockUnlockFilter() throws Exception {
        SimpleFeatureLocking fl;
        fl = (SimpleFeatureLocking) rts.getFeatureSource(RENAMED);
        final FeatureLock lock = FeatureLockFactory.generate(10 * 60 * 1000);
        Transaction t = new DefaultTransaction();
        t.addAuthorization(lock.getAuthorization());
        fl.setTransaction(t);
        fl.setFeatureLock(lock);

        SimpleFeatureLocking fl2;
        fl2 = (SimpleFeatureLocking) rts.getFeatureSource(RENAMED);
View Full Code Here

Examples of org.geotools.data.DefaultTransaction.addAuthorization()

    public void testLockUnlockQuery() throws Exception {
        SimpleFeatureLocking fl;
        fl = (SimpleFeatureLocking) rts.getFeatureSource(RENAMED);
        final FeatureLock lock = FeatureLockFactory.generate(10 * 60 * 1000);
        Transaction t = new DefaultTransaction();
        t.addAuthorization(lock.getAuthorization());
        fl.setTransaction(t);
        fl.setFeatureLock(lock);

        SimpleFeatureLocking fl2;
        fl2 = (SimpleFeatureLocking) rts.getFeatureSource(RENAMED);
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.