Class CachingApplicationService
java.lang.Object
com.atlassian.crowd.manager.application.AbstractDelegatingApplicationService
com.atlassian.crowd.manager.application.CachingApplicationService
- All Implemented Interfaces:
ApplicationService
Implementation of ApplicationService which caches the result of ApplicationService methods.
- Since:
- v2.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.crowd.manager.application.ApplicationService
ApplicationService.MembershipsIterable -
Constructor Summary
ConstructorsConstructorDescriptionCachingApplicationService(ApplicationService applicationService, UserAuthorisationCache userAuthorisationCache, com.atlassian.event.api.EventPublisher eventPublisher) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisUserAuthorised(Application application, User user) Returnstrueif the user is permitted to attempt authentication with the application.booleanisUserAuthorised(Application application, String username) Returnstrueif the user is permitted to attempt authentication with the application.voidvoidvoidvoidvoidvoidMethods inherited from class com.atlassian.crowd.manager.application.AbstractDelegatingApplicationService
addAllUsers, addGroup, addGroupToGroup, addUser, addUser, addUserToGroup, authenticateUser, authenticateUser, createPagedGroupSearcher, createPagedUserSearcher, expireAllPasswords, findGroupByName, findGroupWithAttributesByName, findRemoteUserByName, findUserByKey, findUserByName, findUserWithAttributesByKey, findUserWithAttributesByName, findWebhookById, getApplicationService, getCapabilitiesForNewUsers, getCurrentEventToken, getMemberships, getNewEvents, getUserAvatar, getUserAvatarLink, isGroupDirectGroupMember, isGroupNestedGroupMember, isUserDirectGroupMember, isUserNestedGroupMember, registerWebhook, removeGroup, removeGroupAttributes, removeGroupFromGroup, removeUser, removeUserAttributes, removeUserFromGroup, renameUser, searchDirectGroupRelationships, searchGroups, searchNestedGroupRelationships, searchUsers, setUserStatusLocally, storeGroupAttributes, storeUserAttributes, unregisterWebhook, updateGroup, updateUser, updateUserCredential, userAuthenticated
-
Constructor Details
-
CachingApplicationService
public CachingApplicationService(ApplicationService applicationService, UserAuthorisationCache userAuthorisationCache, com.atlassian.event.api.EventPublisher eventPublisher)
-
-
Method Details
-
registerListener
@PostConstruct public void registerListener() -
unregisterListener
@PreDestroy public void unregisterListener() -
isUserAuthorised
Description copied from interface:ApplicationServiceReturnstrueif the user is permitted to attempt authentication with the application. If the user could not be found, thenfalseis returned.For a user to have access to an application:
- the Application must be active.
- and either:
- the User is stored in a directory which is associated to the Application and the "allow all to authenticate" flag is true.
- the User is a member of a Group that is allowed to authenticate with the Application and both the User and Group are from the same RemoteDirectory.
- Specified by:
isUserAuthorisedin interfaceApplicationService- Overrides:
isUserAuthorisedin classAbstractDelegatingApplicationService- Parameters:
application- application user is authenticating againstusername- username- Returns:
true</tt> if the user is permitted to attempt authentication with the application, otherwise <tt>false. If the user could not be found,falsewill be returned.
-
isUserAuthorised
Description copied from interface:ApplicationServiceReturnstrueif the user is permitted to attempt authentication with the application. If the user could not be found, thenfalseis returned.For a user to have access to an application:
- the Application must be active.
- and either:
- the User is stored in a directory which is associated to the Application and the "allow all to authenticate" flag is true.
- the User is a member of a Group that is allowed to authenticate with the Application and both the User and Group are from the same RemoteDirectory.
- Specified by:
isUserAuthorisedin interfaceApplicationService- Overrides:
isUserAuthorisedin classAbstractDelegatingApplicationService- Parameters:
application- application user is authenticating againstuser- the user that will be checked- Returns:
true</tt> if the user is permitted to attempt authentication with the application, otherwise <tt>false. If the user could not be found,falsewill be returned.
-
onApplicationUpdated
-
onDirectoryUpdated
-
onDirectoryDeleted
-
onBackupRestored
-