Package com.easydesk.security.entity
Interface SecurityEntityManager<T extends SecurityEntity<K>,K>
- Type Parameters:
T- 관리하는 entity type (SecurityEntity<K>를 상속)K- entity 의 id type
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
GroupManager,PermissionManager,RoleManager,UserManager
- All Known Implementing Classes:
GroupManagerAdaptor,ModuleGroupManagerAdaptor,ModuleUserManagerAdaptor,PermissionManagerAdaptor,RoleManagerAdaptor,UserManagerAdaptor
SecurityEntity(User, Group, Role, Permission) 를 조회, 생성, 변경, 삭제하는 manager 의 공통 계약.
- Author:
- YounghoCho
-
Method Summary
Modifier and TypeMethodDescriptionentity 를 저장소에 추가한다.boolean이름에 해당하는 entity 가 저장소에 존재하는지 확인한다.booleanentity 가 저장소에 존재하는지 확인한다.T[]이름에 해당하는 entity 를 구한다.새 entity instance 를 생성한다.getInstance(K id) id 에 해당하는 entity 를 구한다.voidentity 를 삭제한다.voidentity 의 이름을 변경한다.
-
Method Details
-
getInstance
T getInstance()새 entity instance 를 생성한다. 저장소에 저장하지는 않는다.- Returns:
- T empty object
-
getInstance
id 에 해당하는 entity 를 구한다.- Parameters:
id- entity id- Returns:
- T which has id
- Throws:
DataBackendException- 저장소 접근 중 오류가 발생한 경우UnknownEntityException- id 에 해당하는 entity 가 없는 경우
-
getByName
이름에 해당하는 entity 를 구한다.- Parameters:
name- entity 이름 array- Returns:
- 이름에 해당하는 entity array
- Throws:
DataBackendException- 저장소 접근 중 오류가 발생한 경우UnknownEntityException- 이름에 해당하는 entity 가 없는 경우
-
rename
entity 의 이름을 변경한다.- Parameters:
entity- 이름을 변경할 entityname- 새 이름- Throws:
DataBackendException- 저장소 접근 중 오류가 발생한 경우UnknownEntityException- entity 가 존재하지 않는 경우
-
remove
entity 를 삭제한다.- Parameters:
entity- 삭제할 entity- Throws:
DataBackendException- 저장소 접근 중 오류가 발생한 경우UnknownEntityException- entity 가 존재하지 않는 경우
-
add
entity 를 저장소에 추가한다.- Parameters:
entity- 추가할 entity- Returns:
- 추가된 entity
- Throws:
DataBackendException- 저장소 접근 중 오류가 발생한 경우EntityExistsException- 같은 entity 가 이미 존재하는 경우
-
exists
entity 가 저장소에 존재하는지 확인한다.- Parameters:
entity- 확인할 entity- Returns:
- 존재하면
true - Throws:
DataBackendException- 저장소 접근 중 오류가 발생한 경우
-
exists
이름에 해당하는 entity 가 저장소에 존재하는지 확인한다.- Parameters:
name- 확인할 이름- Returns:
- 존재하면
true - Throws:
DataBackendException- 저장소 접근 중 오류가 발생한 경우
-