001/* 002 * (C) Copyright 2014-2020 Nuxeo (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Florent Guillaume 018 */ 019package org.nuxeo.ecm.core.storage.dbs; 020 021import org.nuxeo.ecm.core.api.lock.LockManager; 022import org.nuxeo.ecm.core.blob.BlobManager; 023import org.nuxeo.ecm.core.model.Repository; 024 025/** 026 * Interface for a {@link Repository} for Document-Based Storage. 027 * 028 * @since 5.9.4 029 */ 030public interface DBSRepository extends Repository, LockManager { 031 032 /** 033 * Gets a new connection to this repository. 034 * 035 * @return a new connection 036 * @since 11.1 037 */ 038 DBSConnection getConnection(); 039 040 /** 041 * Gets the blob manager. 042 * 043 * @return the blob manager. 044 */ 045 BlobManager getBlobManager(); 046 047 /** 048 * Gets the lock manager for this repository. 049 * 050 * @return the lock manager 051 * @since 7.4 052 */ 053 LockManager getLockManager(); 054 055 /** 056 * Checks if fulltext indexing (and search) is disabled. 057 * 058 * @return {@code true} if fulltext indexing is disabled, {@code false} if it is enabled 059 * @since 7.1, 6.0-HF02 060 */ 061 boolean isFulltextDisabled(); 062 063 /** 064 * Checks if fulltext is stored in a blob. 065 * 066 * @return {@code true} if fulltext is stored in a blob, {@code false} if it is stored as a regular string 067 * @since 11.1 068 */ 069 boolean isFulltextStoredInBlob(); 070 071 /** 072 * Checks if fulltext search is disabled. 073 * 074 * @return {@code true} if fulltext search is disabled, {@code false} if it is enabled 075 * @since 10.2 076 */ 077 boolean isFulltextSearchDisabled(); 078 079 /** 080 * Checks if database-managed document change tokens are enabled. 081 * 082 * @return {@code true} if the database maintains document change tokens 083 * @since 9.1 084 */ 085 boolean isChangeTokenEnabled(); 086 087 /** 088 * Checks whether this repository supports transactions. 089 * 090 * @return {@code true} if the repository supports transactions 091 * @since 11.1 092 * @see DBSConnection#begin 093 * @see DBSConnection#commit 094 * @see DBSConnection#rollback 095 */ 096 boolean supportsTransactions(); 097 098}