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 SummaryFieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringstatic final Stringstatic final Stringstatic final Stringprotected Stringprotected Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.nuxeo.ecm.directory.AbstractReferencefieldName, sourceDirectory, sourceDirectoryName, targetDirectory, targetDirectoryName
- 
Constructor SummaryConstructorsConstructorDescriptionMongoDBReference(String field, String directory, String collection, String sourceField, String targetField, String dataFileName) MongoDBReference(MongoDBReferenceDescriptor descriptor) MongoDBReference(ReferenceDescriptor descriptor) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidvoidAdds the links between the source id and the target idsvoidvoidAdds the links between the source ids and the target idprotected voidcreateIndexes(MongoDBSession session) protected com.mongodb.client.MongoCollection<org.bson.Document>getCollection(MongoDBSession session) protected MongoDBSessiongetSourceIdsForTarget(String targetId) getTargetIdsForSource(String sourceId) getTargetIdsForSource(String sourceId, MongoDBSession session) Retrieves all target ids associated to the given source idprotected voidinitialize(MongoDBSession session) protected booleanprotected booleanvoidremoveLinksForSource(String sourceId) voidremoveLinksForSource(String sourceId, Session session) Removes all the links for a given source idvoidremoveLinksForTarget(String targetId) voidremoveLinksForTarget(String targetId, Session session) Removes all the links for a given target idvoidsetSourceIdsForTarget(String targetId, List<String> sourceIds) voidsetSourceIdsForTarget(String targetId, List<String> sourceIds, Session session) Sets all source ids to be associated to the given target idvoidsetTargetIdsForSource(String sourceId, List<String> targetIds) voidsetTargetIdsForSource(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.AbstractReferencegetFieldName, 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
- 
addLinksDescription copied from interface:ReferenceAdds the links between the source id and the target ids- Parameters:
- sourceId- the source id
- targetIds- the target ids
- session- the session
 
- 
addLinksDescription copied from interface:ReferenceAdds the links between the source ids and the target id- Parameters:
- sourceIds- the source ids
- targetId- the target id
- session- the session
 
- 
addLinks
- 
removeLinksForSource
- 
removeLinksForSourceDescription copied from interface:ReferenceRemoves all the links for a given source id- Parameters:
- sourceId- the source id
- session- the session
 
- 
removeLinksForTarget
- 
removeLinksForTargetDescription copied from interface:ReferenceRemoves all the links for a given target id- Parameters:
- targetId- the target id
- session- the session
 
- 
getTargetIdsForSource
- 
getTargetIdsForSourceRetrieves all target ids associated to the given source id- Parameters:
- sourceId- the source id
- session- the mongoDB session
- Returns:
- the list of target ids
 
- 
getSourceIdsForTarget
- 
setTargetIdsForSource
- 
setTargetIdsForSourceDescription copied from interface:ReferenceSets all target ids to be associated to the given source id- Parameters:
- sourceId- the source id
- targetIds- the target ids
- session- the session
 
- 
setSourceIdsForTarget
- 
setSourceIdsForTargetDescription copied from interface:ReferenceSets all source ids to be associated to the given target id- Parameters:
- targetId- the target id
- sourceIds- the source ids
- session- the session
 
- 
initialize
- 
createIndexes
- 
isGroupToGroupprotected boolean isGroupToGroup()
- 
isUserToGroupprotected boolean isUserToGroup()
- 
getMongoDBSession
- 
getCollectionprotected com.mongodb.client.MongoCollection<org.bson.Document> getCollection(MongoDBSession session) 
 
-