Class GuiProfiledPrincipalManagerImpl
java.lang.Object
com.evolveum.midpoint.model.impl.security.GuiProfiledPrincipalManagerImpl
- All Implemented Interfaces:
GuiProfiledPrincipalManager
,CacheInvalidationListener
,CacheListener
,OwnerResolver
,MidPointPrincipalManager
,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
-
Method Summary
Modifier and TypeMethodDescriptiongetPrincipal
(PrismObject<? extends FocusType> focus, AuthorizationTransformer authorizationTransformer, ProfileCompilerOptions options, OperationResult result) getPrincipal
(PrismObject<? extends FocusType> focus, ProfileCompilerOptions options, OperationResult result) getPrincipal
(ObjectQuery query, Class<? extends FocusType> clazz, ProfileCompilerOptions options) getPrincipal
(String username, Class<? extends FocusType> clazz, ProfileCompilerOptions options) getPrincipalByOid
(String oid, Class<? extends FocusType> clazz, ProfileCompilerOptions options) void
<O extends ObjectType>
voidinvalidate
(Class<O> type, String oid, boolean clusterwide, CacheInvalidationContext context) Invalidates given object(s) in all relevant caches.org.springframework.security.core.userdetails.UserDetails
loadUserByUsername
(String username) @NotNull CompiledGuiProfile
refreshCompiledProfile
(GuiProfiledPrincipal principal) @NotNull CompiledGuiProfile
refreshCompiledProfile
(GuiProfiledPrincipal principal, ProfileCompilerOptions options) <F extends FocusType,
O extends ObjectType>
PrismObject<F>resolveOwner
(PrismObject<O> object) Returns the owner of the provided object.void
setMessageSource
(@NotNull org.springframework.context.MessageSource messageSource) void
terminateLocalSessions
(TerminateSessionEvent terminateSessionEvent) void
updateFocus
(MidPointPrincipal principal, Collection<? extends ItemDelta<?, ?>> itemDeltas) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.security.api.MidPointPrincipalManager
getPrincipal
-
Constructor Details
-
GuiProfiledPrincipalManagerImpl
public GuiProfiledPrincipalManagerImpl()
-
-
Method Details
-
setMessageSource
public void setMessageSource(@NotNull @NotNull 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, ProfileCompilerOptions options) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException - Specified by:
getPrincipal
in interfaceGuiProfiledPrincipalManager
- Specified by:
getPrincipal
in interfaceMidPointPrincipalManager
- Throws:
ObjectNotFoundException
SchemaException
CommunicationException
ConfigurationException
SecurityViolationException
ExpressionEvaluationException
-
getPrincipal
public GuiProfiledPrincipal getPrincipal(ObjectQuery query, Class<? extends FocusType> clazz, ProfileCompilerOptions options) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException -
getPrincipalByOid
public GuiProfiledPrincipal getPrincipalByOid(String oid, Class<? extends FocusType> clazz, ProfileCompilerOptions options) 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, ProfileCompilerOptions options, OperationResult result) 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, ProfileCompilerOptions options, 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
- Specified by:
getLocalLoggedInPrincipals
in interfaceGuiProfiledPrincipalManager
-
terminateLocalSessions
- 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) Description copied from interface:OwnerResolver
Returns the owner of the provided object. The meaning of "owner" is different for, e.g., shadows, tasks, and so on.- 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
- 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
- Specified by:
refreshCompiledProfile
in interfaceGuiProfiledPrincipalManager
-
refreshCompiledProfile
@NotNull public @NotNull CompiledGuiProfile refreshCompiledProfile(GuiProfiledPrincipal principal, ProfileCompilerOptions options) - Specified by:
refreshCompiledProfile
in interfaceGuiProfiledPrincipalManager
-