Class OAuth2RestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<OAuth2Entity,OAuth2Request,OAuth2Response>
com.bytedesk.core.rbac.auth.oauth2.OAuth2RestService
@Service
public class OAuth2RestService
extends BaseRestService<OAuth2Entity,OAuth2Request,OAuth2Response>
-
Field Summary
Fields inherited from class com.bytedesk.core.base.BaseRestService
authService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToResponse
(OAuth2Entity entity) create
(OAuth2Request request) protected org.springframework.data.jpa.domain.Specification<OAuth2Entity>
createSpecification
(OAuth2Request request) 创建Specification对象,子类必须实现 用于queryByOrg的通用实现void
delete
(OAuth2Request entity) void
deleteByUid
(String uid) protected OAuth2Entity
doSave
(OAuth2Entity entity) 子类实现具体的保存逻辑protected org.springframework.data.domain.Page<OAuth2Entity>
executePageQuery
(org.springframework.data.jpa.domain.Specification<OAuth2Entity> specification, org.springframework.data.domain.Pageable pageable) 执行分页查询,子类必须实现 用于queryByOrg的通用实现handleOptimisticLockingFailureException
(org.springframework.orm.ObjectOptimisticLockingFailureException e, OAuth2Entity entity) org.springframework.data.domain.Page<OAuth2Response>
queryByOrg
(OAuth2Request request) 通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法queryByUid
(OAuth2Request request) 通用的queryByUid实现org.springframework.data.domain.Page<OAuth2Response>
queryByUser
(OAuth2Request request) 通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法save
(OAuth2Entity entity) 保存实体,带重试机制update
(OAuth2Request request) Methods inherited from class com.bytedesk.core.base.BaseRestService
deleteByOrgUid, findByOrgUid, getUidFromRequest, recover, setUserUidToRequest
-
Constructor Details
-
OAuth2RestService
public OAuth2RestService()
-
-
Method Details
-
queryByOrg
Description copied from class:BaseRestService
通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByOrg
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-
queryByUser
Description copied from class:BaseRestService
通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByUser
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-
findByUid
- Specified by:
findByUid
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-
create
- Specified by:
create
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-
update
- Specified by:
update
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-
save
Description copied from class:BaseRestService
保存实体,带重试机制- Overrides:
save
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-
doSave
Description copied from class:BaseRestService
子类实现具体的保存逻辑- Specified by:
doSave
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-
handleOptimisticLockingFailureException
public OAuth2Entity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, OAuth2Entity entity) - Specified by:
handleOptimisticLockingFailureException
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-
deleteByUid
- Specified by:
deleteByUid
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-
delete
- Specified by:
delete
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-
convertToResponse
- Specified by:
convertToResponse
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-
queryByUid
Description copied from class:BaseRestService
通用的queryByUid实现- Overrides:
queryByUid
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-
createSpecification
protected org.springframework.data.jpa.domain.Specification<OAuth2Entity> createSpecification(OAuth2Request request) Description copied from class:BaseRestService
创建Specification对象,子类必须实现 用于queryByOrg的通用实现- Specified by:
createSpecification
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-
executePageQuery
protected org.springframework.data.domain.Page<OAuth2Entity> executePageQuery(org.springframework.data.jpa.domain.Specification<OAuth2Entity> specification, org.springframework.data.domain.Pageable pageable) Description copied from class:BaseRestService
执行分页查询,子类必须实现 用于queryByOrg的通用实现- Specified by:
executePageQuery
in classBaseRestService<OAuth2Entity,
OAuth2Request, OAuth2Response>
-