Class MapResourceAdapter
java.lang.Object
org.keycloak.authorization.model.AbstractAuthorizationModel
org.keycloak.models.map.authorization.adapter.AbstractResourceModel<MapResourceEntity>
org.keycloak.models.map.authorization.adapter.MapResourceAdapter
- All Implemented Interfaces:
Resource
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.authorization.model.Resource
Resource.FilterOption, Resource.SearchableFields
-
Field Summary
Fields inherited from class org.keycloak.models.map.authorization.adapter.AbstractResourceModel
entity
Fields inherited from class org.keycloak.authorization.model.AbstractAuthorizationModel
storeFactory
-
Constructor Summary
ConstructorDescriptionMapResourceAdapter
(RealmModel realm, ResourceServer resourceServer, MapResourceEntity entity, StoreFactory storeFactory) -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String name) Returns the values of an attribute with the givenname
Returns the attributes associated with this resource.Returns the end user friendly name for this resource.Returns an iconURI
for 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 theResourceServer
to where this resource belongs to.getSingleAttribute
(String name) Returns the first value of an attribute with the givenname
getType()
Returns a string representing the type of this resource.getUris()
boolean
Indicates if this resource can be managed by the resource owner.void
removeAttribute
(String name) void
setAttribute
(String name, List<String> values) Sets an attribute with the givenname
andvalues
.void
setDisplayName
(String name) Sets an end user friendly name for this resource.void
setIconUri
(String iconUri) Sets an iconURI
for this resource.void
Sets a name for this resource.void
setOwnerManagedAccess
(boolean ownerManagedAccess) Sets if this resource can be managed by the resource owner.void
Sets a string representing the type of this resource.toString()
void
updateScopes
(Set<Scope> scopes) Update the set of scopes associated with this resource.void
updateUris
(Set<String> uri) Sets a list ofURI
that uniquely identify this resource.Methods inherited from class org.keycloak.models.map.authorization.adapter.AbstractResourceModel
equals, hashCode
Methods inherited from class org.keycloak.authorization.model.AbstractAuthorizationModel
throwExceptionIfReadonly
-
Constructor Details
-
MapResourceAdapter
public MapResourceAdapter(RealmModel realm, ResourceServer resourceServer, MapResourceEntity entity, StoreFactory storeFactory)
-
-
Method Details
-
getId
Description copied from interface:Resource
Returns the unique identifier for this instance.- Returns:
- the unique identifier for this instance
-
getName
Description copied from interface:Resource
Returns the resource's name.- Returns:
- the name of this resource
-
setName
Description copied from interface:Resource
Sets a name for this resource. The name must be unique.- Parameters:
name
- the name of this resource
-
getDisplayName
Description copied from interface:Resource
Returns the end user friendly name for this resource. If not defined, value forResource.getName()
is returned.- Returns:
- the friendly name for this resource
-
setDisplayName
Description copied from interface:Resource
Sets an end user friendly name for this resource.- Parameters:
name
- the name of this resource
-
getUris
Description copied from interface:Resource
-
updateUris
Description copied from interface:Resource
Sets a list ofURI
that uniquely identify this resource.- Parameters:
uri
- anURI
for this resource
-
getType
Description copied from interface:Resource
Returns a string representing the type of this resource.- Returns:
- the type of this resource or null if not defined
-
setType
Description copied from interface:Resource
Sets a string representing the type of this resource.- Parameters:
type
- the type of this resource or null if not defined
-
getScopes
Description copied from interface:Resource
- Returns:
- a list with all scopes associated with this resource
-
getIconUri
Description copied from interface:Resource
Returns an iconURI
for this resource.- Returns:
- a uri for an icon
-
setIconUri
Description copied from interface:Resource
Sets an iconURI
for this resource.- Parameters:
iconUri
- an uri for an icon
-
getResourceServer
Description copied from interface:Resource
Returns theResourceServer
to where this resource belongs to.- Returns:
- the resource server associated with this resource
-
getOwner
Description copied from interface:Resource
Returns the resource's owner, which is usually an identifier that uniquely identifies the resource's owner.- Returns:
- the owner of this resource
-
isOwnerManagedAccess
public boolean isOwnerManagedAccess()Description copied from interface:Resource
Indicates if this resource can be managed by the resource owner.- Returns:
true
if this resource can be managed by the resource owner. Otherwise,false
.
-
setOwnerManagedAccess
public void setOwnerManagedAccess(boolean ownerManagedAccess) Description copied from interface:Resource
Sets if this resource can be managed by the resource owner.- Parameters:
ownerManagedAccess
-true
indicates that this resource can be managed by the resource owner.
-
updateScopes
Description copied from interface:Resource
Update the set of scopes associated with this resource.- Parameters:
scopes
- the list of scopes to update
-
getAttributes
Description copied from interface:Resource
Returns the attributes associated with this resource.- Returns:
- a map holding the attributes associated with this resource
-
getSingleAttribute
Description copied from interface:Resource
Returns the first value of an attribute with the givenname
- Parameters:
name
- of the attribute- Returns:
- the first value of an attribute
-
getAttribute
Description copied from interface:Resource
Returns the values of an attribute with the givenname
- Parameters:
name
- of the attribute- Returns:
- the values of an attribute
-
setAttribute
Description copied from interface:Resource
Sets an attribute with the givenname
andvalues
.- Parameters:
name
- the attribute namevalues
- the attribute values
-
removeAttribute
-
toString
-