public class DocumentRelationService extends Object implements DocumentRelationManager
Constructor and Description |
---|
DocumentRelationService() |
Modifier and Type | Method and Description |
---|---|
void |
addRelation(CoreSession session,
DocumentModel from,
DocumentModel to,
String predicate,
boolean inverse)
Add link between two document
|
void |
addRelation(CoreSession session,
DocumentModel from,
Node to,
String predicate)
Add link between two document
|
void |
addRelation(CoreSession session,
DocumentModel from,
Node to,
String predicate,
boolean inverse)
Add link between two document
|
void |
addRelation(CoreSession session,
DocumentModel from,
Node to,
String predicate,
boolean inverse,
boolean includeStatementsInEvents)
Add link between two document
|
void |
addRelation(CoreSession session,
DocumentModel from,
Node toResource,
String predicate,
boolean inverse,
boolean includeStatementsInEvents,
String comment)
Add link between two document
|
void |
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 stmt) |
void |
deleteRelation(CoreSession session,
Statement stmt,
boolean includeStatementsInEvents) |
public void addRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate, boolean inverse) throws ClientException
DocumentRelationManager
addRelation
in interface DocumentRelationManager
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 )ClientException
RelationAlreadyExistsException
public void addRelation(CoreSession session, DocumentModel from, Node to, String predicate) throws ClientException
DocumentRelationManager
addRelation
in interface DocumentRelationManager
from
- the document to link fromto
- the node to link topredicate
- is the type of linkClientException
RelationAlreadyExistsException
public void addRelation(CoreSession session, DocumentModel from, Node to, String predicate, boolean inverse) throws ClientException
DocumentRelationManager
addRelation
in interface DocumentRelationManager
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 )ClientException
RelationAlreadyExistsException
public void addRelation(CoreSession session, DocumentModel from, Node to, String predicate, boolean inverse, boolean includeStatementsInEvents) throws ClientException
DocumentRelationManager
addRelation
in interface DocumentRelationManager
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_CREATIONClientException
RelationAlreadyExistsException
public void addRelation(CoreSession session, DocumentModel from, Node toResource, String predicate, boolean inverse, boolean includeStatementsInEvents, String comment) throws ClientException
DocumentRelationManager
addRelation
in interface DocumentRelationManager
from
- 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 relationClientException
RelationAlreadyExistsException
public void deleteRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate) throws ClientException
deleteRelation
in interface DocumentRelationManager
from
- documentto
- documentpredicate
- relation typeClientException
public void deleteRelation(CoreSession session, DocumentModel from, DocumentModel to, String predicate, boolean includeStatementsInEvents) throws ClientException
deleteRelation
in interface DocumentRelationManager
from
- documentto
- documentpredicate
- relation typeincludeStatementsInEvents
- add the current statement in event RelationEvents.BEFORE_RELATION_REMOVAL and
RelationEvents.AFTER_RELATION_REMOVALClientException
public void deleteRelation(CoreSession session, Statement stmt) throws ClientException
deleteRelation
in interface DocumentRelationManager
stmt
- to deleteClientException
public void deleteRelation(CoreSession session, Statement stmt, boolean includeStatementsInEvents) throws ClientException
deleteRelation
in interface DocumentRelationManager
stmt
- to deleteincludeStatementsInEvents
- add the current statement in event RelationEvents.BEFORE_RELATION_REMOVAL and
RelationEvents.AFTER_RELATION_REMOVALClientException
Copyright © 2015 Nuxeo SA. All rights reserved.