if (!doc.getPermissions().validate(user, Permission.READ)) throw new PermissionDeniedException("not allowed to read document");
	public Document getDocument(String fileName) throws PermissionDeniedException {		if (!fileName.startsWith("/"))			fileName = '/' + fileName;		if (!fileName.startsWith("/db"))		    fileName = "/db" + fileName;		int pos = fileName.lastIndexOf('/');		String collName = fileName.substring(0, pos);		String docName = fileName.substring(pos + 1);				Collection collection = getCollection(collName);		if (collection == null) {			LOG.debug("collection " + collName + " not found!");			return null;		}		if (!collection.getPermissions().validate(user, Permission.READ))			throw new PermissionDeniedException("permission denied to read collection");		DocumentImpl doc = collection.getDocument(this, docName);		if (doc == null) {			LOG.debug("document " + fileName + " not found!");			return null;		}		if (!doc.getPermissions().validate(user, Permission.READ))			throw new PermissionDeniedException("not allowed to read document");		return doc;	}