Package org.keycloak.authorization.model
Class ResourceWrapper
java.lang.Object
org.keycloak.authorization.model.ResourceWrapper
- All Implemented Interfaces:
Resource
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.authorization.model.Resource
Resource.FilterOption -
Constructor Summary
ConstructorsConstructorDescriptionResourceWrapper(String id, String name, Set<Scope> scopes, ResourceServer resourceServer) ResourceWrapper(String name, Set<Scope> scopes, ResourceServer resourceServer) -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) Returns the values of an attribute with the givennameReturns the attributes associated with this resource.Returns the end user friendly name for this resource.Returns an iconURIfor this resource.getId()Returns the unique identifier for this instance.getName()Returns the resource's name.getOwner()Returns the resource's owner, which is usually an identifier that uniquely identifies the resource's owner.Returns theResourceServerto where this resource belongs to.getSingleAttribute(String name) Returns the first value of an attribute with the givennamegetType()Returns a string representing the type of this resource.getUris()booleanIndicates if this resource can be managed by the resource owner.voidremoveAttribute(String name) voidsetAttribute(String name, List<String> values) Sets an attribute with the givennameandvalues.voidsetDisplayName(String name) Sets an end user friendly name for this resource.voidsetIconUri(String iconUri) Sets an iconURIfor this resource.voidSets a name for this resource.voidsetOwnerManagedAccess(boolean ownerManagedAccess) Sets if this resource can be managed by the resource owner.voidSets a string representing the type of this resource.voidupdateScopes(Set<Scope> scopes) Update the set of scopes associated with this resource.voidupdateUris(Set<String> uri) Sets a list ofURIthat uniquely identify this resource.
-
Constructor Details
-
ResourceWrapper
-
ResourceWrapper
-
-
Method Details
-
getId
Description copied from interface:ResourceReturns the unique identifier for this instance. -
getName
Description copied from interface:ResourceReturns the resource's name. -
setName
Description copied from interface:ResourceSets a name for this resource. The name must be unique. -
getDisplayName
Description copied from interface:ResourceReturns the end user friendly name for this resource. If not defined, value forResource.getName()is returned.- Specified by:
getDisplayNamein interfaceResource- Returns:
- the friendly name for this resource
-
setDisplayName
Description copied from interface:ResourceSets an end user friendly name for this resource.- Specified by:
setDisplayNamein interfaceResource- Parameters:
name- the name of this resource
-
getUris
Description copied from interface:Resource -
updateUris
Description copied from interface:ResourceSets a list ofURIthat uniquely identify this resource.- Specified by:
updateUrisin interfaceResource- Parameters:
uri- anURIfor this resource
-
getType
Description copied from interface:ResourceReturns a string representing the type of this resource. -
setType
Description copied from interface:ResourceSets a string representing the type of this resource. -
getScopes
Description copied from interface:Resource -
getIconUri
Description copied from interface:ResourceReturns an iconURIfor this resource.- Specified by:
getIconUriin interfaceResource- Returns:
- a uri for an icon
-
setIconUri
Description copied from interface:ResourceSets an iconURIfor this resource.- Specified by:
setIconUriin interfaceResource- Parameters:
iconUri- an uri for an icon
-
getResourceServer
Description copied from interface:ResourceReturns theResourceServerto where this resource belongs to.- Specified by:
getResourceServerin interfaceResource- Returns:
- the resource server associated with this resource
-
getOwner
Description copied from interface:ResourceReturns the resource's owner, which is usually an identifier that uniquely identifies the resource's owner. -
isOwnerManagedAccess
public boolean isOwnerManagedAccess()Description copied from interface:ResourceIndicates if this resource can be managed by the resource owner.- Specified by:
isOwnerManagedAccessin interfaceResource- Returns:
trueif this resource can be managed by the resource owner. Otherwise,false.
-
setOwnerManagedAccess
public void setOwnerManagedAccess(boolean ownerManagedAccess) Description copied from interface:ResourceSets if this resource can be managed by the resource owner.- Specified by:
setOwnerManagedAccessin interfaceResource- Parameters:
ownerManagedAccess-trueindicates that this resource can be managed by the resource owner.
-
updateScopes
Description copied from interface:ResourceUpdate the set of scopes associated with this resource.- Specified by:
updateScopesin interfaceResource- Parameters:
scopes- the list of scopes to update
-
getAttributes
Description copied from interface:ResourceReturns the attributes associated with this resource.- Specified by:
getAttributesin interfaceResource- Returns:
- a map holding the attributes associated with this resource
-
getSingleAttribute
Description copied from interface:ResourceReturns the first value of an attribute with the givenname- Specified by:
getSingleAttributein interfaceResource- Parameters:
name- of the attribute- Returns:
- the first value of an attribute
-
getAttribute
Description copied from interface:ResourceReturns the values of an attribute with the givenname- Specified by:
getAttributein interfaceResource- Parameters:
name- of the attribute- Returns:
- the values of an attribute
-
setAttribute
Description copied from interface:ResourceSets an attribute with the givennameandvalues.- Specified by:
setAttributein interfaceResource- Parameters:
name- the attribute namevalues- the attribute values
-
removeAttribute
- Specified by:
removeAttributein interfaceResource
-