fr.inra.refcomp.server
Class StorageServiceImpl
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
com.google.gwt.user.server.rpc.RemoteServiceServlet
fr.inra.refcomp.server.StorageServiceImpl
- All Implemented Interfaces:
- com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, StorageService, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class StorageServiceImpl
- extends com.google.gwt.user.server.rpc.RemoteServiceServlet
- implements StorageService
User: couteau
Date: 30 nov. 2010
- See Also:
- Serialized Form
| Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet |
perThreadRequest, perThreadResponse |
|
Method Summary |
AgentSkill |
addSkill()
|
EntitiesList |
addSkill(List<String> skillIds,
String frequencyId)
|
EntitiesList |
addSkill(Skill skill,
String frequencyId)
|
void |
adminCreationIfDoNotExist()
|
Cati |
createCati()
|
Department |
createDepartment()
|
Frequency |
createFrequency()
|
Skill |
createSkill(String parentId)
|
Unit |
createUnit()
|
User |
createUser()
|
void |
deleteCati(Cati cati)
|
void |
deleteDepartment(Department department)
|
void |
deleteFrequency(Frequency frequency,
boolean force)
|
void |
deleteSkill(Skill skill)
|
void |
deleteUnit(Unit unit)
|
void |
deleteUser(User user)
|
String |
getAdminEmail()
|
Agent |
getAgent(String id)
|
EntitiesList |
getAgentAndDependencies(String id)
|
AgentSkill |
getAgentSkill(String skillId)
|
List<Skill> |
getAllSkills()
|
Cati |
getCati(String id)
|
List<Cati> |
getCatis()
|
List<Skill> |
getChildrenSkill(String id)
|
Department |
getDepartment(String id)
|
List<Department> |
getDepartments()
|
List<Department> |
getDepartments(String id)
|
List<Frequency> |
getFrequencies()
|
Frequency |
getFrequency(String id)
|
protected Locale |
getLocale()
|
Agent |
getLoggedInAgent()
|
User |
getLoggedInUser()
Get the logged in User |
String |
getPath(String id)
|
Map<String,Skill> |
getRootSkill(List<String> skills)
|
protected RefcompSession |
getSession()
Get the RefcompSession from the user session |
Skill |
getSkill(String id)
|
EntitiesList |
getSkills()
|
EntitiesList |
getSkills(String agentId)
|
Unit |
getUnit(String id)
|
List<Unit> |
getUnits()
|
List<Unit> |
getUnits(String id)
|
User |
getUser(String id)
|
List<User> |
getUsers()
|
Boolean |
isAdmin()
|
Boolean |
isAdmin(String id)
|
Boolean |
isAgent()
|
Boolean |
isLoggedIn()
|
Boolean |
login(String login,
String password)
|
void |
logout()
|
boolean |
moveSkill(String destination,
String node)
|
void |
removeSkill(String skillId)
|
Agent |
saveAgent(Agent agent,
String context)
|
Cati |
saveCati(Cati cati)
|
Department |
saveDepartment(Department department)
|
Department |
saveDepartment(Department department,
List<String> units)
|
Frequency |
saveFrequency(Frequency frequency)
|
EntitiesList |
saveMySkills(List<AgentSkill> skills)
|
Skill |
saveSkill(Skill skill)
|
Unit |
saveUnit(Unit unit)
|
Unit |
saveUnit(Unit unit,
List<String> departments)
|
User |
saveUser(User user,
String context)
|
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(String userId)
|
void |
setAdmin(String agentId,
boolean admin)
|
Agent |
setAgent(User user)
|
void |
setPrivateSkills(List<String> ids)
|
void |
setPublicSkills(List<String> ids)
|
void |
unsetAgent(String id)
|
| Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet |
checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse |
| Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet |
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StorageServiceImpl
public StorageServiceImpl()
getUsers
public List<User> getUsers()
- Specified by:
getUsers in interface StorageService
saveUser
public User saveUser(User user,
String context)
throws AlreadyExistingException,
InvalidEntityException
- Specified by:
saveUser in interface StorageService
- Throws:
AlreadyExistingException
InvalidEntityException
createUser
public User createUser()
- Specified by:
createUser in interface StorageService
deleteUser
public void deleteUser(User user)
- Specified by:
deleteUser in interface StorageService
getUser
public User getUser(String id)
- Specified by:
getUser in interface StorageService
getAgent
public Agent getAgent(String id)
- Specified by:
getAgent in interface StorageService
getAgentAndDependencies
public EntitiesList getAgentAndDependencies(String id)
- Specified by:
getAgentAndDependencies in interface StorageService
setAgent
public Agent setAgent(User user)
- Specified by:
setAgent in interface StorageService
unsetAgent
public void unsetAgent(String id)
- Specified by:
unsetAgent in interface StorageService
saveAgent
public Agent saveAgent(Agent agent,
String context)
throws AlreadyExistingException,
InvalidEntityException
- Specified by:
saveAgent in interface StorageService
- Throws:
AlreadyExistingException
InvalidEntityException
login
public Boolean login(String login,
String password)
- Specified by:
login in interface StorageService
logout
public void logout()
- Specified by:
logout in interface StorageService
getFrequencies
public List<Frequency> getFrequencies()
throws SecurityException
- Specified by:
getFrequencies in interface StorageService
- Throws:
SecurityException
saveFrequency
public Frequency saveFrequency(Frequency frequency)
throws AlreadyExistingException,
InvalidEntityException
- Specified by:
saveFrequency in interface StorageService
- Throws:
AlreadyExistingException
InvalidEntityException
createFrequency
public Frequency createFrequency()
- Specified by:
createFrequency in interface StorageService
deleteFrequency
public void deleteFrequency(Frequency frequency,
boolean force)
throws UsedException
- Specified by:
deleteFrequency in interface StorageService
- Throws:
UsedException
getFrequency
public Frequency getFrequency(String id)
- Specified by:
getFrequency in interface StorageService
getCatis
public List<Cati> getCatis()
- Specified by:
getCatis in interface StorageService
saveCati
public Cati saveCati(Cati cati)
throws AlreadyExistingException,
InvalidEntityException
- Specified by:
saveCati in interface StorageService
- Throws:
AlreadyExistingException
InvalidEntityException
createCati
public Cati createCati()
- Specified by:
createCati in interface StorageService
deleteCati
public void deleteCati(Cati cati)
- Specified by:
deleteCati in interface StorageService
getCati
public Cati getCati(String id)
- Specified by:
getCati in interface StorageService
getChildrenSkill
public List<Skill> getChildrenSkill(String id)
- Specified by:
getChildrenSkill in interface StorageService
saveSkill
public Skill saveSkill(Skill skill)
throws AlreadyExistingException,
InvalidEntityException
- Specified by:
saveSkill in interface StorageService
- Throws:
AlreadyExistingException
InvalidEntityException
createSkill
public Skill createSkill(String parentId)
- Specified by:
createSkill in interface StorageService
deleteSkill
public void deleteSkill(Skill skill)
throws UsedException
- Specified by:
deleteSkill in interface StorageService
- Throws:
UsedException
saveUnit
public Unit saveUnit(Unit unit)
throws AlreadyExistingException,
InvalidEntityException
- Specified by:
saveUnit in interface StorageService
- Throws:
AlreadyExistingException
InvalidEntityException
saveUnit
public Unit saveUnit(Unit unit,
List<String> departments)
throws AlreadyExistingException,
InvalidEntityException
- Specified by:
saveUnit in interface StorageService
- Throws:
AlreadyExistingException
InvalidEntityException
createUnit
public Unit createUnit()
- Specified by:
createUnit in interface StorageService
getUnit
public Unit getUnit(String id)
- Specified by:
getUnit in interface StorageService
deleteUnit
public void deleteUnit(Unit unit)
- Specified by:
deleteUnit in interface StorageService
getUnits
public List<Unit> getUnits()
- Specified by:
getUnits in interface StorageService
getUnits
public List<Unit> getUnits(String id)
- Specified by:
getUnits in interface StorageService
saveDepartment
public Department saveDepartment(Department department)
throws AlreadyExistingException,
InvalidEntityException
- Specified by:
saveDepartment in interface StorageService
- Throws:
AlreadyExistingException
InvalidEntityException
saveDepartment
public Department saveDepartment(Department department,
List<String> units)
throws AlreadyExistingException,
InvalidEntityException
- Specified by:
saveDepartment in interface StorageService
- Throws:
AlreadyExistingException
InvalidEntityException
createDepartment
public Department createDepartment()
- Specified by:
createDepartment in interface StorageService
getDepartment
public Department getDepartment(String id)
- Specified by:
getDepartment in interface StorageService
deleteDepartment
public void deleteDepartment(Department department)
- Specified by:
deleteDepartment in interface StorageService
getDepartments
public List<Department> getDepartments()
- Specified by:
getDepartments in interface StorageService
getDepartments
public List<Department> getDepartments(String id)
- Specified by:
getDepartments in interface StorageService
getSkill
public Skill getSkill(String id)
- Specified by:
getSkill in interface StorageService
getAdminEmail
public String getAdminEmail()
- Specified by:
getAdminEmail in interface StorageService
isAdmin
public Boolean isAdmin()
- Specified by:
isAdmin in interface StorageService
isAdmin
public Boolean isAdmin(String id)
- Specified by:
isAdmin in interface StorageService
isAgent
public Boolean isAgent()
- Specified by:
isAgent in interface StorageService
isLoggedIn
public Boolean isLoggedIn()
- Specified by:
isLoggedIn in interface StorageService
adminCreationIfDoNotExist
public void adminCreationIfDoNotExist()
- Specified by:
adminCreationIfDoNotExist in interface StorageService
getSkills
public EntitiesList getSkills()
- Specified by:
getSkills in interface StorageService
getSkills
public EntitiesList getSkills(String agentId)
- Specified by:
getSkills in interface StorageService
addSkill
public AgentSkill addSkill()
- Specified by:
addSkill in interface StorageService
addSkill
public EntitiesList addSkill(Skill skill,
String frequencyId)
- Specified by:
addSkill in interface StorageService
addSkill
public EntitiesList addSkill(List<String> skillIds,
String frequencyId)
- Specified by:
addSkill in interface StorageService
removeSkill
public void removeSkill(String skillId)
- Specified by:
removeSkill in interface StorageService
saveMySkills
public EntitiesList saveMySkills(List<AgentSkill> skills)
throws InvalidEntityException
- Specified by:
saveMySkills in interface StorageService
- Throws:
InvalidEntityException
getAgentSkill
public AgentSkill getAgentSkill(String skillId)
- Specified by:
getAgentSkill in interface StorageService
getLoggedInUser
public User getLoggedInUser()
- Get the logged in User
- Specified by:
getLoggedInUser in interface StorageService
- Returns:
- the logged in User
getLoggedInAgent
public Agent getLoggedInAgent()
- Specified by:
getLoggedInAgent in interface StorageService
setAdmin
public void setAdmin(String agentId,
boolean admin)
- Specified by:
setAdmin in interface StorageService
searchUser
public EntitiesList searchUser(String search,
String cati,
String department,
String unit,
String frequency)
- Specified by:
searchUser in interface StorageService
searchSkill
public EntitiesList searchSkill(String search,
String cati,
String department,
String unit,
String frequency)
- Specified by:
searchSkill in interface StorageService
getPath
public String getPath(String id)
- Specified by:
getPath in interface StorageService
setPrivateSkills
public void setPrivateSkills(List<String> ids)
- Specified by:
setPrivateSkills in interface StorageService
setPublicSkills
public void setPublicSkills(List<String> ids)
- Specified by:
setPublicSkills in interface StorageService
moveSkill
public boolean moveSkill(String destination,
String node)
- Specified by:
moveSkill in interface StorageService
sendPassword
public boolean sendPassword(String userId)
- Specified by:
sendPassword in interface StorageService
getRootSkill
public Map<String,Skill> getRootSkill(List<String> skills)
- Specified by:
getRootSkill in interface StorageService
getAllSkills
public List<Skill> getAllSkills()
- Specified by:
getAllSkills in interface StorageService
getSession
protected RefcompSession getSession()
- Get the RefcompSession from the user session
- Returns:
- the user's session
getLocale
protected Locale getLocale()
Copyright © 2010-2012 Code Lutin. All Rights Reserved.