Package org.nuxeo.directory.mongodb
Class MongoDBReference
java.lang.Object
org.nuxeo.ecm.directory.AbstractReference
org.nuxeo.directory.mongodb.MongoDBReference
- All Implemented Interfaces:
Reference
MongoDB implementation of a
Reference
- Since:
- 9.1
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected String
static final String
static final String
static final String
protected String
protected String
static final String
static final String
static final String
Fields inherited from class org.nuxeo.ecm.directory.AbstractReference
fieldName, sourceDirectory, sourceDirectoryName, targetDirectory, targetDirectoryName
-
Constructor Summary
ConstructorDescriptionMongoDBReference
(String field, String directory, String collection, String sourceField, String targetField, String dataFileName) MongoDBReference
(MongoDBReferenceDescriptor descriptor) MongoDBReference
(ReferenceDescriptor descriptor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Adds the links between the source id and the target idsvoid
void
Adds the links between the source ids and the target idprotected void
createIndexes
(MongoDBSession session) protected com.mongodb.client.MongoCollection<org.bson.Document>
getCollection
(MongoDBSession session) protected MongoDBSession
getSourceIdsForTarget
(String targetId) getTargetIdsForSource
(String sourceId) getTargetIdsForSource
(String sourceId, MongoDBSession session) Retrieves all target ids associated to the given source idprotected void
initialize
(MongoDBSession session) protected boolean
protected boolean
void
removeLinksForSource
(String sourceId) void
removeLinksForSource
(String sourceId, Session session) Removes all the links for a given source idvoid
removeLinksForTarget
(String targetId) void
removeLinksForTarget
(String targetId, Session session) Removes all the links for a given target idvoid
setSourceIdsForTarget
(String targetId, List<String> sourceIds) void
setSourceIdsForTarget
(String targetId, List<String> sourceIds, Session session) Sets all source ids to be associated to the given target idvoid
setTargetIdsForSource
(String sourceId, List<String> targetIds) void
setTargetIdsForSource
(String sourceId, List<String> targetIds, Session session) Sets all target ids to be associated to the given source idMethods inherited from class org.nuxeo.ecm.directory.AbstractReference
getFieldName, getSourceDirectory, getTargetDirectory, setSourceDirectoryName, setTargetDirectoryName
-
Field Details
-
GROUP_TO_GROUP_COLLECTION
- Since:
- 11.5
- See Also:
-
GROUP_TO_GROUP_CHILD_GROUP_ID
- Since:
- 11.5
- See Also:
-
GROUP_TO_GROUP_PARENT_GROUP_ID
- Since:
- 11.5
- See Also:
-
USER_TO_GROUP_COLLECTION
- Since:
- 11.5
- See Also:
-
USER_TO_GROUP_GROUP_ID
- Since:
- 11.5
- See Also:
-
USER_TO_GROUP_USER_ID
- Since:
- 11.5
- See Also:
-
collection
-
sourceField
-
targetField
-
dataFileName
-
-
Constructor Details
-
Method Details
-
addLinks
-
addLinks
Description copied from interface:Reference
Adds the links between the source id and the target ids- Parameters:
sourceId
- the source idtargetIds
- the target idssession
- the session
-
addLinks
Description copied from interface:Reference
Adds the links between the source ids and the target id- Parameters:
sourceIds
- the source idstargetId
- the target idsession
- the session
-
addLinks
-
removeLinksForSource
-
removeLinksForSource
Description copied from interface:Reference
Removes all the links for a given source id- Parameters:
sourceId
- the source idsession
- the session
-
removeLinksForTarget
-
removeLinksForTarget
Description copied from interface:Reference
Removes all the links for a given target id- Parameters:
targetId
- the target idsession
- the session
-
getTargetIdsForSource
-
getTargetIdsForSource
Retrieves all target ids associated to the given source id- Parameters:
sourceId
- the source idsession
- the mongoDB session- Returns:
- the list of target ids
-
getSourceIdsForTarget
-
setTargetIdsForSource
-
setTargetIdsForSource
Description copied from interface:Reference
Sets all target ids to be associated to the given source id- Parameters:
sourceId
- the source idtargetIds
- the target idssession
- the session
-
setSourceIdsForTarget
-
setSourceIdsForTarget
Description copied from interface:Reference
Sets all source ids to be associated to the given target id- Parameters:
targetId
- the target idsourceIds
- the source idssession
- the session
-
initialize
-
createIndexes
-
isGroupToGroup
protected boolean isGroupToGroup() -
isUserToGroup
protected boolean isUserToGroup() -
getMongoDBSession
-
getCollection
protected com.mongodb.client.MongoCollection<org.bson.Document> getCollection(MongoDBSession session)
-