Interface DocumentRelationManager
-
- All Known Implementing Classes:
DocumentRelationService
public interface DocumentRelationManager
Create relations between documents- Since:
- 5.9.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate, boolean inverse)
Add link between two documentvoid
addRelation(CoreSession session, DocumentModel from, Node to, String predicate)
Add link between two documentvoid
addRelation(CoreSession session, DocumentModel from, Node to, String predicate, boolean inverse)
Add link between two documentvoid
addRelation(CoreSession session, DocumentModel from, Node to, String predicate, boolean inverse, boolean includeStatementsInEvents)
Add link between two documentvoid
addRelation(CoreSession session, DocumentModel from, Node to, String predicate, boolean inverse, boolean includeStatementsInEvents, String comment)
Add link between two documentvoid
deleteRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate)
void
deleteRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate, boolean includeStatementsInEvents)
void
deleteRelation(CoreSession session, Statement statement)
void
deleteRelation(CoreSession session, Statement stmt, boolean includeStatementsInEvents)
-
-
-
Method Detail
-
addRelation
void addRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate, boolean inverse)
Add link between two document- Parameters:
from
- 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 )- Throws:
RelationAlreadyExistsException
- if given relation already exists
-
addRelation
void addRelation(CoreSession session, DocumentModel from, Node to, String predicate, boolean inverse)
Add link between two document- Parameters:
from
- 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 )- Throws:
RelationAlreadyExistsException
- if given relation already exists
-
addRelation
void addRelation(CoreSession session, DocumentModel from, Node to, String predicate)
Add link between two document- Parameters:
from
- the document to link fromto
- the node to link topredicate
- is the type of link- Throws:
RelationAlreadyExistsException
- if given relation already exists
-
addRelation
void addRelation(CoreSession session, DocumentModel from, Node to, String predicate, boolean inverse, boolean includeStatementsInEvents)
Add link between two document- Parameters:
from
- 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- Throws:
RelationAlreadyExistsException
- if given relation already exists
-
addRelation
void addRelation(CoreSession session, DocumentModel from, Node to, String predicate, boolean inverse, boolean includeStatementsInEvents, String comment)
Add link between two document- Parameters:
from
- 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_CREATIONcomment
- of the relation- Throws:
RelationAlreadyExistsException
- if given relation already exists
-
deleteRelation
void deleteRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate)
- Parameters:
from
- documentto
- documentpredicate
- relation type
-
deleteRelation
void deleteRelation(CoreSession session, Statement statement)
- Parameters:
statement
- to delete
-
deleteRelation
void deleteRelation(CoreSession session, Statement stmt, boolean includeStatementsInEvents)
- Parameters:
stmt
- to deleteincludeStatementsInEvents
- add the current statement in event RelationEvents.BEFORE_RELATION_REMOVAL and RelationEvents.AFTER_RELATION_REMOVAL
-
deleteRelation
void deleteRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate, boolean includeStatementsInEvents)
- Parameters:
from
- documentto
- documentpredicate
- relation typeincludeStatementsInEvents
- add the current statement in event RelationEvents.BEFORE_RELATION_REMOVAL and RelationEvents.AFTER_RELATION_REMOVAL
-
-