fr.inra.refcomp.services
Interface StorageService

All Known Implementing Classes:
StorageServiceImpl

public interface StorageService

User: couteau Date: 30 nov. 2010


Method Summary
 AgentSkill addSkill(String agentId)
           
 EntitiesList addSkill(String agentId, List<String> skillIds, String frequencyId)
           
 EntitiesList addSkill(String agentId, Skill skill, String frequencyId)
           
 void adminCreationIfDoNotExist()
           
 void clear()
           
 AgentSkill createAgentSkill(String agentId)
           
 Cati createCati()
          Return a new cati created in database.
 Department createDepartment()
          Return a new department created in database.
 Frequency createFrequency()
          Return a new frequency created in database.
 void createPrivateGroupIfDoNotExist()
           
 Skill createSkill(String parentId)
          Return a new user created in database.
 Unit createUnit()
          Return a new unit created in database.
 User createUser()
          Return a new user created in database.
 void deleteCati(Cati cati)
          Delete a cati
 void deleteDepartment(Department department)
          Delete a department
 void deleteEntity(org.nuiton.wikitty.entities.BusinessEntity entity)
           
 void deleteFrequency(Frequency frequency, boolean force)
          Delete a frequency
 void deleteSkill(Skill skill)
          Delete a skill
 void deleteUnit(Unit unit)
          Delete a unit
 void deleteUser(User user)
          Delete a user
 void exportEntitiesReferentiel(Writer writer)
           
 void exportSkillsReferentiel(Writer writer)
           
 void exportUserBase(Writer writer)
           
 String getAdminEmail()
          Get the administrator email address from config
 Agent getAgent(String id)
           
 EntitiesList getAgentAndDependencies(String id)
           
 AgentSkill getAgentSkill(String skillId)
           
 List<Skill> getAllSkills()
           
 Cati getCati(String id)
          Get a cati with its id
 List<Cati> getCatis()
          Get all the catis.
 List<Skill> getChildrenSkill(String id)
           
 org.nuiton.wikitty.WikittyClient getClient()
           
 Department getDepartment(String id)
          Get a department with its id
 List<Department> getDepartments()
          Get all the departments.
 List<Department> getDepartments(String id)
          Get all departments for a unit
 List<Frequency> getFrequencies()
          Get all the frequencies.
 Frequency getFrequency(String id)
          Get a frequency with its id
 org.nuiton.wikitty.entities.WikittyUser getLoggedInUser()
           
 String getPath(String id)
           
 Map<String,Skill> getRootSkill(List<String> skills)
           
 List<Skill> getRootSkills()
           
 Skill getSkill(String id)
          Get a skill with its id
 EntitiesList getSkills(String agentId)
          Get the skills for an agent
 Unit getUnit(String id)
          Get a unit with its id
 List<Unit> getUnits()
          Get all units
 List<Unit> getUnits(String id)
          Get all the units for a department
 User getUser(String id)
          Get a user with its id
 List<User> getUsers()
          Get all the users.
 void importCSV(Reader reader)
           
 boolean isAdmin()
           
 boolean isAdmin(String id)
           
 boolean isAgent()
           
 Boolean isLoggedIn()
           
 Boolean login(String login, String password)
          Log the user in
 void logout()
           
 boolean moveSkill(String destination, String node)
           
 void removeSkill(String skillId)
           
 Agent saveAgent(Locale locale, String context, Agent agent)
          Save an agent in database.
 void saveAgentSkill(Locale locale, AgentSkill skill)
           
 Cati saveCati(Locale locale, Cati cati)
          Save a cati in database.
 Department saveDepartment(Locale locale, Department department)
          Save a department in database.
 Department saveDepartment(Locale locale, Department department, List<String> units)
          Save a department in database.
 void saveEntity(org.nuiton.wikitty.entities.BusinessEntity entity)
           
 Frequency saveFrequency(Locale locale, Frequency frequency)
          Save a frequency in database.
 EntitiesList saveMySkills(Locale locale, List<AgentSkill> skills)
           
 Skill saveSkill(Locale locale, Skill skill)
          Save a skill in database.
 Unit saveUnit(Locale locale, Unit unit)
          Save a unit in database.
 Unit saveUnit(Locale locale, Unit unit, List<String> departments)
          Save a unit in database.
 User saveUser(Locale locale, String context, User user)
          Save a user in database.
 EntitiesList searchSkill(String search, String cati, String department, String unit, String frequency)
           
 EntitiesList searchUser(String search, String cati, String department, String unit, String frequency)
           
 boolean sendPassword(Locale locale, String userId)
           
 void setAdmin(String agentId, boolean admin)
           
 Agent setAgent(User user)
           
 void setClient(org.nuiton.wikitty.WikittyClient client)
           
 void setPrivateSkills(List<String> ids)
           
 void setPublicSkills(List<String> ids)
           
 void unsetAgent(String id)
           
 

Method Detail

getClient

org.nuiton.wikitty.WikittyClient getClient()

setClient

void setClient(org.nuiton.wikitty.WikittyClient client)

getCatis

List<Cati> getCatis()
Get all the catis.

Returns:
a list containing all the catis.

saveCati

Cati saveCati(Locale locale,
              Cati cati)
              throws InvalidEntityException
Save a cati in database.

Parameters:
cati - the cati to save
Returns:
the save cati
Throws:
InvalidEntityException - if the cati is not valid and cannot be saved

createCati

Cati createCati()
Return a new cati created in database.

Returns:
the new cati

deleteCati

void deleteCati(Cati cati)
Delete a cati

Parameters:
cati - the cati to delete

getCati

Cati getCati(String id)
Get a cati with its id

Parameters:
id - the cati to get's id
Returns:
the cati

getFrequencies

List<Frequency> getFrequencies()
Get all the frequencies.

Returns:
a list containing all the frequencies.

saveFrequency

Frequency saveFrequency(Locale locale,
                        Frequency frequency)
                        throws InvalidEntityException
Save a frequency in database.

Parameters:
frequency - the frequency to save
Returns:
the save frequency
Throws:
AlreadyExistingException - if a frequency with the same name already exist in database
InvalidEntityException

createFrequency

Frequency createFrequency()
Return a new frequency created in database.

Returns:
the new frequency

deleteFrequency

void deleteFrequency(Frequency frequency,
                     boolean force)
                     throws UsedException
Delete a frequency

Parameters:
frequency - the frequency to delete
force - true to force the deletion even if used
Throws:
UsedException - if not forcing deletion and frequency still used in skills

getFrequency

Frequency getFrequency(String id)
Get a frequency with its id

Parameters:
id - the frequency to get's id
Returns:
the frequency

getUsers

List<User> getUsers()
Get all the users.

Returns:
a list containing all the users.

saveUser

User saveUser(Locale locale,
              String context,
              User user)
              throws InvalidEntityException
Save a user in database.

Parameters:
user - the user to save
Returns:
the saved user
Throws:
InvalidEntityException

createUser

User createUser()
Return a new user created in database.

Returns:
the new user

deleteUser

void deleteUser(User user)
Delete a user

Parameters:
user - the user to delete

getUser

User getUser(String id)
Get a user with its id

Parameters:
id - the user to get's id
Returns:
the user

getAgent

Agent getAgent(String id)

getAgentAndDependencies

EntitiesList getAgentAndDependencies(String id)

setAgent

Agent setAgent(User user)

unsetAgent

void unsetAgent(String id)

saveAgent

Agent saveAgent(Locale locale,
                String context,
                Agent agent)
                throws InvalidEntityException
Save an agent in database.

Parameters:
agent - the agent to save
Returns:
the saved agent
Throws:
InvalidEntityException

saveSkill

Skill saveSkill(Locale locale,
                Skill skill)
                throws InvalidEntityException
Save a skill in database.

Parameters:
locale - the user locale for error messages
skill - the skill to save
Returns:
the saved user
Throws:
InvalidEntityException - if the skill is not valid

createSkill

Skill createSkill(String parentId)
Return a new user created in database.

Parameters:
parentId - the parent skill wikitty Id
Returns:
the new user

deleteSkill

void deleteSkill(Skill skill)
                 throws UsedException
Delete a skill

Parameters:
skill - the skill to delete
Throws:
UsedException - If the skill is used and we cannot delete the skill

getSkill

Skill getSkill(String id)
Get a skill with its id

Parameters:
id - the skill to get's id
Returns:
the skill

getChildrenSkill

List<Skill> getChildrenSkill(String id)

login

Boolean login(String login,
              String password)
Log the user in

Parameters:
login - the user login
password - the user password
Returns:
true if logged in, false otherwise

logout

void logout()

isLoggedIn

Boolean isLoggedIn()

saveDepartment

Department saveDepartment(Locale locale,
                          Department department)
                          throws InvalidEntityException
Save a department in database.

Parameters:
department - the department to save
Returns:
the saved department
Throws:
InvalidEntityException

saveDepartment

Department saveDepartment(Locale locale,
                          Department department,
                          List<String> units)
                          throws InvalidEntityException
Save a department in database.

Parameters:
department - the department to save
units - the units linked to the department
Returns:
the saved department
Throws:
InvalidEntityException

createDepartment

Department createDepartment()
Return a new department created in database.

Returns:
the new department

deleteDepartment

void deleteDepartment(Department department)
Delete a department

Parameters:
department - the department to delete

getDepartment

Department getDepartment(String id)
Get a department with its id

Parameters:
id - the department to get's id
Returns:
the department

getDepartments

List<Department> getDepartments()
Get all the departments.

Returns:
a list containing all the departments.

getDepartments

List<Department> getDepartments(String id)
Get all departments for a unit

Parameters:
id - the unit id
Returns:
the departments

saveUnit

Unit saveUnit(Locale locale,
              Unit unit)
              throws InvalidEntityException
Save a unit in database.

Parameters:
unit - the unit to save
Returns:
the saved unit
Throws:
InvalidEntityException

saveUnit

Unit saveUnit(Locale locale,
              Unit unit,
              List<String> departments)
              throws InvalidEntityException
Save a unit in database.

Parameters:
unit - the unit to save
departments - the departments that got the unit
Returns:
the saved unit
Throws:
InvalidEntityException

createUnit

Unit createUnit()
Return a new unit created in database.

Returns:
the new unit

deleteUnit

void deleteUnit(Unit unit)
Delete a unit

Parameters:
unit - the unit to delete

getUnit

Unit getUnit(String id)
Get a unit with its id

Parameters:
id - the unit to get's id
Returns:
the unit

getUnits

List<Unit> getUnits(String id)
Get all the units for a department

Parameters:
id - the department id
Returns:
the list of units

getUnits

List<Unit> getUnits()
Get all units

Returns:
the department's units

saveEntity

void saveEntity(org.nuiton.wikitty.entities.BusinessEntity entity)

deleteEntity

void deleteEntity(org.nuiton.wikitty.entities.BusinessEntity entity)

getAdminEmail

String getAdminEmail()
Get the administrator email address from config

Returns:
the admin email address

createAgentSkill

AgentSkill createAgentSkill(String agentId)

saveAgentSkill

void saveAgentSkill(Locale locale,
                    AgentSkill skill)
                    throws InvalidEntityException
Throws:
InvalidEntityException

isAdmin

boolean isAdmin()

isAdmin

boolean isAdmin(String id)

isAgent

boolean isAgent()

adminCreationIfDoNotExist

void adminCreationIfDoNotExist()

getSkills

EntitiesList getSkills(String agentId)
Get the skills for an agent

Parameters:
agentId - the wikittyId of the agent to get the skills of
Returns:
the agent skills and its dependencies

addSkill

AgentSkill addSkill(String agentId)

addSkill

EntitiesList addSkill(String agentId,
                      Skill skill,
                      String frequencyId)

addSkill

EntitiesList addSkill(String agentId,
                      List<String> skillIds,
                      String frequencyId)

removeSkill

void removeSkill(String skillId)

getLoggedInUser

org.nuiton.wikitty.entities.WikittyUser getLoggedInUser()

saveMySkills

EntitiesList saveMySkills(Locale locale,
                          List<AgentSkill> skills)
                          throws InvalidEntityException
Throws:
InvalidEntityException

getAgentSkill

AgentSkill getAgentSkill(String skillId)

searchUser

EntitiesList searchUser(String search,
                        String cati,
                        String department,
                        String unit,
                        String frequency)

searchSkill

EntitiesList searchSkill(String search,
                         String cati,
                         String department,
                         String unit,
                         String frequency)

setAdmin

void setAdmin(String agentId,
              boolean admin)

importCSV

void importCSV(Reader reader)

exportSkillsReferentiel

void exportSkillsReferentiel(Writer writer)

exportEntitiesReferentiel

void exportEntitiesReferentiel(Writer writer)

exportUserBase

void exportUserBase(Writer writer)

getPath

String getPath(String id)

createPrivateGroupIfDoNotExist

void createPrivateGroupIfDoNotExist()

setPrivateSkills

void setPrivateSkills(List<String> ids)

setPublicSkills

void setPublicSkills(List<String> ids)

clear

void clear()

moveSkill

boolean moveSkill(String destination,
                  String node)

sendPassword

boolean sendPassword(Locale locale,
                     String userId)

getRootSkill

Map<String,Skill> getRootSkill(List<String> skills)

getAllSkills

List<Skill> getAllSkills()

getRootSkills

List<Skill> getRootSkills()


Copyright © 2010-2012 Code Lutin. All Rights Reserved.