Examples of openCollection()


Examples of org.exist.storage.DBBroker.openCollection()

        DBBroker broker = null;
        Collection collection = null;

        try {
            broker = factory.getBrokerPool().get(user);
            collection = broker.openCollection(uri, Lock.READ_LOCK);
            Permission perm = null;
            if(collection == null) {
                DocumentImpl doc = null;
                try {
                    doc = broker.getXMLResource(uri, Lock.READ_LOCK);
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

        DBBroker broker = null;
        Collection collection = null;

        try {
            broker = factory.getBrokerPool().get(user);
            collection = broker.openCollection(uri, Lock.READ_LOCK);
            Permission perm = null;
            if(collection == null) {
                throw new EXistException("collection " + uri + " not found");
            } else {
                perm = collection.getSubCollectionEntry(broker, name).getPermissions();
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

        DBBroker broker = null;
        Collection collection = null;

        try {
            broker = factory.getBrokerPool().get(user);
            collection = broker.openCollection(uri, Lock.READ_LOCK);
            Permission perm = null;
            if(collection == null) {
                throw new EXistException("collection " + uri + " not found");
            } else {
                perm = collection.getResourceEntry(broker, name).getPermissions();
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

        DBBroker broker = null;
        Collection collection = null;

        try {
            broker = factory.getBrokerPool().get(user);
            collection = broker.openCollection(uri, Lock.READ_LOCK);
            if(collection == null) {
                throw new EXistException("collection " + uri + " not found");
            } else {
                return collection.getSubCollectionEntry(broker, name).getCreated();
            }
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

    private HashMap<String, List<Object>> listDocumentPermissions(XmldbURI collUri) throws EXistException, PermissionDeniedException {
        DBBroker broker = null;
        Collection collection = null;
        try {
            broker = factory.getBrokerPool().get(user);
            collection = broker.openCollection(collUri, Lock.READ_LOCK);
            if (collection == null)
                {throw new EXistException("Collection " + collUri + " not found");}
            if (!collection.getPermissionsNoLock().validate(user, Permission.READ))
                {throw new PermissionDeniedException(
                        "not allowed to read collection " + collUri);}
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

    throws EXistException, PermissionDeniedException {
        DBBroker broker = null;
        Collection collection = null;
        try {
            broker = factory.getBrokerPool().get(user);
            collection = broker.openCollection(collUri, Lock.READ_LOCK);
            if (collection == null)
                {throw new EXistException("Collection " + collUri + " not found");}
            if (!collection.getPermissionsNoLock().validate(user, Permission.READ))
                {throw new PermissionDeniedException("not allowed to read collection " + collUri);}
            final HashMap<XmldbURI, List<Object>> result = new HashMap<XmldbURI, List<Object>>(collection.getChildCollectionCount(broker));
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

    throws PermissionDeniedException, EXistException {
        DBBroker broker = null;
        Collection collection = null;
        try {
            broker = factory.getBrokerPool().get(user);
            collection = broker.openCollection(collUri, Lock.READ_LOCK);
            if (collection == null)
                {throw new EXistException("collection " + collUri + " not found");}
            return new Date(collection.getCreationTime());
        } finally {
            if(collection != null)
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

        
            IndexInfo info = null;
            InputSource source = null;
            Collection collection = null;
            try {
              collection = broker.openCollection(docUri.removeLastSegment(), Lock.WRITE_LOCK);
              if (collection == null) {
                  transact.abort(transaction);
                  throw new EXistException("Collection " + docUri.removeLastSegment() + " not found");
              }
 
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

        Collection collection = null;
        IndexInfo info = null;

        try {

          collection = broker.openCollection(docUri.removeLastSegment(), Lock.WRITE_LOCK);
          if (collection == null) {
            transact.abort(transaction);
            throw new EXistException("Collection " + docUri.removeLastSegment() + " not found");
          }
View Full Code Here

Examples of org.exist.storage.DBBroker.openCollection()

        DocumentImpl doc = null;  
        final TransactionManager transact = factory.getBrokerPool().getTransactionManager();
        final Txn transaction = transact.beginTransaction();
        try {
            broker = factory.getBrokerPool().get(user);
            final Collection collection = broker.openCollection(docUri.removeLastSegment(), Lock.WRITE_LOCK);
            if (collection == null) {
              transact.abort(transaction);
                throw new EXistException("Collection " + docUri.removeLastSegment() + " not found");
            }
            // keep the write lock in the transaction
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.