org.orange.kicsa.service.ability
Class AbilityServiceImpl


public class AbilityServiceImpl
implements AbilityService

Author:
Jérôme Beau pour Orange (c) 2002
Version: 0.1
Stereotype business delegate
testcase test.org.orange.kicsa.service.ability.TestAbilityServiceImpl

Field Summary
 (package private) EmployeeServicePoolemployeeServicePool
           
 (package private) SkillServicePoolskillServicePool
           

Method Summary
 Abilitycreate(Ability someAbility)
          Crée une capacité
 EmployeecreateEmployee(Employee someEmployee, Collection someAbilities, Collection someRights)
          Crée un employé avec des capacités et des droits

Pour l'instant les droits ne sont pas pris en compte
 CollectionfindBestBySkill(Collection someAbilities)
           
 CollectionfindByEmployee(Employee someEmployee)
           
 SortedMapfindBySkill(Skill someSkill)
           
 static AbilityServiceImplgetInstance()
           
 voidremove(Ability someAbility)
          Met à jour une capacité

public Ability update (Ability someAbility)
{
Assert.notNull (abilityDAO, "Le DAO d'employés ne peut être nul");

try
{
return abilityDAO.update (someAbility);
}
catch (DAOException daoProblem)
{
throw new ServiceException (daoProblem);
}
}

/**
Supprime une capacité
 intremoveEmployee(EmployeeKey someEmployeeKey)
          Supprime un employé et ses capacités
 intremoveSkill(SkillKey someSkillKey)
          Supprime une compétence et les capacités qui s'y rapportent
 EmployeeupdateEmployee(Employee someEmployee, Collection someAbilities, Collection someRights)
          Met à jour un employé

Field Detail

employeeServicePool

EmployeeServicePool employeeServicePool

skillServicePool

SkillServicePool skillServicePool
Method Detail

create

public Ability create(Ability someAbility)
Crée une capacité

createEmployee

public Employee createEmployee(Employee someEmployee, Collection someAbilities, Collection someRights)
Crée un employé avec des capacités et des droits


Pour l'instant les droits ne sont pas pris en compte


findBestBySkill

public Collection findBestBySkill(Collection someAbilities)
throws org.orange.kicsa.SkillNotFoundException

findByEmployee

public Collection findByEmployee(Employee someEmployee)
Returns: The employee's abilities, indexed by skill key

findBySkill

public SortedMap findBySkill(Skill someSkill)
Returns: Les capacités liées à cette compétence, indexées par niveau (String)
someSkillKey La clé d'une compétence

getInstance

public static AbilityServiceImpl getInstance()

remove

public void remove(Ability someAbility)
Met à jour une capacité

public Ability update (Ability someAbility)
{
Assert.notNull (abilityDAO, "Le DAO d'employés ne peut être nul");

try
{
return abilityDAO.update (someAbility);
}
catch (DAOException daoProblem)
{
throw new ServiceException (daoProblem);
}
}

/**
Supprime une capacité

removeEmployee

public int removeEmployee(EmployeeKey someEmployeeKey)
Supprime un employé et ses capacités

removeSkill

public int removeSkill(SkillKey someSkillKey)
Supprime une compétence et les capacités qui s'y rapportent

updateEmployee

public Employee updateEmployee(Employee someEmployee, Collection someAbilities, Collection someRights)
Met à jour un employé
Parameters:
someEmployee L'employé à mettre à jour
someAbilities Les capacités de l'employé à mettre à jour
en fonction de leur status (EditableStatus.TO_CREATE, EditableStatus.TO_REMOVE, etc.).
Ces capacités seront donc modifiées au retour de la méthode (une des capacité aura été supprimée par exemple).
someRights Les droits à modifier pour l'employé. Non supporté pour l'instant
Returns: L'employé mis à jour.
See Also:
Editable, org.orange.kicsa.business.EditableStatus

Association Links

to Class org.orange.kicsa.integration.ability.AbilityDAO

Supplier Qualifier dao

to Class org.orange.kicsa.service.ability.AbilityServiceImpl

Singleton

to Class org.orange.kicsa.service.employee.EmployeeServicePool

to Class org.orange.kicsa.service.skill.SkillServicePool

Dependency Links

to Class test.org.orange.kicsa.service.ability.TestAbilityServiceImpl

to Class org.orange.kicsa.service.ability.AbilityService

to Class org.orange.kicsa.integration.AbstractDAOFactory

to Class org.orange.kicsa.Application

to Class org.orange.kicsa.service.employee.EmployeeServicePool

to Class org.orange.kicsa.service.skill.SkillServicePool

to Class org.orange.kicsa.service.ServiceException

to Class java.lang.Throwable

to Class java.util.Collection

to Class org.orange.kicsa.SkillNotFoundException

to Class org.orange.util.integration.DAOException

to Class java.lang.Class

to Class org.orange.kicsa.business.employee.Employee

to Class org.orange.util.Assert

to Class org.orange.kicsa.business.ability.Ability

to Class java.util.Iterator

to Class javax.transaction.UserTransaction

to Class javax.naming.InitialContext

to Class org.orange.util.J2EEConstants

to Class org.orange.kicsa.service.employee.EmployeeService

to Class javax.naming.NamingException

to Class java.lang.Exception

to Class org.orange.kicsa.business.Editable

to Class org.orange.kicsa.business.employee.EmployeeKey

to Class org.orange.kicsa.business.skill.SkillKey

to Class org.orange.kicsa.service.skill.SkillService

to Class java.util.SortedMap

to Class org.orange.kicsa.business.skill.Skill

to Class java.util.TreeMap

to Class java.lang.String

to Class java.util.ArrayList

to Class java.util.Map

to Class java.lang.Object

to Class org.orange.kicsa.integration.ability.AbilityDAO

to Class Diagram test.org.orange.kicsa.service.ability

to Class Diagram test.org.orange.kicsa.service

to Class Diagram test.org.orange.kicsa

to Class Diagram test.org.orange

to Class Diagram test.org

to Class Diagram test

to Class Diagram <default>

to Class Diagram org.orange.kicsa.service.ability

to Class Diagram org.orange.kicsa.service

to Class Diagram org.orange.kicsa

to Class Diagram org.orange

to Class Diagram org

to Class Diagram org.orange.kicsa.integration

to Class Diagram org.orange.kicsa.service.employee

to Class Diagram org.orange.kicsa.service.skill

to Class Diagram org.orange.util.integration

to Class Diagram org.orange.util

to Class Diagram org.orange.kicsa.business.employee

to Class Diagram org.orange.kicsa.business

to Class Diagram org.orange.kicsa.business.ability

to Class Diagram org.orange.kicsa.business.skill

to Class Diagram org.orange.kicsa.integration.ability