org.ow2.dragon.api.service.common
Interface EntityLinkManager

All Known Implementing Classes:
EntityLinkManagerImpl

@Transactional
public interface EntityLinkManager

Author:
ofabre - ebmwebsourcing

Method Summary
 java.lang.String createLink(java.lang.String fromId, java.lang.String toId, java.lang.String type)
          Create a link between two linked entities (like person, organization, technical service, endpoint, etc.)
 java.util.List<Link> getAllLinksForFrom(java.lang.String fromId, RequestOptionsTO requestOptions)
          Retrieve all links with the specified "from end"
 java.util.List<Link> getAllLinksForTo(java.lang.String toId, RequestOptionsTO requestOptions)
          Retrieve all links with the specified "to end"
 void removeLink(java.lang.String linkId)
          Remove a link from the registry
 

Method Detail

createLink

java.lang.String createLink(java.lang.String fromId,
                            java.lang.String toId,
                            java.lang.String type)
                            throws CommonException
Create a link between two linked entities (like person, organization, technical service, endpoint, etc.)

Parameters:
fromId - identifier of the "from end" of the link
toId - identifier of the "to end" of the link
type - the link type
Returns:
the link identifier
Throws:
CommonException - if one of the linked entity doesn't exist

removeLink

void removeLink(java.lang.String linkId)
Remove a link from the registry

Parameters:
linkId - a link identifier

getAllLinksForTo

@Transactional(readOnly=true)
java.util.List<Link> getAllLinksForTo(java.lang.String toId,
                                                    RequestOptionsTO requestOptions)
Retrieve all links with the specified "to end"

Parameters:
toId - the to end identifier
requestOptions - sort, pagination and case sensitive parameters. Could be null.
Returns:
all links with the specified "to end"

getAllLinksForFrom

@Transactional(readOnly=true)
java.util.List<Link> getAllLinksForFrom(java.lang.String fromId,
                                                      RequestOptionsTO requestOptions)
Retrieve all links with the specified "from end"

Parameters:
fromId - the to end identifier
requestOptions - sort, pagination and case sensitive parameters. Could be null.
Returns:
all links with the specified "from end"


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.