Class PermissionTicketAdapter
- java.lang.Object
-
- org.keycloak.authorization.jpa.store.PermissionTicketAdapter
-
- All Implemented Interfaces:
PermissionTicket
,JpaModel<PermissionTicketEntity>
public class PermissionTicketAdapter extends Object implements PermissionTicket, JpaModel<PermissionTicketEntity>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.authorization.model.PermissionTicket
PermissionTicket.FilterOption, PermissionTicket.SearchableFields
-
-
Constructor Summary
Constructors Constructor Description PermissionTicketAdapter(PermissionTicketEntity entity, javax.persistence.EntityManager entityManager, StoreFactory storeFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Long
getCreatedTimestamp()
PermissionTicketEntity
getEntity()
Long
getGrantedTimestamp()
String
getId()
Returns the unique identifier for this instance.String
getOwner()
Returns the resource's owner, which is usually an identifier that uniquely identifies the resource's owner.Policy
getPolicy()
String
getRequester()
Resource
getResource()
Returns theResource
associated with this instanceResourceServer
getResourceServer()
Returns theResourceServer
where this policy belongs to.Scope
getScope()
Returns theScope
associated with this instanceint
hashCode()
boolean
isGranted()
void
setGrantedTimestamp(Long millis)
void
setPolicy(Policy policy)
static PermissionTicketEntity
toEntity(javax.persistence.EntityManager em, PermissionTicket permission)
-
-
-
Constructor Detail
-
PermissionTicketAdapter
public PermissionTicketAdapter(PermissionTicketEntity entity, javax.persistence.EntityManager entityManager, StoreFactory storeFactory)
-
-
Method Detail
-
getEntity
public PermissionTicketEntity getEntity()
- Specified by:
getEntity
in interfaceJpaModel<PermissionTicketEntity>
-
getId
public String getId()
Description copied from interface:PermissionTicket
Returns the unique identifier for this instance.- Specified by:
getId
in interfacePermissionTicket
- Returns:
- the unique identifier for this instance
-
getOwner
public String getOwner()
Description copied from interface:PermissionTicket
Returns the resource's owner, which is usually an identifier that uniquely identifies the resource's owner.- Specified by:
getOwner
in interfacePermissionTicket
- Returns:
- the owner of this resource
-
getRequester
public String getRequester()
- Specified by:
getRequester
in interfacePermissionTicket
-
isGranted
public boolean isGranted()
- Specified by:
isGranted
in interfacePermissionTicket
-
getCreatedTimestamp
public Long getCreatedTimestamp()
- Specified by:
getCreatedTimestamp
in interfacePermissionTicket
-
getGrantedTimestamp
public Long getGrantedTimestamp()
- Specified by:
getGrantedTimestamp
in interfacePermissionTicket
-
setGrantedTimestamp
public void setGrantedTimestamp(Long millis)
- Specified by:
setGrantedTimestamp
in interfacePermissionTicket
-
getResourceServer
public ResourceServer getResourceServer()
Description copied from interface:PermissionTicket
Returns theResourceServer
where this policy belongs to.- Specified by:
getResourceServer
in interfacePermissionTicket
- Returns:
- a resource server
-
getPolicy
public Policy getPolicy()
- Specified by:
getPolicy
in interfacePermissionTicket
-
setPolicy
public void setPolicy(Policy policy)
- Specified by:
setPolicy
in interfacePermissionTicket
-
getResource
public Resource getResource()
Description copied from interface:PermissionTicket
Returns theResource
associated with this instance- Specified by:
getResource
in interfacePermissionTicket
- Returns:
- the
Resource
associated with this instance
-
getScope
public Scope getScope()
Description copied from interface:PermissionTicket
Returns theScope
associated with this instance- Specified by:
getScope
in interfacePermissionTicket
- Returns:
- the
Scope
associated with this instance
-
toEntity
public static PermissionTicketEntity toEntity(javax.persistence.EntityManager em, PermissionTicket permission)
-
-