Package org.exist.dom

Examples of org.exist.dom.LockToken


              for (final Iterator<DocumentImpl> i = collection.iterator(broker); i.hasNext(); ) {
                  doc = i.next();
                 
                  // Include only when (1) locktoken is present or (2)
                  // locktoken indicates that it is not a null resource
                  final LockToken lock = doc.getMetadata().getLockToken();
                  if(lock==null || (!lock.isNullResource()) ){
                      allresources.add( doc.getURI() );
                  }
              }
             
              // Copy content of list into String array.
View Full Code Here


                    LOG.debug(String.format("Resource is locked by %s", userLock.getName()));
                }
                throw new PermissionDeniedException(userLock.getName());
            }

            LockToken lockToken = document.getMetadata().getLockToken();

            if (!token.equals(lockToken.getOpaqueLockToken())) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Token does not match");
                }
                throw new PermissionDeniedException(String.format("Token %s does not match %s", token, lockToken.getOpaqueLockToken()));
            }

            lockToken.setTimeOut(LockToken.LOCK_TIMEOUT_INFINITE);

            // Make token persistant
            txnManager = brokerPool.getTransactionManager();
            txn = txnManager.beginTransaction();
            broker.storeXMLResource(txn, document);
View Full Code Here

            DocumentImpl doc;
            for(final Iterator<DocumentImpl> i = collection.iterator(broker); i.hasNext(); ) {
                doc = i.next();
                // Include only when (1) lockToken is present or (2)
                // lockToken indicates that it is not a null resource
                final LockToken lock = doc.getMetadata().getLockToken();
                if (lock==null || (!lock.isNullResource())){
                    allresources.add(doc.getFileURI());
                }
            }
            // Copy content of list into String array.
            int j = 0;
View Full Code Here

TOP

Related Classes of org.exist.dom.LockToken

Copyright © 2018 www.massapicom. 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.