org.opennms.acl.repository.ibatis
Class GroupRepositoryIbatis
java.lang.Object
org.springframework.jdbc.support.JdbcAccessor
org.springframework.orm.ibatis.SqlMapClientTemplate
org.opennms.acl.repository.ibatis.GroupRepositoryIbatis
- All Implemented Interfaces:
- GroupRepository, org.springframework.beans.factory.InitializingBean, org.springframework.orm.ibatis.SqlMapClientOperations
@Repository(value="groupRepository")
public class GroupRepositoryIbatis
- extends org.springframework.orm.ibatis.SqlMapClientTemplate
- implements GroupRepository
- Since:
- jdk 1.5.0
- Author:
- Massimiliano Dessì (desmax74@yahoo.it)
| Fields inherited from class org.springframework.jdbc.support.JdbcAccessor |
logger |
| Methods inherited from class org.springframework.orm.ibatis.SqlMapClientTemplate |
afterPropertiesSet, delete, delete, delete, execute, executeWithListResult, executeWithMapResult, getDataSource, getSqlMapClient, insert, insert, queryForList, queryForList, queryForList, queryForList, queryForMap, queryForMap, queryForObject, queryForObject, queryForObject, queryForPaginatedList, queryForPaginatedList, queryWithRowHandler, queryWithRowHandler, update, update, update |
| Methods inherited from class org.springframework.jdbc.support.JdbcAccessor |
getExceptionTranslator, isLazyInit, setDatabaseProductName, setDataSource, setExceptionTranslator, setLazyInit |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroupRepositoryIbatis
public GroupRepositoryIbatis()
setSqlMapClient
public void setSqlMapClient(@Qualifier(value="sqlMapClient")
com.ibatis.sqlmap.client.SqlMapClient sqlMapClient)
- Overrides:
setSqlMapClient in class org.springframework.orm.ibatis.SqlMapClientTemplate
getUserGroupsWithAutorities
public List<GroupDTO> getUserGroupsWithAutorities(String username)
- Specified by:
getUserGroupsWithAutorities in interface GroupRepository
- Returns:
- the list of user's authorities by username
hasUsers
public Boolean hasUsers(Integer id)
- Specified by:
hasUsers in interface GroupRepository
getGroupUsernames
public List<String> getGroupUsernames(Integer id)
deleteUserGroups
public Boolean deleteUserGroups(String username)
- Description copied from interface:
GroupRepository
- Delete all user's authorities
- Specified by:
deleteUserGroups in interface GroupRepository
- Returns:
- the result of the operation
getFreeGroups
public List<GroupDTO> getFreeGroups(String username)
- Specified by:
getFreeGroups in interface GroupRepository
- Returns:
- the list of authorities that user doesn't have
getGroup
public GroupDTO getGroup(Integer id)
- Description copied from interface:
GroupRepository
- Retrieve a group by id
- Specified by:
getGroup in interface GroupRepository
- Returns:
- group
getGroups
public List<GroupDTO> getGroups()
- Specified by:
getGroups in interface GroupRepository
- Returns:
- list of all authorities
saveGroups
public Boolean saveGroups(String username,
List<Integer> groups)
- Description copied from interface:
GroupRepository
- Save a list of authorities for a given user
- Specified by:
saveGroups in interface GroupRepository
- Returns:
- the result of operation
getGroups
public List<GroupDTO> getGroups(Pager pager)
- Specified by:
getGroups in interface GroupRepository
- Returns:
- paginated list of groups
getGroupsNumber
public Integer getGroupsNumber()
- Specified by:
getGroupsNumber in interface GroupRepository
- Returns:
- numbers of authorities present in the system
getUserGroups
public List<GroupDTO> getUserGroups(String username)
- Specified by:
getUserGroups in interface GroupRepository
- Returns:
- the list of user's authorities by username
removeGroup
public Boolean removeGroup(Integer id)
- Description copied from interface:
GroupRepository
- Remove a group by id
- Specified by:
removeGroup in interface GroupRepository
- Returns:
- the result of the operation
save
public Boolean save(GroupDTO group)
- Description copied from interface:
GroupRepository
- Save a GroupDTO
- Specified by:
save in interface GroupRepository
- Returns:
- the result of the operation
Copyright © 2009. All Rights Reserved.