Class ScopeAdapter
- java.lang.Object
-
- org.keycloak.authorization.model.AbstractAuthorizationModel
-
- org.keycloak.authorization.jpa.store.ScopeAdapter
-
- All Implemented Interfaces:
Scope,JpaModel<ScopeEntity>
public class ScopeAdapter extends AbstractAuthorizationModel implements Scope, JpaModel<ScopeEntity>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.authorization.model.Scope
Scope.FilterOption, Scope.SearchableFields
-
-
Constructor Summary
Constructors Constructor Description ScopeAdapter(ScopeEntity entity, javax.persistence.EntityManager em, StoreFactory storeFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetDisplayName()Returns the end user friendly name for this scope.ScopeEntitygetEntity()StringgetIconUri()Returns an iconURIfor this scope.StringgetId()Returns the unique identifier for this instance.StringgetName()Returns the name of this scope.ResourceServergetResourceServer()Returns theResourceServerinstance to where this scope belongs to.inthashCode()voidsetDisplayName(String name)Sets an end user friendly name for this scope.voidsetIconUri(String iconUri)Sets an iconURIfor this scope.voidsetName(String name)Sets a name for this scope.static ScopeEntitytoEntity(javax.persistence.EntityManager em, Scope scope)-
Methods inherited from class org.keycloak.authorization.model.AbstractAuthorizationModel
throwExceptionIfReadonly
-
-
-
-
Constructor Detail
-
ScopeAdapter
public ScopeAdapter(ScopeEntity entity, javax.persistence.EntityManager em, StoreFactory storeFactory)
-
-
Method Detail
-
getEntity
public ScopeEntity getEntity()
- Specified by:
getEntityin interfaceJpaModel<ScopeEntity>
-
getId
public String getId()
Description copied from interface:ScopeReturns the unique identifier for this instance.
-
getName
public String getName()
Description copied from interface:ScopeReturns the name of this scope.
-
setName
public void setName(String name)
Description copied from interface:ScopeSets a name for this scope. The name must be unique.
-
getDisplayName
public String getDisplayName()
Description copied from interface:ScopeReturns the end user friendly name for this scope. If not defined, value forScope.getName()is returned.- Specified by:
getDisplayNamein interfaceScope- Returns:
- the friendly name for this scope
-
setDisplayName
public void setDisplayName(String name)
Description copied from interface:ScopeSets an end user friendly name for this scope.- Specified by:
setDisplayNamein interfaceScope- Parameters:
name- the name of this scope
-
getIconUri
public String getIconUri()
Description copied from interface:ScopeReturns an iconURIfor this scope.- Specified by:
getIconUriin interfaceScope- Returns:
- a uri for an icon
-
setIconUri
public void setIconUri(String iconUri)
Description copied from interface:ScopeSets an iconURIfor this scope.- Specified by:
setIconUriin interfaceScope
-
getResourceServer
public ResourceServer getResourceServer()
Description copied from interface:ScopeReturns theResourceServerinstance to where this scope belongs to.- Specified by:
getResourceServerin interfaceScope- Returns:
-
toEntity
public static ScopeEntity toEntity(javax.persistence.EntityManager em, Scope scope)
-
-