| java.lang.Object com.ivata.groupware.business.addressbook.AddressBookBean
AddressBookBean | public class AddressBookBean implements SessionBean,AddressBook(Code) | | This address book provides clients with access to the register of people
within the ivata groupware system.
Actions are here to retrieve people, change their details and enter new
people into the system. This bean manages people's street and
telecommunications addresses, together with which people are users and what
group(s) each person is a member of.
Furthermore, this bean is responsible for assigning and maintaining
employee information.
Note, however that whilst the addressbook may react on which
people are users (it checks those people always have an email address), this
EJB is not responsible for adding, removing or amending users or their
passwords. For that functionality, see the
com.ivata.groupware.admin.security.SecurityBeanSecurityBean .
since: 2002-05-12 author: Colin MacLeod author: colin.macleod@ivata.com version: $Revision: 1.4 $ version: TODO: the employee and user methods need to check the user rights |
Method Summary | |
public GroupDO | addAddressBook(SecuritySession securitySession, GroupDO groupDO) | public GroupDO | addGroup(SecuritySession securitySession, GroupDO groupDO) Add a new group to the address book.
Parameters: userName - the name of the user who wants to add the group. | public PersonDO | addPerson(SecuritySession securitySession, PersonDO personDO) Add a new person to the address book.
Parameters: personDO - data object containing the details of theperson you want to add. | public GroupDO | addUserGroup(SecuritySession securitySession, GroupDO groupDO) | public GroupDO | amendGroup(SecuritySession securitySession, GroupDO groupDO) Amend the details of a group in the public address book.
Parameters: userName - the name of the user who wants to amend the group. | public PersonDO | amendPerson(SecuritySession securitySession, PersonDO personDO) Change/update a person's details in the addressbook.
Parameters: personDO - data object containing the details of theperson you want to amend. | public void | ejbActivate() | public void | ejbCreate() Called by the container just after the bean has been created.
exception: CreateException - if any error occurs. | public void | ejbPassivate() Called by the container to notify the entity object it will be
deactivated. | final public void | ejbRemove() This method is called by the container when the bean is about
to be removed.
This method will be called after a client calls the remove
method of the remote/local home interface.
throws: RemoveException - if any error occurs. | public List | findAddressBooks(SecuritySession securitySession, boolean includePersonal) | public List | findAllCountries(SecuritySession securitySession) | public List | findAllPeopleInGroup(SecuritySession securitySession, GroupDO group, String initialLetter) | public CountryDO | findCountryByCode(SecuritySession securitySession, String countryCode) Find a single county identified by its two-letter country code.
Parameters: countryCode - two-letter internet country code. | public GroupDO | findGroupByPrimaryKey(SecuritySession securitySession, Integer id) Find a group in the address book by its unique identifier.
Parameters: id - the unique identifier of the group to find. | public List | findGroupsByParent(SecuritySession securitySession, Integer parentId)
Find all groups which are siblings, identified by the parent group. | public PersonDO | findPersonByPrimaryKey(SecuritySession securitySession, String id) Find a person in the address book by their unique identifier.
Parameters: id - the unique identifier of the person to find. | public PersonDO | findPersonByUserName(SecuritySession securitySession, String userName) Find a person in the address book by their user name.
Parameters: userName - Name of the user to find. | public GroupDO | findPersonalAddressBook(SecuritySession securitySession) | public List | findUserGroups(SecuritySession securitySession, boolean includeAdministrator) | public void | removeGroup(SecuritySession securitySession, Integer id) Remove a group from the public address book.
Parameters: userName - the name of the user who wants to remove the group. | public void | removePerson(SecuritySession securitySession, Integer id) Remove a person from the address book.
Parameters: personDO - data object containing the details of theperson you want to remove. | final public void | setSessionContext(SessionContext sessionContext) Set up the context for this entity object. | public ValidationErrors | validate(SecuritySession securitySession, AddressDO addressDO) Confirm all of the elements of the person are address and valid,
before the message is sent.
Parameters: addressDO - data object to check for consistency andcompleteness. | public ValidationErrors | validate(SecuritySession securitySession, GroupDO groupDO) Confirm all of the elements of the group are present and valid,
before the message is sent.
Parameters: groupDO - data object to check for consistency andcompleteness. | public ValidationErrors | validate(SecuritySession securitySession, PersonDO personDO) Confirm all of the elements of the person are present and valid,
before the message is sent.
Parameters: personDO - data object to check for consistency andcompleteness. |
sessionContext | SessionContext sessionContext(Code) | | Provides the session bean with container-specific information.
|
addAddressBook | public GroupDO addAddressBook(SecuritySession securitySession, GroupDO groupDO) throws SystemException(Code) | | Add bew AddressBook.
Parameters: userName - Parameters: groupDO - |
addGroup | public GroupDO addGroup(SecuritySession securitySession, GroupDO groupDO) throws SystemException(Code) | | Add a new group to the address book.
Parameters: userName - the name of the user who wants to add the group. This isused to check user rights. Parameters: groupDO - a data object containing all the detailsof the group to add. exception: com.ivata.groupware.ejb.entity.UserRightException - if the userprovided is not entitled to add this group exception: com.ivata.groupware.ejb.entity.InvalidFieldValueException - if a field value in the new group contains an invalid value the new group data object, with the details as theynow are in the adressbook. |
addPerson | public PersonDO addPerson(SecuritySession securitySession, PersonDO personDO) throws SystemException(Code) | | Add a new person to the address book.
Parameters: personDO - data object containing the details of theperson you want to add. the new person data object, with the details as theynow are in the adressbook. |
addUserGroup | public GroupDO addUserGroup(SecuritySession securitySession, GroupDO groupDO) throws SystemException(Code) | | add new userGroup.
Parameters: userName - Parameters: groupDO - |
amendGroup | public GroupDO amendGroup(SecuritySession securitySession, GroupDO groupDO) throws SystemException(Code) | | Amend the details of a group in the public address book.
Parameters: userName - the name of the user who wants to amend the group. Thisis used to check user rights. Parameters: groupDO - a data object containing all the detailsof the group to amend. exception: com.ivata.groupware.ejb.entity.UserRightException - if the userprovided is not entitled to amend this group. exception: com.ivata.groupware.ejb.entity.InvalidFieldValueException - if a field value in the new group contains an invalid value. the new group data object, with the details as theynow are in the adressbook. |
amendPerson | public PersonDO amendPerson(SecuritySession securitySession, PersonDO personDO) throws SystemException(Code) | | Change/update a person's details in the addressbook.
Parameters: personDO - data object containing the details of theperson you want to amend. the new person data object, with the details as theynow are in the adressbook. |
ejbActivate | public void ejbActivate()(Code) | | Called by the container to notify an entity object it has been
activated.
|
ejbCreate | public void ejbCreate() throws CreateException(Code) | | Called by the container just after the bean has been created.
exception: CreateException - if any error occurs. Never thrown by thisclass. |
ejbPassivate | public void ejbPassivate()(Code) | | Called by the container to notify the entity object it will be
deactivated. Called just before deactivation.
|
ejbRemove | final public void ejbRemove()(Code) | | This method is called by the container when the bean is about
to be removed.
This method will be called after a client calls the remove
method of the remote/local home interface.
throws: RemoveException - if any error occurs. Currently never thrown bythis class. |
findAddressBooks | public List findAddressBooks(SecuritySession securitySession, boolean includePersonal) throws SystemException(Code) | | get Map of all address book names which are allowed with specific access.
Parameters: userName - Parameters: access - |
findGroupByPrimaryKey | public GroupDO findGroupByPrimaryKey(SecuritySession securitySession, Integer id) throws SystemException(Code) | | Find a group in the address book by its unique identifier.
Parameters: id - the unique identifier of the group to find. the data object of the group which matches this uniqueidentifier. |
findPersonByPrimaryKey | public PersonDO findPersonByPrimaryKey(SecuritySession securitySession, String id) throws SystemException(Code) | | Find a person in the address book by their unique identifier.
Parameters: id - the unique identifier of the person to find. the person data object which matches this id, with thedetails as they now are in the adressbook. |
findPersonalAddressBook | public GroupDO findPersonalAddressBook(SecuritySession securitySession) throws SystemException(Code) | | Find Id of personal AddressBook.
Parameters: userName - |
findUserGroups | public List findUserGroups(SecuritySession securitySession, boolean includeAdministrator) throws SystemException(Code) | | get Map of all usergroup names which are allowed with specific access.
Parameters: userName - Parameters: access - |
removeGroup | public void removeGroup(SecuritySession securitySession, Integer id) throws SystemException(Code) | | Remove a group from the public address book.
Parameters: userName - the name of the user who wants to remove the group. Thisis used to check user rights. Parameters: groupDO - a data object containing all the detailsof the group to remove. The id of the group is used to identify whichgroup to remove. exception: com.ivata.groupware.ejb.entity.UserRightException - if the userprovided is not entitled to remvoe this group. exception: com.ivata.groupware.ejb.entity.InvalidFieldValueException - if the id of the group contains an invalid value. |
removePerson | public void removePerson(SecuritySession securitySession, Integer id) throws SystemException(Code) | | Remove a person from the address book.
Parameters: personDO - data object containing the details of theperson you want to remove. The id is used to locate and remove theperson. |
setSessionContext | final public void setSessionContext(SessionContext sessionContext)(Code) | | Set up the context for this entity object. The session bean stores the
context for later use.
Parameters: sessionContext - the new context which the session object shouldstore. |
validate | public ValidationErrors validate(SecuritySession securitySession, AddressDO addressDO) throws SystemException(Code) | | Confirm all of the elements of the person are address and valid,
before the message is sent.
Parameters: addressDO - data object to check for consistency andcompleteness. a collection of validation errors if any of themandatory fields are missing, or if fields contain invalid values. |
validate | public ValidationErrors validate(SecuritySession securitySession, GroupDO groupDO) throws SystemException(Code) | | Confirm all of the elements of the group are present and valid,
before the message is sent.
Parameters: groupDO - data object to check for consistency andcompleteness. a collection of validation errors if any of themandatory fields are missing, or if fields contain invalid values. |
validate | public ValidationErrors validate(SecuritySession securitySession, PersonDO personDO) throws SystemException(Code) | | Confirm all of the elements of the person are present and valid,
before the message is sent.
Parameters: personDO - data object to check for consistency andcompleteness. a collection of validation errors if any of themandatory fields are missing, or if fields contain invalid values. |
|
|