Class ResourceRepresentation
- java.lang.Object
-
- org.keycloak.representations.idm.authorization.ResourceRepresentation
-
- Direct Known Subclasses:
AbstractResourceService.Resource,UmaResourceRepresentation
public class ResourceRepresentation extends Object
One or more resources that the resource server manages as a set of protected resources.
For more details, OAuth-resource-reg.
- Author:
- Pedro Igor
-
-
Constructor Summary
Constructors Constructor Description ResourceRepresentation()Creates a new instance.ResourceRepresentation(String name, String... scopes)ResourceRepresentation(String name, Set<ScopeRepresentation> scopes)Creates a new instance.ResourceRepresentation(String name, Set<ScopeRepresentation> scopes, String uri, String type)ResourceRepresentation(String name, Set<ScopeRepresentation> scopes, String uri, String type, String iconUri)ResourceRepresentation(String name, Set<ScopeRepresentation> scopes, Set<String> uris, String type)Creates a new instance.ResourceRepresentation(String name, Set<ScopeRepresentation> scopes, Set<String> uris, String type, String iconUri)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddScope(String... scopeNames)voidaddScope(ScopeRepresentation scope)booleanequals(Object o)Map<String,List<String>>getAttributes()StringgetDisplayName()StringgetIconUri()StringgetId()StringgetName()ResourceOwnerRepresentationgetOwner()BooleangetOwnerManagedAccess()Set<ScopeRepresentation>getScopes()StringgetType()StringgetUri()Deprecated.Set<String>getUris()inthashCode()voidsetAttributes(Map<String,List<String>> attributes)voidsetDisplayName(String displayName)voidsetIconUri(String iconUri)voidsetId(String id)voidsetName(String name)voidsetOwner(String ownerId)voidsetOwner(ResourceOwnerRepresentation owner)voidsetOwnerManagedAccess(Boolean ownerManagedAccess)voidsetScopes(Set<ScopeRepresentation> scopes)voidsetType(String type)voidsetUri(String uri)Deprecated.voidsetUris(Set<String> uris)
-
-
-
Constructor Detail
-
ResourceRepresentation
public ResourceRepresentation(String name, Set<ScopeRepresentation> scopes, Set<String> uris, String type, String iconUri)
Creates a new instance.- Parameters:
name- a human-readable string describing a set of one or more resourcesuris- aListofURIthat provides network locations for the resource set being registeredtype- a string uniquely identifying the semantics of the resource setscopes- the available scopes for this resource seticonUri- aURIfor a graphic icon representing the resource set
-
ResourceRepresentation
public ResourceRepresentation(String name, Set<ScopeRepresentation> scopes, String uri, String type, String iconUri)
-
ResourceRepresentation
public ResourceRepresentation(String name, Set<ScopeRepresentation> scopes, Set<String> uris, String type)
Creates a new instance.- Parameters:
name- a human-readable string describing a set of one or more resourcesuris- aListofURIthat provides the network location for the resource set being registeredtype- a string uniquely identifying the semantics of the resource setscopes- the available scopes for this resource set
-
ResourceRepresentation
public ResourceRepresentation(String name, Set<ScopeRepresentation> scopes, String uri, String type)
-
ResourceRepresentation
public ResourceRepresentation(String name, Set<ScopeRepresentation> scopes)
Creates a new instance.- Parameters:
name- a human-readable string describing a set of one or more resourcesserverUri- aURIthat identifies this resource serverscopes- the available scopes for this resource set
-
ResourceRepresentation
public ResourceRepresentation()
Creates a new instance.
-
-
Method Detail
-
setId
public void setId(String id)
-
getId
public String getId()
-
getName
public String getName()
-
getDisplayName
public String getDisplayName()
-
getUri
@Deprecated public String getUri()
Deprecated.
-
getType
public String getType()
-
getScopes
public Set<ScopeRepresentation> getScopes()
-
getIconUri
public String getIconUri()
-
setName
public void setName(String name)
-
setDisplayName
public void setDisplayName(String displayName)
-
setUri
@Deprecated public void setUri(String uri)
Deprecated.
-
setType
public void setType(String type)
-
setScopes
public void setScopes(Set<ScopeRepresentation> scopes)
-
setIconUri
public void setIconUri(String iconUri)
-
getOwner
public ResourceOwnerRepresentation getOwner()
-
setOwner
public void setOwner(ResourceOwnerRepresentation owner)
-
setOwner
public void setOwner(String ownerId)
-
getOwnerManagedAccess
public Boolean getOwnerManagedAccess()
-
setOwnerManagedAccess
public void setOwnerManagedAccess(Boolean ownerManagedAccess)
-
addScope
public void addScope(String... scopeNames)
-
addScope
public void addScope(ScopeRepresentation scope)
-
-