Interface ContactService
-
- All Known Implementing Classes:
DefaultContactService
public interface ContactService
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.ContactPK
createContact(Contact contact)
Create a new contact A new line will be added in contact table.void
createInfoModel(ContactPK contactPK, String modelId)
void
deleteIndex(ContactPK contactPK)
void
deleteOrphanContactsByCreatorId(ContactPK contactPK, String creatorId)
static ContactService
get()
Collection<NodePK>
getAllFatherPK(ContactPK contactPK)
getAllFatherPK() return a collection, containing all node primary key from where the contact is visibleCompleteContact
getCompleteContact(ContactPK contactPK)
CompleteContact
getCompleteContact(ContactPK pubPK, String modelId)
Collection<ContactDetail>
getContacts(Collection<ContactPK> contactPKs)
ContactDetail
getDetail(ContactPK contactPK)
get details on the contact specified by the primary key given in contactPK parameterCollection<ContactDetail>
getDetailsByFatherPK(NodePK fatherPK)
getDetailsByFatherPK() return a ContactDetail collection of all contact visible from the node identified by "fatherPK" parameterCollection<ContactFatherDetail>
getDetailsByFatherPKs(Collection<NodePK> fatherPKs, ContactPK contactPK, NodePK nodePK)
Collection<ContactDetail>
getDetailsByLastName(ContactPK pk, String query)
Collection<ContactDetail>
getDetailsByLastNameAndFirstName(ContactPK pk, String lastName, String firstName)
Collection<ContactDetail>
getDetailsByLastNameOrFirstName(ContactPK pk, String query)
int
getNbPubByFatherPath(NodePK fatherPK, String fatherPath)
int
getNbPubInFatherPKs(Collection<NodePK> fatherPKs)
Collection<ContactDetail>
getOrphanContacts(ContactPK contactPK)
getOrphanContacts() return the Detail of contact which are not linked to a fatherCollection<ContactDetail>
getUnavailableContactsByPublisherId(ContactPK contactPK, String publisherId, String nodeId)
List<CompleteContact>
getVisibleContacts(String instanceId)
Gets all non transitive contacts from an component represented by the given identifier that are not in basket.void
index(ContactPK contactPK)
void
removeAllFather(ContactPK contactPK)
removeAllFather() remove all father from a contact ("pubPK") The contact won't be visible.void
removeAllIssue(NodePK originPK, ContactPK contactPK)
removeAllIssue() remove all links between contacts and node N N is a descendant of the node designed by originPKvoid
removeContact(ContactPK contactPK)
removeContact() remove the contact designed by contactPK parameter.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.void
setDetail(Contact detail)
setDetail() update the contact content.
-
-
-
Method Detail
-
get
static ContactService get()
-
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)
-
getUnavailableContactsByPublisherId
Collection<ContactDetail> getUnavailableContactsByPublisherId(ContactPK contactPK, String publisherId, String nodeId)
-
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:
-
getDetailsByLastName
Collection<ContactDetail> getDetailsByLastName(ContactPK pk, String query)
-
getDetailsByLastNameOrFirstName
Collection<ContactDetail> getDetailsByLastNameOrFirstName(ContactPK pk, String query)
-
getDetailsByLastNameAndFirstName
Collection<ContactDetail> getDetailsByLastNameAndFirstName(ContactPK pk, String lastName, String firstName)
-
getCompleteContact
CompleteContact getCompleteContact(ContactPK contactPK)
-
getCompleteContact
CompleteContact getCompleteContact(ContactPK pubPK, String modelId)
-
getContacts
Collection<ContactDetail> getContacts(Collection<ContactPK> contactPKs)
-
getNbPubInFatherPKs
int getNbPubInFatherPKs(Collection<NodePK> fatherPKs)
-
getDetailsByFatherPKs
Collection<ContactFatherDetail> getDetailsByFatherPKs(Collection<NodePK> fatherPKs, ContactPK contactPK, NodePK nodePK)
-
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.
-
index
void index(ContactPK contactPK)
-
deleteIndex
void deleteIndex(ContactPK contactPK)
-
-