Class DocumentRelationService
- java.lang.Object
-
- org.nuxeo.ecm.platform.relations.services.DocumentRelationService
-
- All Implemented Interfaces:
DocumentRelationManager
public class DocumentRelationService extends Object implements DocumentRelationManager
- Since:
- 5.9.2
-
-
Constructor Summary
Constructors Constructor Description DocumentRelationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate, boolean inverse)Add link between two documentvoidaddRelation(CoreSession session, DocumentModel from, Node to, String predicate)Add link between two documentvoidaddRelation(CoreSession session, DocumentModel from, Node to, String predicate, boolean inverse)Add link between two documentvoidaddRelation(CoreSession session, DocumentModel from, Node to, String predicate, boolean inverse, boolean includeStatementsInEvents)Add link between two documentvoidaddRelation(CoreSession session, DocumentModel from, Node toResource, String predicate, boolean inverse, boolean includeStatementsInEvents, String comment)Add link between two documentvoiddeleteRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate)voiddeleteRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate, boolean includeStatementsInEvents)voiddeleteRelation(CoreSession session, Statement stmt)voiddeleteRelation(CoreSession session, Statement stmt, boolean includeStatementsInEvents)protected RelationManagergetRelationManager()protected voidnotifyEvent(String eventId, DocumentModel source, Map<String,Serializable> options, String comment, CoreSession session)
-
-
-
Method Detail
-
getRelationManager
protected RelationManager getRelationManager()
-
addRelation
public void addRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate, boolean inverse)
Description copied from interface:DocumentRelationManagerAdd link between two document- Specified by:
addRelationin interfaceDocumentRelationManagerfrom- the document to link fromto- the document to link topredicate- is the type of linkinverse- if to is related to from ( the event will still be generated with from document )
-
addRelation
public void addRelation(CoreSession session, DocumentModel from, Node to, String predicate)
Description copied from interface:DocumentRelationManagerAdd link between two document- Specified by:
addRelationin interfaceDocumentRelationManagerfrom- the document to link fromto- the node to link topredicate- is the type of link
-
addRelation
public void addRelation(CoreSession session, DocumentModel from, Node to, String predicate, boolean inverse)
Description copied from interface:DocumentRelationManagerAdd link between two document- Specified by:
addRelationin interfaceDocumentRelationManagerfrom- the document to link fromto- the node to link topredicate- is the type of linkinverse- if to is related to from ( the event will still be generated with from document )
-
addRelation
public void addRelation(CoreSession session, DocumentModel from, Node to, String predicate, boolean inverse, boolean includeStatementsInEvents)
Description copied from interface:DocumentRelationManagerAdd link between two document- Specified by:
addRelationin interfaceDocumentRelationManagerfrom- the document to link fromto- the node to link topredicate- is the type of linkinverse- if to is related to from ( the event will still be generated with from document )includeStatementsInEvents- will add the statement to the events RelationEvents.BEFORE_RELATION_CREATION and RelationEvents.AFTER_RELATION_CREATION
-
addRelation
public void addRelation(CoreSession session, DocumentModel from, Node toResource, String predicate, boolean inverse, boolean includeStatementsInEvents, String comment)
Description copied from interface:DocumentRelationManagerAdd link between two document- Specified by:
addRelationin interfaceDocumentRelationManagerfrom- the document to link fromtoResource- the node to link topredicate- is the type of linkinverse- if to is related to from ( the event will still be generated with from document )includeStatementsInEvents- will add the statement to the events RelationEvents.BEFORE_RELATION_CREATION and RelationEvents.AFTER_RELATION_CREATIONcomment- of the relation
-
notifyEvent
protected void notifyEvent(String eventId, DocumentModel source, Map<String,Serializable> options, String comment, CoreSession session)
-
deleteRelation
public void deleteRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate)
- Specified by:
deleteRelationin interfaceDocumentRelationManagerfrom- documentto- documentpredicate- relation type
-
deleteRelation
public void deleteRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate, boolean includeStatementsInEvents)
- Specified by:
deleteRelationin interfaceDocumentRelationManagerfrom- documentto- documentpredicate- relation typeincludeStatementsInEvents- add the current statement in event RelationEvents.BEFORE_RELATION_REMOVAL and RelationEvents.AFTER_RELATION_REMOVAL
-
deleteRelation
public void deleteRelation(CoreSession session, Statement stmt)
- Specified by:
deleteRelationin interfaceDocumentRelationManagerstmt- to delete
-
deleteRelation
public void deleteRelation(CoreSession session, Statement stmt, boolean includeStatementsInEvents)
- Specified by:
deleteRelationin interfaceDocumentRelationManagerstmt- to deleteincludeStatementsInEvents- add the current statement in event RelationEvents.BEFORE_RELATION_REMOVAL and RelationEvents.AFTER_RELATION_REMOVAL
-
-