Interface ContactService

    • Method Detail

      • getDetail

        ContactDetail getDetail​(ContactPK contactPK)
        get details on the contact specified by the primary key given in contactPK parameter
        Parameters:
        contactPK - the contact primary key
        Returns:
        the contact detail
      • createContact

        ContactPK createContact​(Contact contact)
        Create a new contact A new line will be added in contact table. The "id" in "detail" is not used (a new one will be computed). The "ed" is used to know the table name.
        Parameters:
        contact - the contact detail
        Returns:
        contact primary key
      • removeContact

        void removeContact​(ContactPK contactPK)
        removeContact() remove the contact designed by contactPK parameter.
        Parameters:
        contactPK -
      • setDetail

        void setDetail​(Contact detail)
        setDetail() update the contact content.
        Parameters:
        detail - the contact detail to update
      • addFather

        void addFather​(ContactPK contactPK,
                       NodePK fatherPK)
        addFather() add a new father (designed by "fatherPK") to a contact ("contactPK") The contact will be visible from its new father node.
        Parameters:
        contactPK -
        fatherPK -
      • removeFather

        void removeFather​(ContactPK contactPK,
                          NodePK fatherPK)
        removeFather() remove a father (designed by "fatherPK") from a contact ("pubPK") The contact won't be visible from its old father node.
        Parameters:
        contactPK -
        fatherPK -
      • removeAllFather

        void removeAllFather​(ContactPK contactPK)
        removeAllFather() remove all father from a contact ("pubPK") The contact won't be visible.
        Parameters:
        contactPK -
      • removeAllIssue

        void removeAllIssue​(NodePK originPK,
                            ContactPK contactPK)
        removeAllIssue() remove all links between contacts and node N N is a descendant of the node designed by originPK
        Parameters:
        originPK -
        contactPK -
      • getOrphanContacts

        Collection<ContactDetail> getOrphanContacts​(ContactPK contactPK)
        getOrphanContacts() return the Detail of contact which are not linked to a father
        Parameters:
        contactPK - the contact primary key
        Returns:
        list of contact which are not linked to a father
      • deleteOrphanContactsByCreatorId

        void deleteOrphanContactsByCreatorId​(ContactPK contactPK,
                                             String creatorId)
      • getAllFatherPK

        Collection<NodePK> getAllFatherPK​(ContactPK contactPK)
        getAllFatherPK() return a collection, containing all node primary key from where the contact is visible
        Parameters:
        contactPK -
        Returns:
      • getDetailsByFatherPK

        Collection<ContactDetail> getDetailsByFatherPK​(NodePK fatherPK)
        getDetailsByFatherPK() return a ContactDetail collection of all contact visible from the node identified by "fatherPK" parameter
        Parameters:
        fatherPK -
        Returns:
      • createInfoModel

        void createInfoModel​(ContactPK contactPK,
                             String modelId)
      • getNbPubInFatherPKs

        int getNbPubInFatherPKs​(Collection<NodePK> fatherPKs)
      • getNbPubByFatherPath

        int getNbPubByFatherPath​(NodePK fatherPK,
                                 String fatherPath)
      • getVisibleContacts

        List<CompleteContact> getVisibleContacts​(String instanceId)
        Gets all non transitive contacts from an component represented by the given identifier that are not in basket. A transitive contact is a contact of user type linked directly by a group.
        Parameters:
        instanceId - the identifier of the component instance into which contact are retrieved.
        Returns:
        the list of complete contact data. Empty list if none.
      • deleteIndex

        void deleteIndex​(ContactPK contactPK)