public class RelationshipServiceImpl extends DefaultComponent implements RelationshipService
RelationshipService.| Modifier and Type | Field and Description |
|---|---|
static String |
KINDS_EXTENSION_POINT |
| Constructor and Description |
|---|
RelationshipServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(ComponentContext context)
Activates the component.
|
Boolean |
addRelation(String actorId,
String targetId,
RelationshipKind kind)
Adds a relation between two entities.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
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.
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
Boolean |
removeRelation(String actorId,
String targetId,
RelationshipKind kind)
Removes a relationship composed by parameters
|
applicationStarted, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterContribution, unregisterExtensionpublic static final String KINDS_EXTENSION_POINT
public void activate(ComponentContext context)
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextpublic void deactivate(ComponentContext context)
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentcontext - the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic List<RelationshipKind> getRelationshipKinds(String actorId, String targetId)
RelationshipServicegetRelationshipKinds in interface RelationshipServicepublic List<String> getTargetsOfKind(String actorId, RelationshipKind kind)
RelationshipServicegetTargetsOfKind in interface RelationshipServicekind - if null, it will return all targets RelationshipService.getTargets(java.lang.String), it can be only filled with the group or the
namepublic List<String> getTargets(String actorId)
RelationshipServicegetTargets in interface RelationshipServicepublic List<String> getTargetsWithFulltext(String actorId, String targetPattern)
RelationshipServicegetTargetsWithFulltext in interface RelationshipServicepublic List<String> getTargetsWithFulltext(String actorId, RelationshipKind kind, String targetPattern)
RelationshipServicegetTargetsWithFulltext in interface RelationshipServicepublic List<RelationshipKind> getRegisteredKinds(String group)
RelationshipServicegetRegisteredKinds in interface RelationshipServicegroup - can be null, or empty if you want to get all kindspublic Boolean addRelation(String actorId, String targetId, RelationshipKind kind)
RelationshipServiceaddRelation in interface RelationshipServicetrue if a new relation is created, false otherwise.public Boolean removeRelation(String actorId, String targetId, RelationshipKind kind)
RelationshipServiceremoveRelation in interface RelationshipServiceCopyright © 2015 Nuxeo SA. All rights reserved.