Class RelationshipManagerImpl

java.lang.Object
org.exoplatform.social.core.manager.RelationshipManagerImpl
All Implemented Interfaces:
org.exoplatform.social.core.manager.RelationshipManager

public class RelationshipManagerImpl extends Object implements org.exoplatform.social.core.manager.RelationshipManager
The Class RelationshipManager implements RelationshipManager without caching.
Since:
Nov 24, 2010
Version:
1.2.0-GA
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final int
    The default limit when get list identities with connection list access.
    protected static final int
    The default offset when get list identities with connection list access.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RelationshipManagerImpl(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.storage.api.IdentityStorage identityStorage, org.exoplatform.social.core.storage.api.RelationshipStorage relationshipStorage)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addListenerPlugin(org.exoplatform.social.core.relationship.RelationshipListenerPlugin plugin)
    Adds a RelationshipListenerPlugin.
    org.exoplatform.social.core.relationship.model.Relationship
    confirm(org.exoplatform.social.core.identity.model.Identity invitedIdentity, org.exoplatform.social.core.identity.model.Identity invitingIdentity)
     
    void
    confirm(org.exoplatform.social.core.relationship.model.Relationship relationship)
     
    void
    delete(org.exoplatform.social.core.relationship.model.Relationship existingRelationship)
     
    void
    deny(org.exoplatform.social.core.identity.model.Identity invitedIdentity, org.exoplatform.social.core.identity.model.Identity invitingIdentity)
     
    void
    deny(org.exoplatform.social.core.relationship.model.Relationship relationship)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    findRelationships(org.exoplatform.social.core.identity.model.Identity ownerIdentity, org.exoplatform.social.core.relationship.model.Relationship.Type relationshipType)
     
    org.exoplatform.social.core.relationship.model.Relationship
    get(String relationshipId)
     
    org.exoplatform.social.core.relationship.model.Relationship
    get(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getAll(org.exoplatform.social.core.identity.model.Identity identity)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getAll(org.exoplatform.social.core.identity.model.Identity identity, List<org.exoplatform.social.core.identity.model.Identity> identities)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getAll(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> identities)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getAllRelationships(org.exoplatform.social.core.identity.model.Identity identity)
     
    org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
    getAllWithListAccess(org.exoplatform.social.core.identity.model.Identity existingIdentity)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getConfirmed(org.exoplatform.social.core.identity.model.Identity identity)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getConfirmed(org.exoplatform.social.core.identity.model.Identity identity, List<org.exoplatform.social.core.identity.model.Identity> identities)
     
    org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
    getConnections(org.exoplatform.social.core.identity.model.Identity identity)
     
    org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
    getConnectionsByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter)
     
    int
    getConnectionsInCommonCount(org.exoplatform.social.core.identity.model.Identity currentUserIdentity, org.exoplatform.social.core.identity.model.Identity identity)
     
    org.exoplatform.social.core.relationship.model.Relationship.Type
    getConnectionStatus(org.exoplatform.social.core.identity.model.Identity fromIdentity, org.exoplatform.social.core.identity.model.Identity toIdentity)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getContacts(org.exoplatform.social.core.identity.model.Identity identity)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getContacts(org.exoplatform.social.core.identity.model.Identity currIdentity, List<org.exoplatform.social.core.identity.model.Identity> identities)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getIdentities(org.exoplatform.social.core.identity.model.Identity id)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getIncoming(org.exoplatform.social.core.identity.model.Identity receiver)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getIncoming(org.exoplatform.social.core.identity.model.Identity receiver, List<org.exoplatform.social.core.identity.model.Identity> identities)
     
    org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
    getIncomingByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter)
     
    org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
    getIncomingWithListAccess(org.exoplatform.social.core.identity.model.Identity existingIdentity)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getLastConnections(org.exoplatform.social.core.identity.model.Identity identity, int limit)
     
    org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
    getOutgoing(org.exoplatform.social.core.identity.model.Identity existingIdentity)
     
    org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
    getOutgoingByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getPending(org.exoplatform.social.core.identity.model.Identity sender)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getPending(org.exoplatform.social.core.identity.model.Identity sender, List<org.exoplatform.social.core.identity.model.Identity> identities)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getPendingRelationships(org.exoplatform.social.core.identity.model.Identity identity)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getPendingRelationships(org.exoplatform.social.core.identity.model.Identity identity, boolean toConfirm)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getPendingRelationships(org.exoplatform.social.core.identity.model.Identity currIdentity, List<org.exoplatform.social.core.identity.model.Identity> identities, boolean toConfirm)
     
    protected List<org.exoplatform.social.core.relationship.model.Relationship>
    getReceiver(org.exoplatform.social.core.identity.model.Identity receiver, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> identities)
    Get relationships by identity and status from cache or activityStorage
    org.exoplatform.social.core.relationship.model.Relationship
    getRelationship(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.identity.model.Identity receiver)
     
    org.exoplatform.social.core.relationship.model.Relationship
     
    protected List<org.exoplatform.social.core.relationship.model.Relationship>
    getRelationships(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> identities)
    Get relationships by identity and status from cache or activityStorage
    List<org.exoplatform.social.core.relationship.model.Relationship>
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getRelationshipsByStatus(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, int offset, int limit)
     
    int
    getRelationshipsCountByStatus(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type)
     
    org.exoplatform.social.core.relationship.model.Relationship.Type
    getRelationshipStatus(org.exoplatform.social.core.relationship.model.Relationship rel, org.exoplatform.social.core.identity.model.Identity id)
     
    protected List<org.exoplatform.social.core.relationship.model.Relationship>
    getSender(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> identities)
    Get relationships by identity and status and identities from activityStorage
    org.exoplatform.social.core.relationship.model.Relationship.Type
    getStatus(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2)
     
    Map<org.exoplatform.social.core.identity.model.Identity,Integer>
    getSuggestions(org.exoplatform.social.core.identity.model.Identity identity, int offset, int limit)
     
    Map<org.exoplatform.social.core.identity.model.Identity,Integer>
    getSuggestions(org.exoplatform.social.core.identity.model.Identity identity, int maxConnections, int maxConnectionsToLoad, int maxSuggestions)
     
    org.exoplatform.social.core.relationship.model.Relationship
    ignore(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.identity.model.Identity receiver)
     
    void
    ignore(org.exoplatform.social.core.relationship.model.Relationship relationship)
     
    org.exoplatform.social.core.relationship.model.Relationship
    invite(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.identity.model.Identity receiver)
     
    org.exoplatform.social.core.relationship.model.Relationship
    inviteToConnect(org.exoplatform.social.core.identity.model.Identity invitingIdentity, org.exoplatform.social.core.identity.model.Identity invitedIdentity)
     
    void
    registerListener(org.exoplatform.social.core.relationship.RelationshipListener listener)
    Registers a RelationshipLister.
    void
    remove(org.exoplatform.social.core.relationship.model.Relationship relationship)
     
    void
    unregisterListener(org.exoplatform.social.core.relationship.RelationshipListener listener)
    Unregisters a RelationshipLister.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • OFFSET

      protected static final int OFFSET
      The default offset when get list identities with connection list access.
      Since:
      1.2.0-Beta3
      See Also:
    • LIMIT

      protected static final int LIMIT
      The default limit when get list identities with connection list access.
      Since:
      1.2.0-Beta3
      See Also:
  • Constructor Details

    • RelationshipManagerImpl

      public RelationshipManagerImpl(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.storage.api.IdentityStorage identityStorage, org.exoplatform.social.core.storage.api.RelationshipStorage relationshipStorage)
  • Method Details

    • inviteToConnect

      public org.exoplatform.social.core.relationship.model.Relationship inviteToConnect(org.exoplatform.social.core.identity.model.Identity invitingIdentity, org.exoplatform.social.core.identity.model.Identity invitedIdentity)
      Specified by:
      inviteToConnect in interface org.exoplatform.social.core.manager.RelationshipManager
    • confirm

      public org.exoplatform.social.core.relationship.model.Relationship confirm(org.exoplatform.social.core.identity.model.Identity invitedIdentity, org.exoplatform.social.core.identity.model.Identity invitingIdentity)
      Specified by:
      confirm in interface org.exoplatform.social.core.manager.RelationshipManager
    • deny

      public void deny(org.exoplatform.social.core.identity.model.Identity invitedIdentity, org.exoplatform.social.core.identity.model.Identity invitingIdentity)
      Specified by:
      deny in interface org.exoplatform.social.core.manager.RelationshipManager
    • ignore

      public org.exoplatform.social.core.relationship.model.Relationship ignore(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.identity.model.Identity receiver)
      Specified by:
      ignore in interface org.exoplatform.social.core.manager.RelationshipManager
    • delete

      public void delete(org.exoplatform.social.core.relationship.model.Relationship existingRelationship)
      Specified by:
      delete in interface org.exoplatform.social.core.manager.RelationshipManager
    • findRelationships

      public List<org.exoplatform.social.core.identity.model.Identity> findRelationships(org.exoplatform.social.core.identity.model.Identity ownerIdentity, org.exoplatform.social.core.relationship.model.Relationship.Type relationshipType) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      findRelationships in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • get

      public org.exoplatform.social.core.relationship.model.Relationship get(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      get in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • get

      public org.exoplatform.social.core.relationship.model.Relationship get(String relationshipId)
      Specified by:
      get in interface org.exoplatform.social.core.manager.RelationshipManager
    • getAll

      public List<org.exoplatform.social.core.relationship.model.Relationship> getAll(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getAll in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getAll

      public List<org.exoplatform.social.core.relationship.model.Relationship> getAll(org.exoplatform.social.core.identity.model.Identity identity, List<org.exoplatform.social.core.identity.model.Identity> identities) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getAll in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getAll

      public List<org.exoplatform.social.core.relationship.model.Relationship> getAll(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> identities) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getAll in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getAllRelationships

      public List<org.exoplatform.social.core.relationship.model.Relationship> getAllRelationships(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getAllRelationships in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getAllWithListAccess

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity> getAllWithListAccess(org.exoplatform.social.core.identity.model.Identity existingIdentity)
      Specified by:
      getAllWithListAccess in interface org.exoplatform.social.core.manager.RelationshipManager
    • getConfirmed

      public List<org.exoplatform.social.core.relationship.model.Relationship> getConfirmed(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getConfirmed in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getConfirmed

      public List<org.exoplatform.social.core.relationship.model.Relationship> getConfirmed(org.exoplatform.social.core.identity.model.Identity identity, List<org.exoplatform.social.core.identity.model.Identity> identities) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getConfirmed in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getConnections

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity> getConnections(org.exoplatform.social.core.identity.model.Identity identity)
      Specified by:
      getConnections in interface org.exoplatform.social.core.manager.RelationshipManager
    • getConnectionsByFilter

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity> getConnectionsByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter)
      Specified by:
      getConnectionsByFilter in interface org.exoplatform.social.core.manager.RelationshipManager
    • getConnectionsInCommonCount

      public int getConnectionsInCommonCount(org.exoplatform.social.core.identity.model.Identity currentUserIdentity, org.exoplatform.social.core.identity.model.Identity identity)
      Specified by:
      getConnectionsInCommonCount in interface org.exoplatform.social.core.manager.RelationshipManager
    • getConnectionStatus

      public org.exoplatform.social.core.relationship.model.Relationship.Type getConnectionStatus(org.exoplatform.social.core.identity.model.Identity fromIdentity, org.exoplatform.social.core.identity.model.Identity toIdentity) throws Exception
      Specified by:
      getConnectionStatus in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      Exception
    • getContacts

      public List<org.exoplatform.social.core.relationship.model.Relationship> getContacts(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getContacts in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getContacts

      public List<org.exoplatform.social.core.relationship.model.Relationship> getContacts(org.exoplatform.social.core.identity.model.Identity currIdentity, List<org.exoplatform.social.core.identity.model.Identity> identities) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getContacts in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getIdentities

      public List<org.exoplatform.social.core.identity.model.Identity> getIdentities(org.exoplatform.social.core.identity.model.Identity id) throws Exception
      Specified by:
      getIdentities in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      Exception
    • getIncoming

      public List<org.exoplatform.social.core.relationship.model.Relationship> getIncoming(org.exoplatform.social.core.identity.model.Identity receiver) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getIncoming in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getIncoming

      public List<org.exoplatform.social.core.relationship.model.Relationship> getIncoming(org.exoplatform.social.core.identity.model.Identity receiver, List<org.exoplatform.social.core.identity.model.Identity> identities) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getIncoming in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getIncomingByFilter

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity> getIncomingByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter)
      Specified by:
      getIncomingByFilter in interface org.exoplatform.social.core.manager.RelationshipManager
    • getIncomingWithListAccess

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity> getIncomingWithListAccess(org.exoplatform.social.core.identity.model.Identity existingIdentity)
      Specified by:
      getIncomingWithListAccess in interface org.exoplatform.social.core.manager.RelationshipManager
    • getLastConnections

      public List<org.exoplatform.social.core.identity.model.Identity> getLastConnections(org.exoplatform.social.core.identity.model.Identity identity, int limit)
      Specified by:
      getLastConnections in interface org.exoplatform.social.core.manager.RelationshipManager
    • getOutgoing

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity> getOutgoing(org.exoplatform.social.core.identity.model.Identity existingIdentity)
      Specified by:
      getOutgoing in interface org.exoplatform.social.core.manager.RelationshipManager
    • getOutgoingByFilter

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity> getOutgoingByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter)
      Specified by:
      getOutgoingByFilter in interface org.exoplatform.social.core.manager.RelationshipManager
    • getPending

      public List<org.exoplatform.social.core.relationship.model.Relationship> getPending(org.exoplatform.social.core.identity.model.Identity sender) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getPending in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getPending

      public List<org.exoplatform.social.core.relationship.model.Relationship> getPending(org.exoplatform.social.core.identity.model.Identity sender, List<org.exoplatform.social.core.identity.model.Identity> identities) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getPending in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getPendingRelationships

      public List<org.exoplatform.social.core.relationship.model.Relationship> getPendingRelationships(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getPendingRelationships in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getPendingRelationships

      public List<org.exoplatform.social.core.relationship.model.Relationship> getPendingRelationships(org.exoplatform.social.core.identity.model.Identity identity, boolean toConfirm) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getPendingRelationships in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getPendingRelationships

      public List<org.exoplatform.social.core.relationship.model.Relationship> getPendingRelationships(org.exoplatform.social.core.identity.model.Identity currIdentity, List<org.exoplatform.social.core.identity.model.Identity> identities, boolean toConfirm) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getPendingRelationships in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getRelationship

      public org.exoplatform.social.core.relationship.model.Relationship getRelationship(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.identity.model.Identity receiver) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getRelationship in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getRelationshipById

      public org.exoplatform.social.core.relationship.model.Relationship getRelationshipById(String id) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getRelationshipById in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getRelationshipsByIdentityId

      public List<org.exoplatform.social.core.relationship.model.Relationship> getRelationshipsByIdentityId(String id) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getRelationshipsByIdentityId in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getRelationshipsByStatus

      public List<org.exoplatform.social.core.relationship.model.Relationship> getRelationshipsByStatus(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, int offset, int limit)
      Specified by:
      getRelationshipsByStatus in interface org.exoplatform.social.core.manager.RelationshipManager
    • getRelationshipsCountByStatus

      public int getRelationshipsCountByStatus(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type)
      Specified by:
      getRelationshipsCountByStatus in interface org.exoplatform.social.core.manager.RelationshipManager
    • getRelationshipStatus

      public org.exoplatform.social.core.relationship.model.Relationship.Type getRelationshipStatus(org.exoplatform.social.core.relationship.model.Relationship rel, org.exoplatform.social.core.identity.model.Identity id)
      Specified by:
      getRelationshipStatus in interface org.exoplatform.social.core.manager.RelationshipManager
    • getStatus

      public org.exoplatform.social.core.relationship.model.Relationship.Type getStatus(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getStatus in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • confirm

      public void confirm(org.exoplatform.social.core.relationship.model.Relationship relationship) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      confirm in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • deny

      public void deny(org.exoplatform.social.core.relationship.model.Relationship relationship) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      deny in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getSuggestions

      public Map<org.exoplatform.social.core.identity.model.Identity,Integer> getSuggestions(org.exoplatform.social.core.identity.model.Identity identity, int offset, int limit)
      Specified by:
      getSuggestions in interface org.exoplatform.social.core.manager.RelationshipManager
    • getSuggestions

      public Map<org.exoplatform.social.core.identity.model.Identity,Integer> getSuggestions(org.exoplatform.social.core.identity.model.Identity identity, int maxConnections, int maxConnectionsToLoad, int maxSuggestions)
      Specified by:
      getSuggestions in interface org.exoplatform.social.core.manager.RelationshipManager
    • ignore

      public void ignore(org.exoplatform.social.core.relationship.model.Relationship relationship) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      ignore in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • invite

      public org.exoplatform.social.core.relationship.model.Relationship invite(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.identity.model.Identity receiver) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      invite in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • remove

      public void remove(org.exoplatform.social.core.relationship.model.Relationship relationship) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      remove in interface org.exoplatform.social.core.manager.RelationshipManager
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • addListenerPlugin

      public void addListenerPlugin(org.exoplatform.social.core.relationship.RelationshipListenerPlugin plugin)
      Adds a RelationshipListenerPlugin.
      Parameters:
      plugin - RelationshipListenerPlugin
    • registerListener

      public void registerListener(org.exoplatform.social.core.relationship.RelationshipListener listener)
      Registers a RelationshipLister.
      Parameters:
      listener - RelationshipListener
    • unregisterListener

      public void unregisterListener(org.exoplatform.social.core.relationship.RelationshipListener listener)
      Unregisters a RelationshipLister.
      Parameters:
      listener - RelationshipListener
    • getReceiver

      protected List<org.exoplatform.social.core.relationship.model.Relationship> getReceiver(org.exoplatform.social.core.identity.model.Identity receiver, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> identities) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Get relationships by identity and status from cache or activityStorage
      Parameters:
      receiver -
      identities -
      Returns:
      list of relationship
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getRelationships

      protected List<org.exoplatform.social.core.relationship.model.Relationship> getRelationships(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> identities) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Get relationships by identity and status from cache or activityStorage
      Parameters:
      identity -
      identities -
      Returns:
      list of relationship
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getSender

      protected List<org.exoplatform.social.core.relationship.model.Relationship> getSender(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> identities) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Get relationships by identity and status and identities from activityStorage
      Parameters:
      sender -
      Returns:
      list of relationship
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException