@Service public class PermissionService extends Object implements IPermissionService, org.springframework.context.ResourceLoaderAware
IPermissionService.RequestType| Modifier and Type | Field and Description |
|---|---|
protected long |
authorizationLength |
protected long |
interval |
protected long |
lastCheckTime |
protected long |
lastReadTime |
protected String |
permissionFilePath |
protected Permissions |
permissions |
protected SessionState |
sessionState |
| Constructor and Description |
|---|
PermissionService() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
findPermission(Set<String> elements)
Czy któryś ze zbiorów funkcji uprawniających do wykonania akcji jest uprawniony dla którejś z grup użytkownika.
|
protected Set<String> |
functionDefinitions(String name,
IPermissionService.RequestType requestType)
Tworzy zbiór definicji funkcji, które pasują do przekazanego uprawnienia.
|
protected Set<String> |
functionSets(Set<String> functionNames,
IPermissionService.RequestType requestType)
Tworzy zbiór zbiorów definicji funkcji, w których znajduje się dowolna z pasujących nazw funkcji.
|
protected Permissions |
getPermissions() |
boolean |
isPermitted(String name)
Sprawdzenie uprawnień dla domyślego zapytania typu GET.
|
boolean |
isPermitted(String name,
IPermissionService.RequestType requestType)
Sprawdzenie uprawnień dla zapytania wybranego typu.
|
void |
logoff() |
protected boolean |
matches(String name,
String function)
Czy dana nazwa pasuje do przekazanej funkcji (definicja uprawnienia).
|
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) |
@Autowired protected SessionState sessionState
protected String permissionFilePath
protected Permissions permissions
protected long lastReadTime
protected long lastCheckTime
protected long interval
protected long authorizationLength
protected Permissions getPermissions()
public boolean isPermitted(String name)
IPermissionServiceisPermitted in interface IPermissionServicepublic boolean isPermitted(String name, IPermissionService.RequestType requestType)
IPermissionServiceisPermitted in interface IPermissionServicepublic void logoff()
logoff in interface IPermissionServiceprotected boolean findPermission(Set<String> elements)
protected Set<String> functionSets(Set<String> functionNames, IPermissionService.RequestType requestType)
protected boolean matches(String name, String function)
protected Set<String> functionDefinitions(String name, IPermissionService.RequestType requestType)
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader in interface org.springframework.context.ResourceLoaderAwareCopyright © 2015 Matsuo IT. All rights reserved.