Nuxeo ECM Projects 5.6-RC1

org.nuxeo.ecm.social.relationship.service
Interface RelationshipService

All Known Implementing Classes:
RelationshipServiceImpl

public interface RelationshipService

Service to manage relations between entities.

Since:
5.5
Author:
Arnaud Kervern

Method Summary
 Boolean addRelation(String actorId, String targetId, RelationshipKind kind)
          Adds a relation between two entities.
 List<RelationshipKind> getRegisteredKinds(String group)
          Gets registered (contributed with the extension point) relationship kinds depending of a group
 List<RelationshipKind> getRelationshipKinds(String actorId, String targetId)
          Gets all existing relationship kinds between an actor and a target.
 List<String> getTargets(String actorId)
          Gets all targets of an actor.
 List<String> getTargetsOfKind(String actorId, RelationshipKind kind)
          Gets all targets of a specific relation.
 List<String> getTargetsWithFulltext(String actorId, RelationshipKind kind, String targetPattern)
          Gets all targets that match the targetPattern with the given kind.
 List<String> getTargetsWithFulltext(String actorId, String targetPattern)
          Gets all targets that match the targetPattern.
 Boolean removeRelation(String actorId, String targetId, RelationshipKind kind)
          Removes a relationship composed by parameters
 

Method Detail

getRelationshipKinds

List<RelationshipKind> getRelationshipKinds(String actorId,
                                            String targetId)
Gets all existing relationship kinds between an actor and a target.


getTargets

List<String> getTargets(String actorId)
Gets all targets of an actor.


getTargetsWithFulltext

List<String> getTargetsWithFulltext(String actorId,
                                    String targetPattern)
Gets all targets that match the targetPattern.


getTargetsWithFulltext

List<String> getTargetsWithFulltext(String actorId,
                                    RelationshipKind kind,
                                    String targetPattern)
Gets all targets that match the targetPattern with the given kind.


getTargetsOfKind

List<String> getTargetsOfKind(String actorId,
                              RelationshipKind kind)
Gets all targets of a specific relation.

Parameters:
kind - if null, it will return all targets getTargets(java.lang.String), it can be only filled with the group or the name

getRegisteredKinds

List<RelationshipKind> getRegisteredKinds(String group)
Gets registered (contributed with the extension point) relationship kinds depending of a group

Parameters:
group - can be null, or empty if you want to get all kinds
Returns:
an UnmodifiableList with all user relationship types

addRelation

Boolean addRelation(String actorId,
                    String targetId,
                    RelationshipKind kind)
Adds a relation between two entities.

Returns:
true if a new relation is created, false otherwise.

removeRelation

Boolean removeRelation(String actorId,
                       String targetId,
                       RelationshipKind kind)
Removes a relationship composed by parameters

Returns:
true if a relation has been deleted, false otherwise

Nuxeo ECM Projects 5.6-RC1

Copyright © 2012 Nuxeo SA. All Rights Reserved.