@Service(value="defaultSystemScopeService") public class DefaultSystemScopeService extends Object implements SystemScopeService
OFFLINE_ACCESS, OPENID_SCOPE, REGISTRATION_TOKEN_SCOPE, reservedScopes, RESOURCE_TOKEN_SCOPE, UMA_AUTHORIZATION_SCOPE, UMA_PROTECTION_SCOPE
Constructor and Description |
---|
DefaultSystemScopeService() |
Modifier and Type | Method and Description |
---|---|
Set<SystemScope> |
fromStrings(Set<String> scope)
Translate the set of scope strings into a set of SystemScope objects.
|
Set<SystemScope> |
getAll() |
SystemScope |
getById(Long id) |
SystemScope |
getByValue(String value) |
Set<SystemScope> |
getDefaults()
Get all scopes that are defaulted to new clients on this system
|
Set<SystemScope> |
getReserved()
Get all the reserved system scopes.
|
Set<SystemScope> |
getRestricted()
Get all the registered scopes that are restricted.
|
Set<SystemScope> |
getUnrestricted()
Get all the registered scopes that aren't restricted.
|
void |
remove(SystemScope scope) |
Set<SystemScope> |
removeReservedScopes(Set<SystemScope> scopes)
Remove any system-reserved scopes from the set and return the result.
|
Set<SystemScope> |
removeRestrictedAndReservedScopes(Set<SystemScope> scopes)
Remove any system-reserved or registered restricted scopes from the
set and return the result.
|
SystemScope |
save(SystemScope scope) |
boolean |
scopesMatch(Set<String> expected,
Set<String> actual)
Test whether the scopes in both sets are compatible.
|
Set<String> |
toStrings(Set<SystemScope> scope)
Pluck the scope values from the set of SystemScope objects and return a list of strings
|
public DefaultSystemScopeService()
public Set<SystemScope> getAll()
getAll
in interface SystemScopeService
public SystemScope getById(Long id)
getById
in interface SystemScopeService
public SystemScope getByValue(String value)
getByValue
in interface SystemScopeService
public void remove(SystemScope scope)
remove
in interface SystemScopeService
public SystemScope save(SystemScope scope)
save
in interface SystemScopeService
public Set<SystemScope> fromStrings(Set<String> scope)
SystemScopeService
fromStrings
in interface SystemScopeService
public Set<String> toStrings(Set<SystemScope> scope)
SystemScopeService
toStrings
in interface SystemScopeService
public boolean scopesMatch(Set<String> expected, Set<String> actual)
SystemScopeService
scopesMatch
in interface SystemScopeService
public Set<SystemScope> getDefaults()
SystemScopeService
getDefaults
in interface SystemScopeService
public Set<SystemScope> getReserved()
SystemScopeService
getReserved
in interface SystemScopeService
public Set<SystemScope> getRestricted()
SystemScopeService
getRestricted
in interface SystemScopeService
public Set<SystemScope> getUnrestricted()
SystemScopeService
getUnrestricted
in interface SystemScopeService
public Set<SystemScope> removeRestrictedAndReservedScopes(Set<SystemScope> scopes)
SystemScopeService
removeRestrictedAndReservedScopes
in interface SystemScopeService
public Set<SystemScope> removeReservedScopes(Set<SystemScope> scopes)
SystemScopeService
removeReservedScopes
in interface SystemScopeService
Copyright © 2018. All rights reserved.