Class GuiProfiledPrincipalManagerImpl
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.security.GuiProfiledPrincipalManagerImpl
-
- All Implemented Interfaces:
GuiProfiledPrincipalManager
,CacheInvalidationListener
,CacheListener
,MidPointPrincipalManager
,OwnerResolver
,org.springframework.beans.factory.Aware
,org.springframework.context.MessageSourceAware
,org.springframework.security.core.userdetails.UserDetailsService
@Service("guiProfiledPrincipalManager") public class GuiProfiledPrincipalManagerImpl extends Object implements CacheListener, GuiProfiledPrincipalManager, org.springframework.security.core.userdetails.UserDetailsService, org.springframework.context.MessageSourceAware
- Author:
- lazyman, semancik
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.security.api.MidPointPrincipalManager
DOT_CLASS, OPERATION_GET_PRINCIPAL, OPERATION_UPDATE_USER
-
-
Constructor Summary
Constructors Constructor Description GuiProfiledPrincipalManagerImpl()
-
Method Summary
-
-
-
Method Detail
-
setMessageSource
public void setMessageSource(org.springframework.context.MessageSource messageSource)
- Specified by:
setMessageSource
in interfaceorg.springframework.context.MessageSourceAware
-
initialize
@PostConstruct public void initialize()
-
getPrincipal
public GuiProfiledPrincipal getPrincipal(String username, Class<? extends FocusType> clazz) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
- Specified by:
getPrincipal
in interfaceGuiProfiledPrincipalManager
- Specified by:
getPrincipal
in interfaceMidPointPrincipalManager
- Throws:
ObjectNotFoundException
SchemaException
CommunicationException
ConfigurationException
SecurityViolationException
ExpressionEvaluationException
-
getPrincipalByOid
public GuiProfiledPrincipal getPrincipalByOid(String oid, Class<? extends FocusType> clazz) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
- Specified by:
getPrincipalByOid
in interfaceGuiProfiledPrincipalManager
- Specified by:
getPrincipalByOid
in interfaceMidPointPrincipalManager
- Throws:
ObjectNotFoundException
SchemaException
CommunicationException
ConfigurationException
SecurityViolationException
ExpressionEvaluationException
-
getPrincipal
public GuiProfiledPrincipal getPrincipal(PrismObject<? extends FocusType> focus) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
- Specified by:
getPrincipal
in interfaceGuiProfiledPrincipalManager
- Specified by:
getPrincipal
in interfaceMidPointPrincipalManager
- Throws:
SchemaException
CommunicationException
ConfigurationException
SecurityViolationException
ExpressionEvaluationException
-
getPrincipal
public GuiProfiledPrincipal getPrincipal(PrismObject<? extends FocusType> focus, AuthorizationTransformer authorizationTransformer, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
- Specified by:
getPrincipal
in interfaceGuiProfiledPrincipalManager
- Specified by:
getPrincipal
in interfaceMidPointPrincipalManager
- Throws:
SchemaException
CommunicationException
ConfigurationException
SecurityViolationException
ExpressionEvaluationException
-
getLocalLoggedInPrincipals
public List<UserSessionManagementType> getLocalLoggedInPrincipals()
- Specified by:
getLocalLoggedInPrincipals
in interfaceGuiProfiledPrincipalManager
-
terminateLocalSessions
public void terminateLocalSessions(TerminateSessionEvent terminateSessionEvent)
- Specified by:
terminateLocalSessions
in interfaceGuiProfiledPrincipalManager
-
updateFocus
public void updateFocus(MidPointPrincipal principal, Collection<? extends ItemDelta<?,?>> itemDeltas)
- Specified by:
updateFocus
in interfaceGuiProfiledPrincipalManager
- Specified by:
updateFocus
in interfaceMidPointPrincipalManager
-
resolveOwner
public <F extends FocusType,O extends ObjectType> PrismObject<F> resolveOwner(PrismObject<O> object)
- Specified by:
resolveOwner
in interfaceOwnerResolver
-
loadUserByUsername
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
- Specified by:
loadUserByUsername
in interfaceorg.springframework.security.core.userdetails.UserDetailsService
- Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException
-
getEventSpecifications
public Collection<CacheInvalidationEventSpecification> getEventSpecifications()
- Specified by:
getEventSpecifications
in interfaceCacheInvalidationListener
- Specified by:
getEventSpecifications
in interfaceCacheListener
-
invalidate
public <O extends ObjectType> void invalidate(Class<O> type, String oid, boolean clusterwide, CacheInvalidationContext context)
Description copied from interface:CacheInvalidationListener
Invalidates given object(s) in all relevant caches.- Specified by:
invalidate
in interfaceCacheInvalidationListener
- Parameters:
type
- Type of object (null means all types).oid
- OID of object (null means all object(s) of given type(s)).clusterwide
- Whether to distribute this event clusterwide.context
- Context of the invalidation request (optional).
-
refreshCompiledProfile
@NotNull public @NotNull CompiledGuiProfile refreshCompiledProfile(GuiProfiledPrincipal principal)
- Specified by:
refreshCompiledProfile
in interfaceGuiProfiledPrincipalManager
-
-