Class AbstractPermissionDefinitionService<T extends PermissionDefinition>

java.lang.Object
com.power4j.fist.security.core.authorization.service.AbstractPermissionDefinitionService<T>
All Implemented Interfaces:
PermissionDefinitionService<T>

public abstract class AbstractPermissionDefinitionService<T extends PermissionDefinition> extends Object implements PermissionDefinitionService<T>
Since:
1.0
Author:
CJ (power4j@outlook.com)
  • Constructor Details

    • AbstractPermissionDefinitionService

      public AbstractPermissionDefinitionService()
  • Method Details

    • getPermissionDefinition

      public List<T> getPermissionDefinition(String serviceName, org.springframework.http.HttpMethod method)
      Description copied from interface: PermissionDefinitionService
      获取权限信息
      Specified by:
      getPermissionDefinition in interface PermissionDefinitionService<T extends PermissionDefinition>
      Parameters:
      serviceName - 服务名
      method - 接口方法
      Returns:
      无权限信息返回空集合
    • loadFromCache

      protected Optional<List<T>> loadFromCache(String serviceName, org.springframework.http.HttpMethod method)
    • updateCache

      protected void updateCache(String serviceName, org.springframework.http.HttpMethod method, List<T> data)
    • fetch

      protected abstract Optional<List<T>> fetch(String serviceName, org.springframework.http.HttpMethod method)
      获取数据
      Parameters:
      serviceName -
      method -
      Returns:
      无数据返回 empty
    • getCache

      protected abstract Optional<org.springframework.cache.Cache> getCache()
      Cache
      Returns:
      返回empty表示关闭缓存