Package org.nuxeo.ecm.core.storage.dbs
Class DBSRepositoryBase
java.lang.Object
org.nuxeo.ecm.core.storage.dbs.DBSRepositoryBase
- All Implemented Interfaces:
LockManager
,Repository
,DBSRepository
- Direct Known Subclasses:
MemRepository
,MongoDBRepository
Provides sharing behavior for repository sessions and other basic functions.
- Since:
- 5.9.4
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Finds the paths for all blobs in all document types.static enum
Type of id to used for documents. -
Field Summary
Modifier and TypeFieldDescriptionprotected final BlobManager
protected final boolean
static final boolean
protected static final String
Property to disableecm:blobKeys
computation FOR TEST PURPOSE ONLY.protected final FulltextConfiguration
protected final DBSRepositoryBase.IdType
protected LockManager
protected final String
protected boolean
static final String
static final String
static final String
Fields inherited from interface org.nuxeo.ecm.core.model.Repository
CAPABILITY_QUERY_BLOB_KEYS, CAPABILITY_REPOSITORY
-
Constructor Summary
ConstructorDescriptionDBSRepositoryBase
(String repositoryName, DBSRepositoryDescriptor descriptor) -
Method Summary
Modifier and TypeMethodDescriptionabstract List<DBSRepositoryBase.IdType>
Gets the allowed id types for this DBS repository.Gets the list of blob keys paths of all possible blobs in all schemas.Gets the blob manager.getCapability
(String name) Gets the value of the given capability for this repository.Gets the fulltext configuration for this repository.Gets the lock on a document.Gets the lock manager for this repository.protected String
getName()
protected void
protected void
boolean
Checks if database-managed document change tokens are enabled.boolean
Checks if fulltext indexing (and search) is disabled.boolean
Checks if fulltext search is disabled.boolean
Checks if fulltext is stored in a blob.removeLock
(String id, String owner) Removes the lock from a document.Sets a lock on a document.void
shutdown()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.ecm.core.storage.dbs.DBSRepository
getConnection, supportsTransactions, updateCapabilities
Methods inherited from interface org.nuxeo.ecm.core.api.lock.LockManager
clearLockManagerCaches, closeLockManager
Methods inherited from interface org.nuxeo.ecm.core.model.Repository
getActiveSessionsCount, hasCapability, markReferencedBlobs
-
Field Details
-
DISABLE_ECM_BLOB_KEYS
Property to disableecm:blobKeys
computation FOR TEST PURPOSE ONLY. Keep it private, we really don't want it to be used externally.- Since:
- 2023
- See Also:
-
TYPE_ROOT
- See Also:
-
DEBUG_UUIDS
public static final boolean DEBUG_UUIDS- See Also:
-
UUID_ZERO
- See Also:
-
UUID_ZERO_DEBUG
- See Also:
-
idType
- Since:
- 8.3
-
repositoryName
-
fulltextConfiguration
-
blobManager
-
lockManager
-
changeTokenEnabled
protected final boolean changeTokenEnabled -
capabilities
- Since:
- 11.5
-
selfRegisteredLockManager
protected boolean selfRegisteredLockManager- Since:
- 7.4 : used to know if the LockManager was provided by this repository or externally
-
blobKeysPaths
-
-
Constructor Details
-
DBSRepositoryBase
-
-
Method Details
-
getAllowedIdTypes
Gets the allowed id types for this DBS repository. The first one is the default. -
getIdType
- Since:
- 11.1
-
shutdown
public void shutdown()- Specified by:
shutdown
in interfaceRepository
-
getName
- Specified by:
getName
in interfaceRepository
-
getFulltextConfiguration
Description copied from interface:Repository
Gets the fulltext configuration for this repository.- Specified by:
getFulltextConfiguration
in interfaceRepository
-
getLockManagerName
-
initLockManager
protected void initLockManager() -
getLockManager
Description copied from interface:DBSRepository
Gets the lock manager for this repository.- Specified by:
getLockManager
in interfaceDBSRepository
- Returns:
- the lock manager
-
getLock
Description copied from interface:LockManager
Gets the lock on a document.If the document does not exist,
null
is returned.- Specified by:
getLock
in interfaceLockManager
- Parameters:
id
- the document id- Returns:
- the existing lock, or
null
when there is no lock
-
setLock
Description copied from interface:LockManager
Sets a lock on a document.If the document is already locked, returns its existing lock status (there is no re-locking,
LockManager.removeLock(java.lang.String, java.lang.String)
must be called first).- Specified by:
setLock
in interfaceLockManager
- Parameters:
id
- the document idlock
- the lock to set- Returns:
null
if locking succeeded, or the existing lock if locking failed
-
removeLock
Description copied from interface:LockManager
Removes the lock from a document.The previous lock is returned.
If
owner
isnull
then the lock is unconditionally removed.If
owner
is notnull
, it must match the existing lock owner for the lock to be removed. If it doesn't match, the returned lock will returntrue
forLock.getFailed()
.- Specified by:
removeLock
in interfaceLockManager
- Parameters:
id
- the document idowner
- the owner to check, ornull
for no check- Returns:
- the previous lock (may be
null
), with a failed flag if locking failed
-
getBlobKeysPaths
Description copied from interface:DBSRepository
Gets the list of blob keys paths of all possible blobs in all schemas.Each "path" is a list of path components. Example:
[[content, data], [files, file, data], ...]
- Specified by:
getBlobKeysPaths
in interfaceDBSRepository
-
initBlobsPaths
protected void initBlobsPaths() -
getBlobManager
Description copied from interface:DBSRepository
Gets the blob manager.- Specified by:
getBlobManager
in interfaceDBSRepository
- Returns:
- the blob manager.
-
isFulltextDisabled
public boolean isFulltextDisabled()Description copied from interface:DBSRepository
Checks if fulltext indexing (and search) is disabled.- Specified by:
isFulltextDisabled
in interfaceDBSRepository
- Returns:
true
if fulltext indexing is disabled,false
if it is enabled
-
isFulltextStoredInBlob
public boolean isFulltextStoredInBlob()Description copied from interface:DBSRepository
Checks if fulltext is stored in a blob.- Specified by:
isFulltextStoredInBlob
in interfaceDBSRepository
- Returns:
true
if fulltext is stored in a blob,false
if it is stored as a regular string
-
isFulltextSearchDisabled
public boolean isFulltextSearchDisabled()Description copied from interface:DBSRepository
Checks if fulltext search is disabled.- Specified by:
isFulltextSearchDisabled
in interfaceDBSRepository
- Returns:
true
if fulltext search is disabled,false
if it is enabled
-
isChangeTokenEnabled
public boolean isChangeTokenEnabled()Description copied from interface:DBSRepository
Checks if database-managed document change tokens are enabled.- Specified by:
isChangeTokenEnabled
in interfaceDBSRepository
- Returns:
true
if the database maintains document change tokens
-
getCapability
Description copied from interface:Repository
Gets the value of the given capability for this repository.- Specified by:
getCapability
in interfaceRepository
-
getSession
- Specified by:
getSession
in interfaceRepository
-