com.stratelia.webactiv.util.contact.control
Class ContactBmEJB

java.lang.Object
  extended by com.stratelia.webactiv.util.contact.control.ContactBmEJB
All Implemented Interfaces:
ContactBm

public class ContactBmEJB
extends Object
implements ContactBm


Constructor Summary
ContactBmEJB()
           
 
Method Summary
 void addFather(ContactPK pubPK, NodePK fatherPK)
          addFather() add a new father (designed by "fatherPK") to a contact ("pubPK") The contact will be visible from its new father node.
 ContactPK createContact(Contact contact)
          createContact() Create a new contact A new line will be added in contact table.
 void createInfoModel(ContactPK pubPK, String modelId)
           
 void deleteIndex(ContactPK pubPK)
          Called on : - deleteContact()
 void deleteOrphanContactsByCreatorId(ContactPK pubPK, String creatorId)
           
 Collection<NodePK> getAllFatherPK(ContactPK pubPK)
          getAllFatherPK
 CompleteContact getCompleteContact(ContactPK pubPK)
           
 CompleteContact getCompleteContact(ContactPK pubPK, String modelId)
           
 Collection<ContactDetail> getContacts(Collection<ContactPK> contactPKs)
           
 ContactDetail getDetail(ContactPK pubPK)
          getDetail() get details on the contact specified by the primary key given in pubPK parameter
 Collection<ContactDetail> getDetailsByFatherPK(NodePK fatherPK)
          getDetailsByFatherPK() return a ContactDetail collection of all contact visible from the node identified by "fatherPK" parameter
 Collection<ContactFatherDetail> getDetailsByFatherPKs(Collection<NodePK> fatherPKs, ContactPK pubPK, 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 pubPK)
          getOrphanContacts() return the Detail of contact which are not linked to a father
 Collection<ContactDetail> getUnavailableContactsByPublisherId(ContactPK pubPK, 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 pk)
           
 void removeAllFather(ContactPK pubPK)
          Remove all the fathers from a contact ("pubPK") The contact won't be visible.
 void removeAllIssue(NodePK originPK, ContactPK pubPK)
          removeAllIssue() remove all links between contacts and node N N is a descendant of the node designed by originPK.
 void removeContact(ContactPK pubPK)
          removeContact() remove the contact designed by pubPK parameter.
 void removeFather(ContactPK pubPK, 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 contact)
          setDetail() update the contact content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContactBmEJB

public ContactBmEJB()
Method Detail

getDetail

public ContactDetail getDetail(ContactPK pubPK)
Description copied from interface: ContactBm
getDetail() get details on the contact specified by the primary key given in pubPK parameter

Specified by:
getDetail in interface ContactBm
Returns:

createContact

public ContactPK createContact(Contact contact)
Description copied from interface: ContactBm
createContact() 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.

Specified by:
createContact in interface ContactBm
Returns:

removeContact

public void removeContact(ContactPK pubPK)
Description copied from interface: ContactBm
removeContact() remove the contact designed by pubPK parameter.

Specified by:
removeContact in interface ContactBm

setDetail

public void setDetail(Contact contact)
Description copied from interface: ContactBm
setDetail() update the contact content.

Specified by:
setDetail in interface ContactBm

addFather

public void addFather(ContactPK pubPK,
                      NodePK fatherPK)
addFather() add a new father (designed by "fatherPK") to a contact ("pubPK") The contact will be visible from its new father node.

Specified by:
addFather in interface ContactBm
Parameters:
pubPK -
fatherPK -

removeFather

public void removeFather(ContactPK pubPK,
                         NodePK fatherPK)
removeFather() remove a father (designed by "fatherPK") from a contact ("pubPK") The contact won't be visible from its old father node.

Specified by:
removeFather in interface ContactBm
Parameters:
pubPK -
fatherPK -

removeAllFather

public void removeAllFather(ContactPK pubPK)
Remove all the fathers from a contact ("pubPK") The contact won't be visible.

Specified by:
removeAllFather in interface ContactBm
Parameters:
pubPK - the id of the contact.

removeAllIssue

public void removeAllIssue(NodePK originPK,
                           ContactPK pubPK)
removeAllIssue() remove all links between contacts and node N N is a descendant of the node designed by originPK.

Specified by:
removeAllIssue in interface ContactBm
Parameters:
originPK -
pubPK -

getOrphanContacts

public Collection<ContactDetail> getOrphanContacts(ContactPK pubPK)
Description copied from interface: ContactBm
getOrphanContacts() return the Detail of contact which are not linked to a father

Specified by:
getOrphanContacts in interface ContactBm
Returns:

deleteOrphanContactsByCreatorId

public void deleteOrphanContactsByCreatorId(ContactPK pubPK,
                                            String creatorId)
Specified by:
deleteOrphanContactsByCreatorId in interface ContactBm

getUnavailableContactsByPublisherId

public Collection<ContactDetail> getUnavailableContactsByPublisherId(ContactPK pubPK,
                                                                     String publisherId,
                                                                     String nodeId)
Specified by:
getUnavailableContactsByPublisherId in interface ContactBm

getAllFatherPK

public Collection<NodePK> getAllFatherPK(ContactPK pubPK)
getAllFatherPK

Specified by:
getAllFatherPK in interface ContactBm
Returns:

getDetailsByFatherPK

public Collection<ContactDetail> getDetailsByFatherPK(NodePK fatherPK)
getDetailsByFatherPK() return a ContactDetail collection of all contact visible from the node identified by "fatherPK" parameter

Specified by:
getDetailsByFatherPK in interface ContactBm
Returns:

getDetailsByLastName

public Collection<ContactDetail> getDetailsByLastName(ContactPK pk,
                                                      String query)
Specified by:
getDetailsByLastName in interface ContactBm

getDetailsByLastNameOrFirstName

public Collection<ContactDetail> getDetailsByLastNameOrFirstName(ContactPK pk,
                                                                 String query)
Specified by:
getDetailsByLastNameOrFirstName in interface ContactBm

getDetailsByLastNameAndFirstName

public Collection<ContactDetail> getDetailsByLastNameAndFirstName(ContactPK pk,
                                                                  String lastName,
                                                                  String firstName)
Specified by:
getDetailsByLastNameAndFirstName in interface ContactBm

createInfoModel

public void createInfoModel(ContactPK pubPK,
                            String modelId)
Specified by:
createInfoModel in interface ContactBm

getCompleteContact

public CompleteContact getCompleteContact(ContactPK pubPK,
                                          String modelId)
Specified by:
getCompleteContact in interface ContactBm

getCompleteContact

public CompleteContact getCompleteContact(ContactPK pubPK)
Specified by:
getCompleteContact in interface ContactBm

getContacts

public Collection<ContactDetail> getContacts(Collection<ContactPK> contactPKs)
Specified by:
getContacts in interface ContactBm

getNbPubInFatherPKs

public int getNbPubInFatherPKs(Collection<NodePK> fatherPKs)
Specified by:
getNbPubInFatherPKs in interface ContactBm

getDetailsByFatherPKs

public Collection<ContactFatherDetail> getDetailsByFatherPKs(Collection<NodePK> fatherPKs,
                                                             ContactPK pubPK,
                                                             NodePK nodePK)
Specified by:
getDetailsByFatherPKs in interface ContactBm

getNbPubByFatherPath

public int getNbPubByFatherPath(NodePK fatherPK,
                                String fatherPath)
Specified by:
getNbPubByFatherPath in interface ContactBm

getVisibleContacts

public List<CompleteContact> getVisibleContacts(String instanceId)
Description copied from interface: ContactBm
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.

Specified by:
getVisibleContacts in interface ContactBm
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

public void index(ContactPK pk)
Specified by:
index in interface ContactBm

deleteIndex

public void deleteIndex(ContactPK pubPK)
Called on : - deleteContact()

Specified by:
deleteIndex in interface ContactBm


Copyright © 2016 Silverpeas. All Rights Reserved.